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!
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
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 -----------------------------------------------------------------
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.
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
participants (4)
-
denis.maier@ub.unibe.ch
-
Hans Hagen
-
Henning Hraban Ramm
-
Thangalin