[NTG-context] \ReadFile in MkII vs MkIV

Aditya Mahajan adityam at umich.edu
Sun Oct 17 19:58:35 CEST 2010

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:


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

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


More information about the ntg-context mailing list