curse where the
number parser ignores the flag because \setuparranging does care and
\Schema fails to expand.
Thank you! Well, I tried \expanded in a few places, and that didn’t work.
\def\Schema{\doifelsedocumentargument{schema}{\getdocumentargument{schema}}{1*8}}
\def\Pages{\doifelsed
\setuparranging does care and
\Schema fails to expand.
\def\Schema{\doifelsedocumentargument{schema}{\getdocumentargument{schema}}{1*8}}
\def\Pages{\doifelsedocumentargument{numberofpages}{\getdocumentargument{numberofpages}}{16}}
\setuparranging[\Schema]
\doifelsedocumentargument{schema}
{
, as used in \dorecurse{\Pages}{…},
> but not for the imposition schema. Typesetting \Schema looks right, but
> \setuparranging doesn’t work. Where's my error?
>
> \def\Schema{\doifelsedocumentargument{schema}{\getdocumentargument{schema}}{1*8}}
> \def\Pages{\doifelsedocumenta
looks right, but \setuparranging doesn’t work. Where's my error?
\def\Schema{\doifelsedocumentargument{schema}{\getdocumentargument{schema}}{1*8}}
\def\Pages{\doifelsedocumentargument{numberofpages}{\getdocumentargument{numberofpages}}{16}}
\setuparranging[\Schema]
Find the full example attach
{language}
> {\mainlanguage[\getdocumentargument{language}]}
Many thanks for the info, Wolfgang.
I see that literally anything goes:
\doifdocumentargument{anything}
{\mainlanguage[\getdocumentargument{anything}]}
Many thanks for your help,
Pablo
Pablo Rodriguez via ntg-context schrieb am 11.05.2022 um 17:57:
AfaIk, there is not "--language" option from the command line. (This
also makes sense to me.)
\doifdocumentargument {language}
{\mainlanguage[\getdocumentargument{language}]}
\starttext
\currentmainlanguage
\stoptext
hineB/techdaten/Ang_techdaten.tex
...
/MakeText/Ang/machineX/techdaten/Ang_techdaten.tex
You can also do this (thatfile.tex):
\starttext
\usepath[/foo/\getdocumentargument{machine}/whatever]
see what we have:
/foo/\getdocumentargument{machine}/whatever
\stoptext
run as:
context thatfil
ument {paperoffset} {
- \definepapersize
- [offset=\getdocumentargument{paperoffset}]
+ \setuppaper
+ [offset=\getdocumentargumentdefault{paperoffset}{0pt}]
}
Wolfgang
___
If your question is of interest to othe
lt=1 --once foo
>
> etc ... so, use --result for the target name and use the same input name
This works just perfect, thank you very much.
I now have template.tex and process it with
context --batch --result=doc-0042 --someparam=21a --once template
which generates precisely the desired doc-0042.pdf
ready. Try this:
% context --whatever=green test
with test.tex:
\starttext
\startluacode
table.print(environment.arguments)
\stopluacode
\stoptext
everything from the command line ends up in environment.arguments.
\doifdocumentargument {whatever} {
... \getdocumentargument{wha
Le 22 février 2019 à 11:08:51, Aditya Mahajan (adit...@umich.edu) a écrit:
Untested. Add quotes around FileName:
> string FileName ;
> FileName := "\getdocumentargument{File}" ;
And not tested successfully !
Thanks a lot A
;
FileName := "\getdocumentargument{File}" ;
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/n
:= \getdocumentargument{File} ;
ThePage := \getdocumentargument{Page} ;
draw textext("\externalfigure[" & FileName &"][page=" & ThePage &"]")
xysized (48in,48in) ;
\stopMPpage
\stoptext
I can get in the MPpage the page number in entry (9 in my example), but n
Somewhat related: I would like to mention that you can get at nearly
anything mentioned on the "context" command line from within your document,
by using \getdocumentargument and \doifdocumentargument .
https://wiki.contextgarden.net/Command/getdocumentargument
On the lua s
<mailto:wolfgang.schuster.li...@gmail.com>> wrote:
\getdocumentargument{...}
\getdocumentargumentdefault{...}{}
Wolfgang
Hans van der Meer schrieb am 08.09.18 um 15:23:
I seem to remember (from a galaxy far far away) that it was possible
to pick up the parameters from the mtxrun call
\getdocumentargument{...}
\getdocumentargumentdefault{...}{}
Wolfgang
Hans van der Meer schrieb am 08.09.18 um 15:23:
I seem to remember (from a galaxy far far away) that it was possible
to pick up the parameters from the mtxrun call that sets ConTeXt
typesetting in motion. For example
At 2017-10-23T17:45:05+02:00, Peter Münster wrote:
> Yes.
> Command: "context --arguments=imagedir=../../foo file"
> File: "\setupexternalfigures[directory=\env{imagedir}]"
Thank you, this works perfectly. It led me also to the
\getvariable{environment}{...},
On 1/4/2017 9:31 PM, Cesar Romani wrote:
I'm using the following code, rotate.tex, to rotate all the pages of
file.pdf, using: context --input=file.pdf --rotation=45 rotate.pdf
rotate.tex
==
\getfiguredimensions [\getdocumentargument{input}]
\starttext
\dorecurse{\noffigure
I'm using the following code, rotate.tex, to rotate all the pages of
file.pdf, using: context --input=file.pdf --rotation=45 rotate.pdf
rotate.tex
==
\getfiguredimensions [\getdocumentargument{input}]
\starttext
\dorecurse{\noffigurepages}
{\startTEXpage
\externalf
you. It works very well.
I did not find this table in any documentation. Did I forget something?
If I want to document it, what is the best place?
- http://wiki.contextgarden.net/Command/getdocumentargument
- another place in the wiki which evokes lua environment tables.
>$ context file.cld --ARG1="My first title"
>
> environment.arguments
Thank you. It works very well.
I did not find this table in any documentation. Did I forget something?
If I want to document it, what is the best place?
- http://wiki.conte
On 3/13/2016 1:43 PM, Romain Diss wrote:
Hi all,
Is it possible to store context command line arguments into lua
variables?
I found http://wiki.contextgarden.net/Command/getdocumentargument but it
only prints the argument. I can not store it for further processing.
What I would like to do is
Hi all,
Is it possible to store context command line arguments into lua
variables?
I found http://wiki.contextgarden.net/Command/getdocumentargument but it
only prints the argument. I can not store it for further processing.
What I would like to do is something like this:
-- start of the
is is a forgotten argument
>
> in luat-ini.mkiv:
>
> \def\getdocumentargument #1{\clf_getdocumentargument{#1}{}}
>
> or wait for a new upload
Many thanks for the fix and the new beta, Hans.
Pablo
--
http://www.ousia.tk
_
, Hans.
I’m afraid that it only works with the code sample I sent.
It doesn’t work with (.log file attached):
contextjit --extra=arrange --printformat=2UP
--paperformat=A4*A3,landscape a.pdf
unrelated ... this is a forgotten argument
in luat-ini.mkiv:
\def\getdocumentargument #1
d. Is it possible to set it with a value I
>> send as a command line parameter?
>
>
> \getdocumentargument{myargument}
My first try did not work, but now it does. Properly made a silly
mistake somewhere.
> of use modes (often more natural)
In this c
On 4/26/2013 2:35 PM, Cecil Westerhof wrote:
2013/4/26 Cecil Westerhof :
I have the following code:
\setvariables[meta][type=cecil]
This variable is hard coded. Is it possible to set it with a value I
send as a command line parameter?
\getdocumentargument{myargument}
of use modes (often
or me).
>
> The best match for what I was sure would be there, is \env{}. I still have no
> idea how it's (semantically) related to --arguments...unless its all Dutch...
>
> Kind regards
>
> Ian
>
> On 10 Sep 2012, at 14:02, Sietse Brouwer wrote:
>
>> Docum
The best match for what I was sure would be there, is \env{}. I still have no
idea how it's (semantically) related to --arguments...unless its all Dutch...
Kind regards
Ian
On 10 Sep 2012, at 14:02, Sietse Brouwer wrote:
> Documented at http://wiki.contextgarden.net/Command/getdocumen
Documented at http://wiki.contextgarden.net/Command/getdocumentargument,
in the category Command/Internals.
--Sietse
On Mon, Sep 10, 2012 at 2:00 PM, Marco Patzer wrote:
> 2012-09-10: Peter Münster
>
>> Then you have to be sure, that --number and --time will never be special
>&
what do I need
> here to write out the next line?
>
> This is full-time.
>
> \stoptext
\starttext
This is \doifdocumentargument{number}{\getdocumentargument{number}} it.
This is \doifdocumentargument{time}{\getdocumentargument{time}} it.
\stoptext
Marco
__
;> And in the test.tex file:
>> variable mykey = <\getvariable{documents.arguments}{fontchoice}>\crlf
>>
>> But that clearly didn't work.
>
>
> \doifdocumentargument {bodyfont}
> {\setupbodyfont[\getdocumentargument{bodyfont}]}
>
> \starttext
&g
getvariable{documents.arguments}{fontchoice}>\crlf
>
> But that clearly didn't work.
\doifdocumentargument {bodyfont}
{\setupbodyfont[\getdocumentargument{bodyfont}]}
\starttext
This document uses
“\doifdocumentargumentelse{bodyfont}{\getdocumentargument{bodyfont}}{Latin
Modern}”
etdocumentargumentdefault{topspace}{0pt},
backspace=\getdocumentargumentdefault{backspace}{0pt},
location=middle,
header=0pt,
footer=0pt]
\doif {\getdocumentargument{marking}} {yes} {
\setuplayout
[marking=on]
}
\doif {\getdocumentargument{interaction}} {yes} {
\setupinter
e looks like
... usual xml setups using workers.xml ...
\xmlfilter
{main}
{worker[position()==\getdocumentargument{worker}]}
{xml:worker}
... special worker setup
\startxmlsetup xml:worker
...
\stopxmlsetup
etc etc
Hans
-
35 matches
Mail list logo