Re: Invoking pdflatex from a notebook

*To*: mathgroup at smc.vnet.net*Subject*: [mg121282] Re: Invoking pdflatex from a notebook*From*: JUN <noeckel at gmail.com>*Date*: Wed, 7 Sep 2011 05:40:25 -0400 (EDT)*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com*References*: <j44kdn$973$1@smc.vnet.net>

On Sep 6, 1:08 am, Themis Matsoukas <tmatsou... at me.com> wrote: > I am trying to invoke pdflatex from inside a Mathematica notebook but I can't get it to work. Standard shell commands work fine. For example the following gives me a listing of the current directory: > > SetDirectory@NotebookDirectory[]; > Import["!ls -a", "Text"] > > ". > . > DS_Store > debug.nb > test copy.tex > test.tex > unix shell.nb" > > But when I evaluate > > Import["!pdflatex test.tex", "Text"] > > nothing happens. I am running 8.0.1 on a Mac (Lion) and my latex installation is Texlive-2011. > > Themis Themis, unless Lion works completely differently from Snow Leopard, I bet that the path to your TeX installation isn't contained in the $PATH environment variable that Mathematica sees. Look for that directory in the output of this Mathematica command: Environment["PATH"] If you can't find the TeX direcotry, you have to add it. A simple way to do this is to type the following in the Terminal: defaults write ~/.MacOSX/environment PATH $PATH (of course this assumes pdflatex worked for you in Terminal, meaning that $PATH contains the correct info when an interactive shell has been initialized). Jens