[OS X TeX] Command line question

Herbert Schulz herbs at wideopenwest.com
Mon Aug 31 21:37:20 EDT 2009


On Aug 31, 2009, at 3:12 PM, François Chaplais wrote:

> Hi I am LaTeX Mac user  and I also use a programming environment  
> called revolution ( http://www.runrev.com ) which is roughly a  
> successor to hypercard. This environment can send commands to the  
> shell for execution. I want to use it to run pdflatex on a text file.
>
> My Tex install is a 2008 release (the one that is currently  
> available at http://www.tug.org/mactex/ ). System is 10.5.8 (not SL)
>
> This revolution code works (i.e. I get the right pdf and a result  
> string which is equal to the content of the log file). "--"  
> indicates comments.
>
>     set the shellcommand to "/bin/bash" -- this set the shell to  
> bash as in terminal
>     set the defaultfolder to theFolder -- this sets the folder where  
> the command line will be executed
> 								--- to the string in the variable "theFolder" -- like "cd"
>     answer shell("/usr/local/texlive/2008/bin/universal-darwin/ 
> pdflatex" && last item of theFilePath)
> 			-- this runs the string between parentheses in the previously  
> defined shell and
> 			-- displays the output of pdflatex
>
> This also works with sh and tcsh.
>
> However, if I replace
> 	"/usr/local/texlive/2008/bin/universal-darwin/pdflatex"
> by
> 	"pdflatex"
> in the previous code, I get the error string "pdflatex: Command not  
> found.". Using sh or tcsh returns the same error.
>
> I very much would like the second command ("pdflatex") to work, as  
> it is rather universal (and it works in the terminal).
>
> I know that this is a cross environment problem, but I suspect this  
> could be better solved by mac TeX wise men rather than by the  
> revolution community.
>
> TIA
> 	François


Howdy,

The shell you are running is not a login shell and therefore doesn't  
pick up the $PATH set by the system. You'll have to set the PATH  
variable via

export $PATH=/usr/texbin:$PATH

so that the shell can find the TeX binaries. If, in addition you want  
to find Ghostscript you should use

export $PATH=/usr/texbin:/usr/local/bin:$PATH

so that gs (Ghostscript) is also found.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)






More information about the MacOSX-TeX mailing list