ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Jean-Philippe Rey <jean-philippe.rey@ecp.fr>
To: ntg-context@ntg.nl
Subject: setuphead command "! Argument of \xxx has an extra }."
Date: Fri, 25 Jan 2013 16:52:20 +0100	[thread overview]
Message-ID: <65C9414A-C679-4840-BE01-4041D4E8BB7B@ecp.fr> (raw)

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




___________________________________________________________________________________
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
___________________________________________________________________________________


             reply	other threads:[~2013-01-25 15:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-25 15:52 Jean-Philippe Rey [this message]
2013-01-25 16:00 ` Marco Patzer
2013-01-25 17:30   ` Jean-Philippe Rey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=65C9414A-C679-4840-BE01-4041D4E8BB7B@ecp.fr \
    --to=jean-philippe.rey@ecp.fr \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).