[OS X TeX] path name

Peter Dyballa Peter_Dyballa at Web.DE
Wed Feb 22 14:33:56 EST 2006


Am 22.02.2006 um 19:22 schrieb Friedrich Vosberg:

>> Applying this on your examples, assuming your working directory is  
>> Pröctür & Gämbeł, it might work with:
>>
>> 	\immediate\write18{pwd | sed -e 's/&/\\&/g' | iconv -f UTF-8-MAC - 
>> t MacRoman ...
>
> I have to save a file on a file server
>
>     volumes/SERVER$/...
>
> Caused by the Dollar sign the path name can not be written in the  
> document. I think that the $ sign invokes the math mode and that  
> occures a failure. How can I encapsulate the $ as like as the &, so  
> that *both* signs can be contained in a path?

The same should work again! Two possible ways:

	pwd | sed -e 's/&/\\&/g' -e 's/\$/\\$/g' | ...

or

	pwd | sed -e 's/\([$&]\)/\\\1/g' | ...

sed substitutes each member of the set [$&] with \ (escaped with  
another \) and itself (\1).

--
Mit friedvollen Grüßen

   Pete

Eat the rich -- the poor are tough and stringy.


------------------------- 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 MacOSX-TeX mailing list