Re: [NTG-context] placefigure, usetikzlibrary and readfile

2021-08-02 Thread Hans Hagen via ntg-context
it in a calling document as well, for better management of fonts, etc. Thus this is most convenient. I have everything in the main document and I can quickly reuse any figure elsewhere. What I did: I use \readfile in a main ConTeXt file document.tex to include the file included.tex . The file

[NTG-context] placefigure, usetikzlibrary and readfile

2021-08-01 Thread Jigé via ntg-context
of fonts, etc. Thus this is most convenient. I have everything in the main document and I can quickly reuse any figure elsewhere. What I did: I use \readfile in a main ConTeXt file document.tex to include the file included.tex . The file included.tex should contain *just* the TikZ picture

[NTG-context] readfile not understood

2011-09-29 Thread Meer, H. van der
I do not understand while \readfile behaves differently from \input with regard to TeX-code processing. I have the following code: \readfile{metapost-setup} %(file with metapost inclusions) \starttext \startMPpage .. \stopMPpage \stoptext Replace the \readfile by: \input ../../../metapost

Re: [NTG-context] readfile not understood

2011-09-29 Thread Wolfgang Schuster
Am 29.09.2011 um 20:57 schrieb Meer, H. van der: I do not understand while \readfile behaves differently from \input with regard to TeX-code processing. I have the following code: \readfile{metapost-setup} %(file with metapost inclusions) \starttext \startMPpage .. \stopMPpage

Re: [NTG-context] readfile not understood

2011-09-29 Thread Meer, H. van der
Finding the file works with \ReadFile{} works. But is generates another problem because \input ../../../metapost-setup and \ReadFile{metapost-setup} behave differently! The \input process my \startMPinclusions correctly but the ReadFile does not, because the following metapost has

Re: [NTG-context] readfile not understood

2011-09-29 Thread Wolfgang Schuster
Am 29.09.2011 um 21:10 schrieb Meer, H. van der: Finding the file works with \ReadFile{} works. But is generates another problem because \input ../../../metapost-setup and \ReadFile{metapost-setup} behave differently! The \input process my \startMPinclusions correctly

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 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

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 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

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 Wolfgang Schuster
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

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

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

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

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

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 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 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

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

[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