[OS X TeX] epstopdf

Ross Moore ross at ics.mq.edu.au
Wed Sep 28 18:05:34 EDT 2005


On 29/09/2005, at 7:23 AM, Chris Goedde wrote:

> No, I just meant that _ has a special meaning to TeX, so if you  
> were to create a TeX file with that character in it and refer to  
> the name of the file inside a TeX file (i.e. by writing something  
> like "this information can be found in file Name1_Name2.tex"), you  
> have to take special care, because TeX's first instinct is to  
> interpret the _ as the command for a subscript (e.g. as in $A_1$)  
> and TeX will give an error because _ is being used outside of math  
> mode. So you'd actually have to type "this information can be found  
> in file Name1\_Name2.tex", or use verbatim mode for the file name,  
> or something else. That's all I meant.

Right.
But the best way to handle this is by using a macro definition,
such as
            \urldef\NameFile\path{Name1_Name2.tex}

after having loaded  \usepackage{url} .
(Using LaTeX of course, though it may also work in other formats.)


Then you just have your manuscript source saying:

      (this information can be found in file \NameFile)


Now later, when you decide to make a proper citation, you just
adjust the way \NameFile is defined, leaving the body source
completely alone.

Alternatively, you may not like the default style used for this,
so you can roll-your-own Url-Command. Here is how \path is declared:

        \DeclareUrlCommand\path{\urlstyle{tt}}


For file-names you might prefer something like:

        \DeclareUrlCommand\file{\urlstyle{sf}}
        \urldef\NameFile\file{Name1_Name2.tex}

>
> And of course it's ironic because it was epstopdf's inability to  
> properly deal with "\ " for the space character in paths that got  
> this whole discussion started to begin with.

Whenever you combine 2 or more different styles
  --- here Unix and Mac OS (9 & earlier) ---
there will be compromises that need to be made.
Some things that were easy to do in one style become
harder in the presence of support for the other.

You live with it, because overall the combination is
much richer and stronger. Learning how to cope with
those compromises is a small price to pay.



And back on the original topic, the easiest way to deal with
a problem caused by having a directory path containing
space characters is to just make a symbolic link, using
an anchor-name that has no spaces.
e.g.  (in a Terminal)

  ln -s  ~/Documents/path-to-name\ with\ spaces/figs  myfigs

Now use:
       epstopdf myfigs/figure1.eps --outfile=figure1.pdf


When you have done all the conversions, just   rm myfigs
to remove the symbolic link, it you don't want to keep it.




Hope this helps,

     Ross

>
> Chris
>
> ------------------------- 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/
>
>

------------------------------------------------------------------------
Ross Moore                                         ross at maths.mq.edu.au
Mathematics Department                             office: E7A-419
Macquarie University                               tel: +61 +2 9850 8955
Sydney, Australia  2109                            fax: +61 +2 9850 8114
------------------------------------------------------------------------


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