Hans Hagen
Sorry, cut and paste error (I added the comma on line 21). The underlying error is still there
in that case i need a minimal file showing the problem
I am not Guy Worthington, but I had a (non successful) look at it and this is my testing file: ================================================== \setuphead[chapter] [alternative=command, command=\ContentsHead] \def\ContentsHead#1#2% {\framed [width=\hsize]{\doifelsenothing{#1}{a}{b}}} \starttext \chapter {Berend} \stoptext ================================================== Error: ! Extra \else. \dodododosomekop ...section {#1}{#3}{#4}\fi \else \getvalue {\??ko #1\c!tuss... l.10 \chapter {Berend} There is even something weired when removing width=\hsize in the framed macro: ! Undefined control sequence. \exitloop ->\let \endofloop \nodoloop <argument> ...>\zeropoint \unskip \else \exitloop \fi \doloop ...@@arecurse \recursedepth \endcsname {#1