Hans Hagen wrote:
Patrick Gundlach wrote:
[a sensible and minimal test case]
================================================== \setuphead[chapter] [alternative=command, command=\ContentsHead]
\def\ContentsHead#1#2% {\framed [width=\hsize]{\doifelsenothing{#1}{a}{b}}}
\starttext \chapter {Berend} \stoptext ==================================================
...\ContentsHead gets a truckload of rubbish passed (add \showargument{#1} and you see what i mean) and this confuses tex when testing things (if..else in argument); even if i would solve this, other *user) code could mess up things; this is why we have (inside a head):
\doifmodeelse{*sectionnumber}
Thanks Patrick for generating the minimal test case. (Hans I promise I'll do my own homework from now on.) Replacing \doifelsenothing{#1} with \doifmodeelse{*sectionnumber} does cure the problem. ----- \setuphead[chapter] [alternative=command, command=\ContentsHead] \def\ContentsHead#1#2% {\framed [width=\hsize]{\doifmodeelse{*sectionhead}{a}{b}}} \starttext \chapter {Berend} \stoptext -----