TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
minted not working on mac

I'm using the minted package in latex on my mac (running lion). Now when I use the terminal to type

pdflatex -shell-escape MintedProblem.tex 

it compiles fine and the resultant pdf looks perfect. When I try and typset the exact same document through Texpad (I assume any other IDE also) I just get a load of errors pertaining to the MintedProblem.out.pyg file. I have set up in preferences to use -shell-escape but this hasn't fixed it. Any ideas? My $PATH is shown below in case this sheds some light on things


All the errors are of the following form

Undefined control sequence. (...err}{\PYZbs{}}\PY{n}{relax}\PY{p}{\PYZpc{}}...)

Below is a minimal working file (working from terminal, not Texpad)

\documentclass[12pt, titlepage]{article}

  string title = "This is a Unicode π in the sky"
  Defined as $\pi=\lim_{n\to\infty}\frac{P_n}{d}$ where $P$ is the perimeter
  of an $n$-sided regular polygon circumscribing a
  circle of diameter $d$.
  const double pi = 3.1415926535

share|improve this question

marked as duplicate by egreg, Marco Daniel, Martin Schröder, clemens, Claudio Fiandrino Sep 5 '12 at 7:59

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Thanks but the solutions offered in that link don't work, pygmentize is in the path (I tried the test suggested) – Philip O'Brien Jul 13 '12 at 15:26
up vote 13 down vote accepted

I had the same problem -- working from Terminal but not in Texpad. I solved it by tweaking my Preferences for Texpad. In the typesetting pane, I enabled -shell-escape (off by default) and disabled the option to hide the intermediate files. I suspect that the error arises when pygments looks for a file but it has been named in such a way that it is not found.

I hope this helps.


share|improve this answer
It's a shame this answer never got accepted. Here, have my +1 instead :) – pencil Jan 6 '14 at 14:18
In minted 2.0alpha3 they added an outputdir option. Use \usepackage[outputdir=.texpadtmp]{minted}, and then you only have to enable -shell-escape, and not hide intermediate files. – arya Apr 6 '14 at 2:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.