ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hraban Ramm <texml@fiee.net>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Re: command line arguments
Date: Wed, 20 Mar 2024 10:10:20 +0100	[thread overview]
Message-ID: <265d0261-5973-454c-bbca-252ab162a1b5@fiee.net> (raw)
In-Reply-To: <73d7f870-5f12-fe3a-e139-6df6578b8c79@gmail.com>


Am 19.03.24 um 23:53 schrieb Wolfgang Schuster:
> Hraban Ramm schrieb am 19.03.2024 um 21:41:
>> 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?
>
> You forgot about expansion and in your case \doifelsedocumentargument 
> is not fully expandable. This doesn't matter for \dorecurse 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{\doifelsedocumentargument{numberofpages}{\getdocumentargument{numberofpages}}{16}} 
>>
>>
>> \setuparranging[\Schema]
>
> \doifelsedocumentargument{schema}
>   {\setuparranging[\getdocumentargument{schema}]}
>   {\setuparranging[1*8]}

Ok, that works. (Of course, if you say so.)

>
> It does also help to look at the included extra files (e.g. 
> mtx-context-arrange.tex) written by Hans.
>
Well, I don’t know how to use that, it doesn’t compile on its own, any 
hints?

Hraban

___________________________________________________________________________________
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-20  9:13 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 ` [NTG-context] " Willi Egger
2024-03-19 22:53 ` Wolfgang Schuster
2024-03-20  9:10   ` Hraban Ramm [this message]

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=265d0261-5973-454c-bbca-252ab162a1b5@fiee.net \
    --to=texml@fiee.net \
    --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).