From: John Devereux <john@devereux.me.uk>
To: ntg-context@ntg.nl
Subject: setuphead broken?
Date: Thu, 13 Sep 2012 11:14:30 +0100 [thread overview]
Message-ID: <87r4q6rzzt.fsf@devereux.me.uk> (raw)
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
<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.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
___________________________________________________________________________________
next reply other threads:[~2012-09-13 10:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-13 10:14 John Devereux [this message]
2012-09-13 10:27 ` Wolfgang Schuster
2012-09-13 11:49 ` John Devereux
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=87r4q6rzzt.fsf@devereux.me.uk \
--to=john@devereux.me.uk \
--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).