On 17-10-2010 7:58, Aditya Mahajan wrote:
On Sun, 17 Oct 2010, Wolfgang Schuster wrote:


Am 17.10.2010 um 19:21 schrieb Aditya Mahajan:

It works, but does not fit my need. I wanted to add an option to the
filter module to allow the user to say:

\setupexternalfilters[directory=$TEMP]

and have all the tmp files created in $TEMP. Having to set this as a
relative path will be really ugly.

I am just looking for macro that takes the filename as a (brace
delimited) parameter and typesets it. I can define one on my own; but
I thought that \ReadFile is already supposed to do that.

It is straight forward to "fix" \ReadFile so that absolute paths work:

\unexpanded\def\readfile #1{\doreadfile{any} \empty{#1}}
\unexpanded\def\ReadFile #1{\doreadfile{any}
\empty{#1}\donothing\donothing}

I just wondering if the current behavior is a design decision or an
oversight.

What i get from the comments in the source is that \readfile looks for
the requested file
in the current directory, the parent directories and the tex directory
and \ReadFile is
a alternative form for \readfile without the second and third argument.

Then the MkII implementation is wrong because it allows absolute paths.

You can define your own command \ReadFilter which is based in
\readsetfile or \readfixfile.

I wanted something that will work consistently in MkII and MkIV. I can do:

\doifmodeelse{\s!mkii}
{\let\ReadFilter\ReadFile}
{\def\ReadFilter#1{\doreadfile{any}\empty{#1}\donothing\donothing}}

but, I wanted to avoid such things if possible :-/

(BTW, why is system mode *mkii not set in MkII?)

because you can do \doifnotmode{mkiv}


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to