From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/78260 Path: news.gmane.org!not-for-mail From: John Devereux Newsgroups: gmane.comp.tex.context Subject: setuphead broken? Date: Thu, 13 Sep 2012 11:14:30 +0100 Message-ID: <87r4q6rzzt.fsf@devereux.me.uk> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1347531287 15820 80.91.229.3 (13 Sep 2012 10:14:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Sep 2012 10:14:47 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Thu Sep 13 12:14:49 2012 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 1TC6Rd-0003oH-Ap for gctc-ntg-context-518@m.gmane.org; Thu, 13 Sep 2012 12:14:49 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3603E101F8; Thu, 13 Sep 2012 12:14:43 +0200 (CEST) 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 Rm9wRr3irqAL; Thu, 13 Sep 2012 12:14:37 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 7A951101E9; Thu, 13 Sep 2012 12:14:37 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 8F36F101E9 for ; Thu, 13 Sep 2012 12:14:36 +0200 (CEST) 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 4bjEPk4NU0WL for ; Thu, 13 Sep 2012 12:14:35 +0200 (CEST) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by balder.ntg.nl (Postfix) with ESMTP id 99FC3101E7 for ; Thu, 13 Sep 2012 12:14:35 +0200 (CEST) Original-Received: from devereux.me.uk (devereux.me.uk [217.169.15.178]) by filter3-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q8DAEVtC013766 for ; Thu, 13 Sep 2012 12:14:33 +0200 Original-Received: from devereux.me.uk ([217.169.15.178] ident=jd) by devereux.me.uk with esmtp (Exim 4.72) (envelope-from ) id 1TC6RK-0007zU-GS for ntg-context@ntg.nl; Thu, 13 Sep 2012 11:14:30 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=217.169.15.178; country=GB; region=O9; city=Leyton; latitude=51.5667; longitude=-0.0167; http://maps.google.com/maps?q=51.5667,-0.0167&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 06HWyewmg - 5a0f4428af7e - 20120913 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.219 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:78260 Archived-At: Hi, \setuphead seems to be broken for me in recent context (following upgrade of a ~year-old system). Problem happens when use the command= key. An example from the wiki fails, as does my own code. mtx-context | ConTeXt Process Management 0.60 mtx-context | mtx-context | main context file: /opt/context/tex/texmf-context/tex/context/base/context.mkiv mtx-context | current version: 2012.09.10 00:57 ====================================================================== \setuppapersize[A5] \setupexternalfigures[location=default] % needed only for the wiki to the find the figure \useexternalfigure[section-1][cow][width=5cm,height=1cm] \useexternalfigure[section-2][mill.png][width=5cm,height=1cm] \setuphead [section] [command=\MySectionCommand] \setuphead [subsection] [command=] \def\MySectionCommand#1#2% {\externalfigure[section-\currentheadnumber]} \starttext \section{One} \subsection{First subsection of Section One} \section{Two} \stoptext ====================================================================== ERROR: Argument of \MySectionCommand has an extra }. --- TeX said --- system > tex > error on line 19 in file test2.tex: Argument of ... 9 [command=\MySectionCommand] 10 \setuphead 11 [subsection] 12 [command=] 13 14 \def\MySectionCommand#1#2% 15 {\externalfigure[section-\currentheadnumber]} 16 17 \starttext 18 19 >> \section{One} 20 \subsection{First subsection of Section One} 21 \section{Two} 22 23 \stoptext \par } \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.19 \section{One} --- HELP --- >From the .log file... I've run across a `}' that doesn't seem to match anything. For example, `\def\a#1{...}' and `\a}' would produce this error. If you simply proceed now, the `\par' that I've just inserted will cause me to report a runaway argument that might be the root of the problem. But if your `}' was spurious, just type `2' and it will go away. ====================================================================== -- John Devereux ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________