I've seen the
alternative keyword used throughout ConTeXt:
I assumed that it was just a popular keyword: an enumeration hardcoded into each macro definition, like:
def setuplist(alternative="a", ...): if alternative == "a": doAlternativeA elif alternative == "b": doAlternativeB elif alternative == "c": doAlternativeC elif alternative == "d": doAlternativeD
However the answer to ConTeXt: avoid enumeration items across pages defines a completely new alternative. This implies that alternatives in ConTeXt are a generic macro hook rather than per-macro keywords.
\defineuserdataalternative [itemize] [renderingsetup=userdata:itemize] \defineuserdata [item] [alternative=itemize]
So what does the
alternative keyword mean? At what stage is it used or called? What is its scope; what does it do?
Then there is the
renderingsetup keyword for which I have the same questions. Is it specific to only a subset of ConTeXt macros or is it a generic macro hook? I assume it allows modification of the underlying TeX code before page rendering starts. How does that differ from the usual
command= keyword? Why must it be defined via an alternative rather than directly?