[texhax] finding files

Uwe Lueck uwe.lueck at web.de
Fri Dec 18 17:02:34 CET 2009


Susan Dittmar <Susan.Dittmar at gmx.de> schrieb am 17.12.2009 18:35:34:
[...] 
> One possible problem is the macro \g at addto@macro. I do not remember out of
> the top of my head where it comes from -- maybe it is rather low level TeX,
> but maybe it is from one of the many packages I usually load. If you can't
> find it, I'll search for you if you want. 

It is in latex.ltx/ltclass.dtx, used for \At... hooks.

Cheers, 
    Uwe

> It appends something to an
> existing macro (in a global definition).
> 
> I never worked with \graphicspath (something from the graphics/graphicx
> package), so I just added a hint for it here. I really should get to
> testing this part ;-)
> 
> % needs package ifthen; load it if not yet loaded:
> \RequirePackage{ifthen}
> % this is the current path:
> \newcommand{\DIR}{.}
> % save current path in this internal macro:
> \newcommand{\@SAVEDIR}{}\let\@SAVEDIR\DIR
> % Call to \input, with an optional argument giving the (relative)
> % directory:
> \newcommand{\INPUT}[2][]{%
>     \begingroup%
> 	    \let\@SAVEDIR\DIR% must not be \global\let !
> 	    \ifthenelse{\equal{#1}{}}{}{\g at addto@macro{\DIR}{/#1}}%
> 		%   \graphicspath{{\DIR}}%
> 	    \expandafter\input{\DIR/#2}%
> 	    \global\let\DIR\@SAVEDIR%
>     \endgroup%
> }
> 
> Perhaps this helps...
> 
> 	Susan



More information about the texhax mailing list