[OS X TeX] engine writes in wrong directories

Rechtsanwalt Friedrich Vosberg vosberg at meinrechtsanwalt.com
Thu Apr 6 12:04:33 CEST 2006


Morning.

I use this engine:

===== 8>< =====
#!/bin/sh
pdflatex "$1"
pdflatex "$1"
===== ><8 =====

Saved in

   ~/Library/TeXShop/engines/HermannTeX.engine.

This is the document file:

===== ><8 =====
%!TEX TS-program = HermannTeX
\documentclass{ltxdoc}
\usepackage{xspace}
\begingroup
\let\\\relax
\immediate\write18{pwd | sed -e 's/&/\\&/g' | iconv -f UTF-8-MAC -t  
MacRoman | awk -F'\\n' '{print "\\begingroup
\\catcode\string^\string^60\\\string^\string^24=11\\relax
\\catcode\string^\string^60\\\string^\string^26=11\\relax
\\newcommand\\fvpath{" $1 "\\xspace}\\relax
\\expandafter\\endgroup
\\expandafter\\newcommand
\\expandafter\\fvpath
\\expandafter{\\fvpath}\\relax
\\endinput"}' > tmppath.tex}%
\immediate\write18{echo "\jobname" | sed -e 's/&/\\&/g' | iconv -f  
UTF-8-MAC -t MacRoman | awk -F'\\n' '{print "\\begingroup
\\catcode\string^\string^60\\\string^\string^24=11\\relax
\\catcode\string^\string^60\\\string^\string^26=11\\relax
\\newcommand\\fvfile{" $1 "\\xspace}\\relax
\\expandafter\\endgroup
\\expandafter\\newcommand
\\expandafter\\fvfile
\\expandafter{\\fvfile}\\relax
\\endinput"}' > tmpfile.tex}%
\endgroup
\input{tmppath.tex}
\input{tmpfile.tex}
\newcommand*{\pathfile}[1][pdf]{%
	\fvpath/\fvfile{}.#1%
}
\begin{document}
\pathfile
\end{document}
===== ><8 =====

The file is saved in:

  /Volumes/DirFV$/Mydir/wrongpath.tex

When I typeset the file by Cmd+T wrongpath.pdf is in the same  
directory like the tex file. But /pathfile is expanded to:

   /Users/fv/Library/texmf/tex/latex/fvpackages/fvbspntz/fvbspntz.pdf

Why?

TIA and kind regards. Friedrich

Mit freundlichem Gruß
Friedrich Vosberg
Rechtsanwalt

--
Rechtsanwalt Friedrich Vosberg
Alt-Oetzsch 4, 04416 Markkleeberg
Ruf: 0341 3502074   Mobil: 0174 1602887
Fax: 0341 3502075   http://www.meinrechtsanwalt.com




------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the macostex-archives mailing list