On Tue, Jul 21, 2009 at 15:31, Wolfgang Schuster wrote:
Am 21.07.2009 um 14:28 schrieb Mojca Miklavec:
Thanks. So basically there's no way to convince \input to work "properly" (that is: respecting some additional input path) in mkii? (In mkiv it seems to work, but it could be that that's just because it interacts with its own "kpathsea".)
The question is should \input kn MkIV behave like it did in MkII or should it take subdirectories into account.
I see no serious reason speaking against that.
But then I have another question. I actually wanted to use that inside a module (gnuplot) that uses something like
\processmyfile[#1][#2]{ .... \readlocfile{#2}{}{} .... }
I wish I remembered why I decided for \readlocfile (I guess it was for error handling that is still waiting to be implemented). How should I change the module in this particular case? (What should I use instead of \readlocfile, so that the file will be found?)
What behaviour do you want?
I would expect when I load a file it should found in the current directory or the TeX tree but not in subdirectories, when you want to take subdirectory searching I would use something like
\setupgnuplot[directory={,myplots/}]
Hmmm ... that's not a bad idea either.
\def\inputgnuplotfile#1% {\!!donefalse \def\doinputgnuplotfile##1% {\doiffileelse{##1#1} {\readlocalfile{##1#1}{}{}\!!donetrue\quitcommalist} {\!!donefalse}} \processcommacommand[\gnuplotparameter{directory}]\doinputgnuplotfile \!!ifdone\message{gnuplot}{...}\else\message{gnuplot}{file #1 not found}\fi}
Thank you very much. I'll build this into the module. I can actually still use \processcommacommand[,\gnuplotparameter{directory},\allinputpaths] with your code :) :) :) Mojca