Following up on the other imposition question, I'm trying to make an
example file that shows an imposition schema according to command line
arguments.
This way it works for the number of pages, 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{\doifelsedocumentargument{numberofpages}{\getdocumentargument{numberofpages}}{16}}
\setuparranging[\Schema]
Find the full example attached, I call it like
context --autopdf=auto --arrange impositiontest.tex --schema=TRYPTICHON
--numberofpages=32
Hraban
% context --autopdf=auto --arrange --arguments=schema=2\*4,pages=16
\def\Schema{\doifelsedocumentargument{schema}{\getdocumentargument{schema}}{1*8}}
\def\Pages{\doifelsedocumentargument{numberofpages}{\getdocumentargument{numberofpages}}{16}}
\setuppapersize[A9,landscape][A7,landscape]
\setuparranging[\Schema]
\setupbodyfont[ss,10pt]
\setuplayout[margin=0pt, width=fit, header=2.8ex, footer=2.8ex]
\setupalign[middle,hilo]
\setuppagenumbering [alternative=doublesided,location=footer]
\setupheadertexts[\CONTEXT\ imposition test]
\showframe
\setupbackgrounds [text][text][background=color,backgroundcolor=lightgray]
% Where the block of pages is placed on the sheet
% (relevant if there is space left over.)
\setuplayout [location=middle,marking=on]
\startbuffer[Fakepage]
\strut
\blank
\bold{[\Schema]}
\vfill
This is page \recurselevel
\vfill
\stopbuffer
\starttext
\dorecurse{\Pages}{\getbuffer[Fakepage]\page}
\stoptext
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________