Re: [NTG-context] Combine purgeall and result options
Typo, sorry list! Please ignore. Works as expected. On Tue, Mar 30, 2021 at 7:02 PM Thangalin wrote: > Given test.tex: > > % SOF > \starttext > Guten abend > \stoptext > % EOF > > Run: context --puregeall --result=out.pdf test.tex > > Expected: All .tuc and .log files are deleted. > > Actual: out.log and out.tuc are not deleted. > > Context version: 2021.03.27 19:09 > > Cheers! > ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Combine purgeall and result options
Given test.tex: % SOF \starttext Guten abend \stoptext % EOF Run: context --puregeall --result=out.pdf test.tex Expected: All .tuc and .log files are deleted. Actual: out.log and out.tuc are not deleted. Context version: 2021.03.27 19:09 Cheers! ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Output result to specified file path
>From https://wiki.contextgarden.net/Run_scripts context --jit prd_${PRD} --result=_pdf/$RESULT --mode=$MOD Does this mean the example is incorrect? Or did it once work and the behaviour has since changed? Or is it that relative directories are fine but absolute paths won't work? Let me know and I'll update the wiki with the correct behaviour. ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Nested structure of files loaded by input
schrieb am Di., 30. März 2021, 09:45: > Hi, > > I have file main.tex that loads various subfiles that are placed in a > subdir : > > > > \starttext > > \input subdir/chapter1 > > \stoptext > > > > Chapter1.tex itself loads some other files that are also placed in the > subdir directory : > > \starttext > > \input subfile1 > > \stoptext > > > > Subfile1 : > > \starttext > > Asdf > > \stopttext > > > > Now, when in the subdir `context chapter1` and `context subfile1` both > work. But in the main directory this here fails : context main > > -> « input file ‘subfile1’ is not found, quitting’ > > > > What am I missing ? Does \input resolve filenames according to the CWD, > not to the location itself is located ? > > How can I make that work? > \usepath[subdir] Wolfgang ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Nested structure of files loaded by input
> Am 30.03.2021 um 10:23 schrieb > : >> BTW I’d strongly suggest to use the project structure (environment, >> products, components) in such cases, but that doesn’t change this. > > I use environments, but in that particular case there's no need for products > and components. (OTOH, with components I probably wouldn't have noticed that > things go off the rails here as \component doesn't complain about missing > files...) You’re right, that’s a common trap. Got me recently when I typeset a novel and missed one chapter (component) because the filename had a typo that I didn’t copy to the product... Hraban ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Nested structure of files loaded by input
> -Ursprüngliche Nachricht- > Von: ntg-context Im Auftrag von Henning > Hraban Ramm > Gesendet: Dienstag, 30. März 2021 10:14 > An: mailing list for ConTeXt users > Betreff: Re: [NTG-context] Nested structure of files loaded by input > > > > > Am 30.03.2021 um 09:43 schrieb denis.ma...@ub.unibe.ch: > > What am I missing ? Does \input resolve filenames according to the CWD, > not to the location itself is located ? > > Nothing. You need to decide from where you want to run your files. Ok, thank you. > > BTW I’d strongly suggest to use the project structure (environment, > products, components) in such cases, but that doesn’t change this. I use environments, but in that particular case there's no need for products and components. (OTOH, with components I probably wouldn't have noticed that things go off the rails here as \component doesn't complain about missing files...) Denis ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Nested structure of files loaded by input
> Am 30.03.2021 um 09:43 schrieb denis.ma...@ub.unibe.ch: > What am I missing ? Does \input resolve filenames according to the CWD, not > to the location itself is located ? Nothing. You need to decide from where you want to run your files. BTW I’d strongly suggest to use the project structure (environment, products, components) in such cases, but that doesn’t change this. Hraban ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Nested structure of files loaded by input
Ok, I can make it work with \doiffileexistselse But is there a more elegant way ? Von: ntg-context Im Auftrag von denis.ma...@ub.unibe.ch Gesendet: Dienstag, 30. März 2021 09:44 An: ntg-context@ntg.nl Betreff: [NTG-context] Nested structure of files loaded by input Hi, I have file main.tex that loads various subfiles that are placed in a subdir : \starttext \input subdir/chapter1 \stoptext Chapter1.tex itself loads some other files that are also placed in the subdir directory : \starttext \input subfile1 \stoptext Subfile1 : \starttext Asdf \stopttext Now, when in the subdir `context chapter1` and `context subfile1` both work. But in the main directory this here fails : context main -> « input file 'subfile1' is not found, quitting' What am I missing ? Does \input resolve filenames according to the CWD, not to the location itself is located ? How can I make that work? Best, Denis ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Output result to specified file path
On 3/30/2021 9:13 AM, Henning Hraban Ramm wrote: Am 30.03.2021 um 07:05 schrieb Thangalin : How do you set the target output path and file name? Consider: context --result=/tmp/subdir/test.pdf $HOME/test.tex Expected: PDF file is created in /tmp/subdir directory. Actual: PDF file is created in $HOME directory. That’s known behavior. ConTeXt will never write to other directories than the current. Sorry. Doesn’t fit my needs, too. just do the reverse: go to the wanted path and run from there (and use --path for picking up stuff) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Nested structure of files loaded by input
Hi, I have file main.tex that loads various subfiles that are placed in a subdir : \starttext \input subdir/chapter1 \stoptext Chapter1.tex itself loads some other files that are also placed in the subdir directory : \starttext \input subfile1 \stoptext Subfile1 : \starttext Asdf \stopttext Now, when in the subdir `context chapter1` and `context subfile1` both work. But in the main directory this here fails : context main -> < input file 'subfile1' is not found, quitting' What am I missing ? Does \input resolve filenames according to the CWD, not to the location itself is located ? How can I make that work? Best, Denis ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Output result to specified file path
IIRC, there’s currently no support for this. --result= can be used to rename the output file, but it can not be used to create the file in a specific directory, nor to move it there. Such a feature would be quite useful though, I think. Maybe two options? --result=foo.pdf => rename output to foo.pdf --output-dir=/somedir => create output file in /somedir (but keep the regular file name) --result=/somedir/foo.pdf => create foo.pdf at a specific location. Denis Von: ntg-context Im Auftrag von Thangalin Gesendet: Dienstag, 30. März 2021 07:06 An: mailing list for ConTeXt users Betreff: [NTG-context] Output result to specified file path How do you set the target output path and file name? Consider: % SOF \starttext Hello \stoptext % EOF Save as $HOME/test.tex and then: mkdir /tmp/subdir context --result=/tmp/subdir/test.pdf $HOME/test.tex Expected: PDF file is created in /tmp/subdir directory. Actual: PDF file is created in $HOME directory. Version: 2021.03.27 19:09 Thank you! ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Output result to specified file path
> Am 30.03.2021 um 07:05 schrieb Thangalin : > > How do you set the target output path and file name? Consider: > context --result=/tmp/subdir/test.pdf $HOME/test.tex > > Expected: PDF file is created in /tmp/subdir directory. > > Actual: PDF file is created in $HOME directory. That’s known behavior. ConTeXt will never write to other directories than the current. Sorry. Doesn’t fit my needs, too. Hraban ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___