Re: [NTG-context] \ReadFile in MkII vs MkIV

2010-10-17 Thread Hans Hagen
On 17-10-2010 11:02, Aditya Mahajan wrote: On Sun, 17 Oct 2010, Hans Hagen wrote: On 17-10-2010 8:54, Aditya Mahajan wrote: Maybe Hans forgot it for mkii but it doesn’t matter whether mkii/mkiv is a normal mode or a system mode. IIRC, system modes cannot be reset using \(enable|disable)mode

Re: [NTG-context] \ReadFile in MkII vs MkIV

2010-10-17 Thread Aditya Mahajan
On Sun, 17 Oct 2010, Hans Hagen wrote: On 17-10-2010 8:54, Aditya Mahajan wrote: Maybe Hans forgot it for mkii but it doesn’t matter whether mkii/mkiv is a normal mode or a system mode. IIRC, system modes cannot be reset using \(enable|disable)mode. there is nothing special about system mo

Re: [NTG-context] \ReadFile in MkII vs MkIV

2010-10-17 Thread Aditya Mahajan
On Sun, 17 Oct 2010, Hans Hagen wrote: On 17-10-2010 7:58, Aditya Mahajan wrote: (BTW, why is system mode *mkii not set in MkII?) because you can do \doifnotmode{mkiv} :) Documented on the wiki page on modes. Aditya _

Re: [NTG-context] \ReadFile in MkII vs MkIV

2010-10-17 Thread Hans Hagen
On 17-10-2010 8:54, Aditya Mahajan wrote: Maybe Hans forgot it for mkii but it doesn’t matter whether mkii/mkiv is a normal mode or a system mode. IIRC, system modes cannot be reset using \(enable|disable)mode. there is nothing special about system modes: they just have a * in front so you

Re: [NTG-context] \ReadFile in MkII vs MkIV

2010-10-17 Thread Hans Hagen
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 hav

Re: [NTG-context] \ReadFile in MkII vs MkIV

2010-10-17 Thread Aditya Mahajan
On Sun, 17 Oct 2010, Wolfgang Schuster wrote: Am 17.10.2010 um 19:58 schrieb Aditya Mahajan: 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

Re: [NTG-context] \ReadFile in MkII vs MkIV

2010-10-17 Thread Wolfgang Schuster
Am 17.10.2010 um 19:58 schrieb Aditya Mahajan: > 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 p

Re: [NTG-context] \ReadFile in MkII vs MkIV

2010-10-17 Thread Aditya Mahajan
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. Havi

Re: [NTG-context] \ReadFile in MkII vs MkIV

2010-10-17 Thread Wolfgang Schuster
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 w

Re: [NTG-context] \ReadFile in MkII vs MkIV

2010-10-17 Thread Aditya Mahajan
On Sun, 17 Oct 2010, Aditya Mahajan wrote: I am just looking for macro that takes the filename as a (brace delimited) parameter and typesets it. Err.. I mean \inputs it. Aditya ___ If your question is of interest

Re: [NTG-context] \ReadFile in MkII vs MkIV

2010-10-17 Thread Aditya Mahajan
On Sun, 17 Oct 2010, luigi scarso wrote: On Sat, Oct 16, 2010 at 11:09 PM, Aditya Mahajan 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}

Re: [NTG-context] \ReadFile in MkII vs MkIV

2010-10-17 Thread luigi scarso
On Sat, Oct 16, 2010 at 11:09 PM, Aditya Mahajan 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\donothin

[NTG-context] \ReadFile in MkII vs MkIV

2010-10-16 Thread Aditya Mahajan
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 featu