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