Hi, I am trying to use a homemade command to display chapter heads but I systematically get the following error: ! Argument of \ChapterHead has an extra }. Here is my minimal example \def\ChapterHead#1#2{#1 --- #2} \setuphead[chapter][command=\ChapterHead] \starttext \chapter{Hello} Some text \stoptext This example works fine with MKII and with the texlive 2012 version of MKIV (ConTeXt ver: 2012.05.30 11:26). It fails with the last beta (2013.01.24 16:47 MKIV) and also with 2012.11.22 14:55 MKIV. I tried \setuphead[chapter][alternative=command,command=\ChapterHead] and \startchapter ... \stopchapter but still get the same error. You will find below the content of the log file produced by my minimal example. Thanks for your help. (/Users/jprey/ConTeXt-2013.01.24/tex/texmf-context/tex/context/base/cont-yes.mkiv ConTeXt ver: 2013.01.24 16:47 MKIV fmt: 2013.1.25 int: english/english system > cont-new.mkiv loaded (/Users/jprey/ConTeXt-2013.01.24/tex/texmf-context/tex/context/base/cont-new.mkiv system > beware: some patches loaded from cont-new.mkiv ) system > files > jobname: test-setuphead, input: test-setuphead, result: test-setuphead fonts > latin modern fonts are not preloaded languages > language en is active (test-setuphead.tex{/Users/jprey/ConTeXt-2013.01.24/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map} fonts > preloading latin modern fonts (second stage) fonts > typescripts > unknown: library 'loc' {/Users/jprey/ConTeXt-2013.01.24/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/Users/jprey/ConTeXt-2013.01.24/tex/texmf/fonts/map/dvips/lm/lm-rm.map} fonts > fallback modern rm 12pt is loaded % begin of command line arguments % % noarrange = true % input = ./test-setuphead.tex % fulljobname = ./test-setuphead.tex % currentrun = 1 % no-parse-first-line = true % arrange = true % script = true % synctex = true % kindofrun = 1 % % end of command line arguments % begin of command line files % % 1 ./test-setuphead.tex % % end of command line files structure > sectioning > chapter @ level 2: 0.1 -> Hello ! Argument of \ChapterHead has an extra }. system > tex > error on line 4 in file test-setuphead.tex: Argument of ... 1 \def\ChapterHead#1#2{#1 --- #2} 2 \setuphead[chapter][command=\ChapterHead] 3 \starttext 4 >> \chapter{Hello} 5 Some text 6 \stoptext 7 <inserted text> \par <to be read again> } \strc_rendering_inject_number_and_text ...ommand } \ifx \p_command \empty \di... \strc_rendering_place_head_number_and_text ...ext }\fi \strc_rendering_stop_... \strc_sectioning_handle ...e_head_number_and_text \else \strc_rendering_plac... l.4 \chapter{Hello} ? ! Emergency stop. system > tex > error on line 4 in file test-setuphead.tex: Emergency stop ... 1 \def\ChapterHead#1#2{#1 --- #2} 2 \setuphead[chapter][command=\ChapterHead] 3 \starttext 4 >> \chapter{Hello} 5 Some text 6 \stoptext 7 <inserted text> \par <to be read again> } \strc_rendering_inject_number_and_text ...ommand } \ifx \p_command \empty \di... \strc_rendering_place_head_number_and_text ...ext }\fi \strc_rendering_stop_... \strc_sectioning_handle ...e_head_number_and_text \else \strc_rendering_plac... l.4 \chapter{Hello} End of file on the terminal! ! ==> Fatal error occurred, no output PDF file produced! -- Jean-Philippe Rey Professeur - École Centrale Paris jean-philippe.rey@ecp.fr 92295 Châtenay-Malabry Cedex - France Empreinte PGP : 807A 5B2C 69E4 D4B5 783A 428A 1B5E E83E 261B BF51