On Sun, 17 Oct 2010, luigi scarso wrote:
On Sat, Oct 16, 2010 at 11:09 PM, Aditya Mahajan <adit...@umich.edu> wrote:
Hi,
In MkII, I can say
\ReadFile{/tmp/filename}
to read a file in /tmp directory. However, in MkIV, that fails because
ReadFile is defined as
\unexpanded\def\ReadFile #1{\doreadfile{any}
{.}{#1}\donothing\donothing}
so it explicitly searches in the . (current) directory.
Bug or feature?
What happen if you put a path like
./../../../../../tmp/filename
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.
Aditya
___________________________________________________________________________________
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
___________________________________________________________________________________