ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: Gerion Entrup <gerion.entrup@flump.de>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Re: setuphead in connection with the command argument
Date: Mon, 3 Jun 2024 00:05:22 +0200	[thread overview]
Message-ID: <fe64ade0-f6b4-1184-5bae-c20817b9795e@gmail.com> (raw)
In-Reply-To: <2603727.72vocr9iq0@falbala>

Gerion Entrup schrieb am 01.06.2024 um 16:34:
> Am Samstag, 1. Juni 2024, 09:53:46 MESZ schrieb Wolfgang Schuster:
>> Gerion Entrup schrieb am 31.05.2024 um 00:37:
>>> What, if I define multiple of them? Is the system not made for this?
>>
>> Multiple of what?
> 
> When I define `alternative=` _and_ `command=` in the same `\setuphead`.
> Or `alternative=` and `style=`, or `alternative=` and `command=`.
> 
> I guess style is applied just to the arguments/macros of the command/the alternative?
> And combining alternative and command never make sense.

The following descriptions applies to most setup commands when exclude 
special cases like \setupbodyfont or \setuplayout.


When you make multiple changes to the values of a command with

     \setuphead [section] [style=bold]

and

    \setuphead [section] [color=blue]

you achieve the same result as setting both values at the same time like

    \setuphead [section] [style=bold,color=blue]


What you're doing here is just passing some value to a parameter, 
nothing else happens at this time. When you process a document Context 
has already passed the value "normal" to the "alternative" parameter in 
the \setuphead command. When you now pass a custom macro the "command" 
parameter in \setuphead all you have done is to set a value, nothing 
else happened at this point.


The evaluation of the parameter happens when Context places the content 
of a heading with \startchapter etc. in your document and only at this 
point it has to make a decision what should happen when both "command" 
and "alternative" are set. The order in which the parameters are used is 
the following: a) check if the "command" parameter has a value and if 
this is true is it and ignore the "alternative" value b) if no value is 
present for the "command" parameter use the value of "alternative".


The value of the "style" parameter is unrelated of the 
command/alternative values because it isn't needed to choose a layout 
for the heading, all the parameter does is to change the font/style 
which is independent of the layout.


Wolfgang
___________________________________________________________________________________
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-06-02 22:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-30 14:15 [NTG-context] " Gerion Entrup
2024-05-30 14:25 ` [NTG-context] " Gerion Entrup
2024-05-30 20:54   ` Wolfgang Schuster
2024-05-30 22:37     ` Gerion Entrup
2024-06-01  7:53       ` Wolfgang Schuster
2024-06-01 14:34         ` Gerion Entrup
2024-06-02 22:05           ` Wolfgang Schuster [this message]
2024-06-03 11:36             ` Gerion Entrup
2024-06-03 13:13               ` Hans Hagen via ntg-context
2024-06-06 10:14                 ` Gerion Entrup
2024-05-30 16:49 ` Bruce Horrocks
2024-05-30 22:25   ` Gerion Entrup
2024-05-30 22:40     ` Bruce Horrocks
     [not found] <e405fddb4b534eb68f0be12a3a153c4e@AS8P194MB2116.EURP194.PROD.OUTLOOK.COM>
2024-05-30 14:47 ` Tomáš Hála
2024-05-30 15:04   ` Gerion Entrup

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=fe64ade0-f6b4-1184-5bae-c20817b9795e@gmail.com \
    --to=wolfgang.schuster.lists@gmail.com \
    --cc=gerion.entrup@flump.de \
    --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).