MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Invoking pdflatex from a notebook

  • To: mathgroup at
  • Subject: [mg121282] Re: Invoking pdflatex from a notebook
  • From: JUN <noeckel at>
  • Date: Wed, 7 Sep 2011 05:40:25 -0400 (EDT)
  • Delivered-to:
  • References: <j44kdn$973$>

On Sep 6, 1:08 am, Themis Matsoukas <tmatsou... at> 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

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:

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).


  • Prev by Date: Re: CDF files now on Gyre&Gimble (math blog)
  • Next by Date: Re: Texture in version 8, fine, but don't export...?
  • Previous by thread: Invoking pdflatex from a notebook
  • Next by thread: Re: Invoking pdflatex from a notebook