From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/80458 Path: news.gmane.org!not-for-mail From: Jean-Philippe Rey Newsgroups: gmane.comp.tex.context Subject: setuphead command "! Argument of \xxx has an extra }." Date: Fri, 25 Jan 2013 16:52:20 +0100 Message-ID: <65C9414A-C679-4840-BE01-4041D4E8BB7B@ecp.fr> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1359129164 29747 80.91.229.3 (25 Jan 2013 15:52:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Jan 2013 15:52:44 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Fri Jan 25 16:53:04 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TylaS-0001NV-BT for gctc-ntg-context-518@m.gmane.org; Fri, 25 Jan 2013 16:53:04 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B2B4E10242; Fri, 25 Jan 2013 16:52:46 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id q-+UpeuLiIVB; Fri, 25 Jan 2013 16:52:37 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 98008101FD; Fri, 25 Jan 2013 16:52:37 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 54563101FD for ; Fri, 25 Jan 2013 16:52:36 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id fG0VxmzME97g for ; Fri, 25 Jan 2013 16:52:30 +0100 (CET) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by balder.ntg.nl (Postfix) with ESMTP id 9976F101FC for ; Fri, 25 Jan 2013 16:52:30 +0100 (CET) Original-Received: from smtp1.ecp.fr (smtp1.ecp.fr [138.195.33.45]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r0PFqLfu020520 for ; Fri, 25 Jan 2013 16:52:22 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by smtp1.ecp.fr (Postfix) with ESMTP id 2F2F480D7; Fri, 25 Jan 2013 16:52:21 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at smtp1.ecp.fr Original-Received: from smtp1.ecp.fr ([127.0.0.1]) by localhost (smtp1.ecp.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qm+ck-lma0TB; Fri, 25 Jan 2013 16:52:21 +0100 (CET) Original-Received: from voiles.ccs.ecp.fr (voiles.ccs.ecp.fr [138.195.37.216]) (Authenticated sender: jean-philippe.rey@ecp.fr) by smtp1.ecp.fr (Postfix) with ESMTPSA id 14BDC80BE; Fri, 25 Jan 2013 16:52:21 +0100 (CET) X-Mailer: Apple Mail (2.1283) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=138.195.33.45; country=FR; latitude=46.0000; longitude=2.0000; http://maps.google.com/maps?q=46.0000,2.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0TIQfQldP - dc177a0411fb - 20130125 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:80458 Archived-At: Hi, I am trying to use a homemade command to display chapter heads but I system= atically get the following error: ! Argument of \ChapterHead has an extra }. Here is my minimal example \def\ChapterHead#1#2{#1 --- #2} \setuphead[chapter][command=3D\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 1= 6:47 MKIV) and also with 2012.11.22 14:55 MKIV. I tried \setuphead[chapter][alternative=3Dcommand,command=3D\ChapterHead] and \startchapter ... \stopchapter but still get the same error. You will find below the content of the log file produced by my minimal exam= ple. Thanks for your help. (/Users/jprey/ConTeXt-2013.01.24/tex/texmf-context/tex/context/base/cont-ye= s.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-ne= w.mkiv system > beware: some patches loaded from cont-new.mkiv ) system > files > jobname: test-setuphead, input: test-setuphead, r= esult: 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 =3D true % input =3D ./test-setuphead.tex % fulljobname =3D ./test-setuphead.tex % currentrun =3D 1 % no-parse-first-line =3D true % arrange =3D true % script =3D true % synctex =3D true % kindofrun =3D 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: Argumen= t of ... 1 \def\ChapterHead#1#2{#1 --- #2} 2 \setuphead[chapter][command=3D\ChapterHead] 3 \starttext 4 >> \chapter{Hello} 5 Some text 6 \stoptext 7 = = \par = = } \strc_rendering_inject_number_and_text ...ommand } \ifx \p_command \empty \d= i... \strc_rendering_place_head_number_and_text ...ext = }\fi \strc_rendering_stop= _... \strc_sectioning_handle ...e_head_number_and_text = \else \strc_rendering_pla= c... l.4 \chapter{Hello} = ? = ! Emergency stop. system > tex > error on line 4 in file test-setuphead.tex: Emergen= cy stop ... 1 \def\ChapterHead#1#2{#1 --- #2} 2 \setuphead[chapter][command=3D\ChapterHead] 3 \starttext 4 >> \chapter{Hello} 5 Some text 6 \stoptext 7 = = \par = = } \strc_rendering_inject_number_and_text ...ommand } \ifx \p_command \empty \d= i... \strc_rendering_place_head_number_and_text ...ext = }\fi \strc_rendering_stop= _... \strc_sectioning_handle ...e_head_number_and_text = \else \strc_rendering_pla= c... l.4 \chapter{Hello} = End of file on the terminal! ! =3D=3D> Fatal error occurred, no output PDF file produced! -- = Jean-Philippe Rey Professeur - =C9cole Centrale Paris jean-philippe.rey@ecp.fr 92295 Ch=E2tenay-Malabry Cedex - France Empreinte PGP : 807A 5B2C 69E4 D4B5 783A 428A 1B5E E83E 261B BF51 ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________