Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

pdflatex -shell-escape My_Ruby_Notes.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 My_Ruby_Notes.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

/Library/Frameworks/Python.framework/Versions/2.7/bin:/Users/Philip/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/bin:/Users/Philip/.rvm/gems/ruby-1.9.3-p194@global/bin:/Users/Philip/.rvm/rubies/ruby-1.9.3-p194/bin:/Users/Philip/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/usr/texbin

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}
\usepackage{minted}
\begin{document}
\newpage

\begin{minted}[mathescape,
               linenos,
               numbersep=5pt,
               gobble=2,
               frame=lines,
               framesep=2mm]{csharp}
  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
\end{minted}

\end{document}
share|improve this question
    
You need to post those errors. –  Konrad Rudolph Jul 13 '12 at 6:43
    
Using Emacs+AucTeX your last MWE works for me (on Mac OS X). But the unicode-"π" in the title makes trouble. Deleting it, or compiling with luaLaTeX works though. –  Peter Breitfeld Jul 14 '12 at 10:20
    
I tried deleting the unicode-"π" but it made no difference unfortunately. It must be an issue with Texpad. I contacted their support (who are great) so hopefully they can help. –  Philip Jul 14 '12 at 16:03
1  
Texpad developers here. Minted currently doesn't work with the hidden directory option in preferences. Works otherwise. We will submit a fix for this in due course. –  jkcl Sep 7 '12 at 10:03
1  
@jkcl Welcome to TeX.sx! I've converted your answer to a comment, as that fits the style of the site better. –  Joseph Wright Sep 7 '12 at 10:05
add comment

migrated from stackoverflow.com Jul 13 '12 at 22:55

This question came from our site for professional and enthusiast programmers.

3 Answers

In OS X, GUI applications don't get changes that are made to PATH (or any other environment variables like TEXINPUTS) in .profile or .bashrc. Thus you have to set them so they are available for GUI applications. See this answer for details.

I don't know if that's your problem since you don't specify what the error messages are, but it's quite possible.

share|improve this answer
    
Thanks for the help, I read through the link but can't seem to make sense of it. The errors I am receiving in Texpad are all of the form –  Philip Jul 13 '12 at 8:46
    
Undefined control sequence. (...err}{\PYZbs{}}\PY{n}{relax}\PY{p}{\PYZpc{}}...) so it does seem to be that the program is just not managing to 'use' python –  Philip Jul 13 '12 at 8:53
    
Okay, but maybe python can't run which then doesn't create an intermediate tex file where they are defined. I don't know how minted works, but a minimal non-working example and/or the full error log would be helpful. –  Ivan Andrus Jul 13 '12 at 10:57
add comment

Are you using "-output-directory" to compile? There is an open issue that makes minted ignore this parameter and the produced error is the same you report.

Reference: http://code.google.com/p/minted/issues/detail?id=88

share|improve this answer
add comment

For minted 1.7, in addition to enabling -shell-escape, disable the option to hide the intermediate files. (per Billy.)

In minted 2.0alpha3 there is an outputdir option. If you install it (or later), you can use: \usepackage[outputdir=.texpadtmp]{minted}, and still hide intermediate files.

share|improve this answer
    
Welcome to TeX.SX! –  Adam Liter Apr 6 at 2:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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