ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Willi Egger <w.egger@boede.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Re: command line arguments
Date: Tue, 19 Mar 2024 23:46:35 +0100	[thread overview]
Message-ID: <01CED7C4-5A48-4A43-8CB9-938AE630C865@boede.nl> (raw)
In-Reply-To: <746e4120-6ee7-49df-a587-3cbafb4dec91@fiee.net>

[-- Attachment #1: Type: text/plain, Size: 286 bytes --]

Hello Hraban,

I puzzled a while. To me the —arguments= option does not work. I saw then on the Wiki, that one can also add documentarguments as —schema=2UP —numberofpages=16.

I further changed to \startdocument … \stopdocument.

Please look at the attached file

Willi

[-- Attachment #2: impositiontest-2.tex --]
[-- Type: application/octet-stream, Size: 1249 bytes --]

% context --autopdf=auto --schema=2\*4\*2 --numberofpages=16
 %\def\Schema{\doifelsedocumentargument{schema}{\getdocumentargument{schema}}{1*8}}
%\def\Pages{\doifelsedocumentargument{numberofpages}{\getdocumentargument{numberofpages}}{16}}

\setuppapersize[A9,landscape][A7,landscape]

\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{[\documentvariable{Schema}]}
    \vfill
    This is page \recurselevel
    \vfill
\stopbuffer


\startdocument
   [Schema={\getdocumentargument{schema}}, %{1*8},
	  Nofpages=\doifelsedocumentargument%
	   {numberofpages}{\getdocumentargument{numberofpages}}{1}]
	
\setuparranging[\documentvariable{Schema}]	
	
	% Contents of Documentvariable "Schema" = \documentvariable{Schema}
	
  \dorecurse{\documentvariable{Nofpages}}{\getbuffer[Fakepage]\page}
\stopdocument

[-- Attachment #3: Type: text/plain, Size: 1384 bytes --]



> On 19 Mar 2024, at 21:41, Hraban Ramm <texml@fiee.net> wrote:
> 
> 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
> 
> <impositiontest.tex>___________________________________________________________________________________
> 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
> ___________________________________________________________________________________


[-- Attachment #4: Type: text/plain, Size: 511 bytes --]

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

  reply	other threads:[~2024-03-19 22:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-19 20:41 [NTG-context] " Hraban Ramm
2024-03-19 22:46 ` Willi Egger [this message]
2024-03-19 22:53 ` [NTG-context] " Wolfgang Schuster
2024-03-20  9:10   ` Hraban Ramm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=01CED7C4-5A48-4A43-8CB9-938AE630C865@boede.nl \
    --to=w.egger@boede.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).