[tex-live] suboptimal filename parsing in miniltx.tex

Jan Kaspar jan.kaspar at gmail.com
Mon Sep 21 16:12:32 CEST 2009


Hello,

I've experienced a problem with \includegraphics command containing a full
path, when run via the plainTeX interface to the graphicx package. For
instance this would result into the problem:

\input graphicx
\input picture
\includegraphics{../pdf/bpms_0.pdf}%
\bye


Tracking it down, it's been revealed (see
https://sourceforge.net/projects/asymptote/forums/forum/409349/topic/3405573)
that it is caused by a wrong filename parsing in miniltx.tex. Here is
a suggestion for improvement (it solves the problem):

\def\filename at parse#1{%
    \let\filename at area\@empty
    \expandafter\filename at path#1/\\
}

\def\filename at path#1/#2\\{%
  \ifx\\#2\\%
     \def\reserved at a{\filename at simple#1.\\}%
  \else
     \edef\filename at area{\filename at area#1/}%
     \def\reserved at a{\filename at path#2\\}%
  \fi
  \reserved at a
}

  \def\filename at simple#1.#2\\{%
    \ifx\\#2\\%
       \let\filename at ext\relax
    \else
       \edef\filename at ext{\filename at dot#2\\}%
    \fi
    \edef\filename at base{#1}}
  \def\filename at dot#1.\\{#1}


Cheers, Kašpi.


-- 
My web page: http://cern.ch/jkaspar/
My cell phone: +4176 206 5932
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tex-live/attachments/20090921/ddf79043/attachment.html>


More information about the tex-live mailing list