[OS X TeX] Spaces in file or folder names

Maarten Sneep maarten.sneep at xs4all.nl
Fri Feb 11 05:58:28 EST 2005


On 11 feb 2005, at 0:55, Aditya Dushyant Trivedi wrote:

> The \input primitive in tex (and mf and mpost) now accepts double 
> quotes containing spaces and other special characters. Typical 
> examples:
>
> \input "filename with spaces" % plain
> \input{"filename with spaces"} % latex
>
> I got curious. Earlier I had trouble with spaces. I tried it again. I 
> created the following files and saved it in the following path:

[snip]

> I ran it through LaTeX using TeXShop 1.35e. It handled it perfectly.
>
> So it seems that that LaTeX can handle spaces in file and folder names 
> with teTeX 3.0 (maybe earlier). According to the manual plain tex 
> handles spaces as well. I guess it is no longer a hack. :)

Good to know.

> I would still caution using spaces in filenames. Some packages and 
> scripts may not handle them well.

If they patch things correctly (and still use the old command 
underneath), things should be fine, although I can think of one package 
that will probably fail: pdfsync will not work, not because of failure 
at the TeX stage, but because the previewers get something they do not 
expect.

Peter Dyballa wrote

> I remember a discussion on a German list on this topic last year, in 
> November. Using double quotes around the file name with spaces still 
> collides with a file name like 'd"amlicher Name'.

But shouldn't you use the input encoding package and write 
\input{"dämlicher Name"} directly? (which encoding is unclear, probably 
the same as the OS uses, unicode on Mac and Windows, something else on 
other unices?)

Maarten

--------------------- 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 Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the MacOSX-TeX mailing list