From: Andres Loeh <andres@cs.uu.nl>
Cc: ntg-context@ntg.nl
Subject: Re: [ConTeXt] Re: pictures for numbers
Date: Fri, 16 Nov 2001 16:06:37 +0100 [thread overview]
Message-ID: <20011116160637.G29519@cs.uu.nl> (raw)
In-Reply-To: <5.1.0.14.1.20011116125114.02eebb88@server-1>; from pragma@wxs.nl on Fri, Nov 16, 2001 at 12:53:14PM +0100
> Date: Fri, 16 Nov 2001 12:53:14 +0100
> From: Hans Hagen <pragma@wxs.nl>
> Subject: [ConTeXt] Re: pictures for numbers
Hello again,
thanks for your help so far. I tried to construct a solution out of
Taco's and your remarks, and I got that far:
%--BEGIN
\useexternalfigure [sleutelI] [sleutelsI_new] [height=3ex]
\useexternalfigure [sleutelV] [sleutelsV_new] [height=3ex]
\useexternalfigure [sleutelX] [sleutelsX_new] [height=3ex]
\def\Sleutels#1%
{\hbox{\expandafter\DoSleutels\romannumeral #1\relax}\relax}
\def\DoSleutels#1%
{\if #1\relax
\let\next\relax
\else
\if #1i%
\externalfigure[sleutelI]
\else
\if #1v%
\externalfigure[sleutelV]
\else
\if #1x%
\externalfigure[sleutelX]
\else
\relax
\fi
\fi
\fi
\let\next\DoSleutels
\fi
\next}
%(1)% \setuphead[chapter][numbercommand=\Sleutels]
%(2)% \defineconversion[sleutels][\Sleutels]
%(2)% \setupsection [section-2] [conversion=sleutels]
\starttext
\Sleutels{34}
\chapter {Test}
\stoptext
%--END
The generation of the pictures works perfectly as
a standalone function. However, I want them to appear
as chapter numbers. If I uncomment either the line marked
%(1)% or the lines marked %(2)%, I get errors:
(1):
! Missing number, treated as zero.
<to be read again>
\edef
\setstrutdimen ...strutdimen =#3\strutdimen \edef
#1{\the \strutdimen }
\setstrut ...ht \strutheightfactor \spacingfactor
\setstrutdimen \strutdepth...
<argument> \setstrut
\begstrut \sectiebloklabel {\v!hoofdstuk }{\finalsectio...
\Sleutels ...andafter \DoSleutels \romannumeral #1
\relax }\relax
<argument> ...k }{\finalsectionnumber }\endstrut }
\else \getvalue {\??ko \v!...
..
l.39 \chapter {Test}
(2):
! Extra \else.
\DoSleutels ...f #1\relax \let \next \relax \else
\if #1i\externalfigure [sl...
\DoSleutels ...\fi \fi \let \next \DoSleutels \fi
\next
<to be read again>
\relax
\Sleutels ...r \DoSleutels \romannumeral #1\relax
}\relax
\@@sectionconversion ...??se #1\c!conversie }}{#2}
\fi \else \getvalue {\??cv...
\@@shortsectionnumber ...#1}{\@@sectionvalue {#1}}
\fi \else \@@sectionconver...
..
l.39 \chapter {Test}
What am I doing wrong? [I am using the ConTeXt version from the
newest TeXLive CD.]
Groeten,
Andres
--
Andres Loeh, Universiteit Utrecht
mailto:andres@cs.uu.nl mailto:mail@andres-loeh.de
http://www.andres-loeh.de
next prev parent reply other threads:[~2001-11-16 15:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-16 9:55 Andres Loeh
2001-11-16 10:36 ` Taco Hoekwater
2001-11-16 11:55 ` Hans Hagen
2001-11-16 11:53 ` Hans Hagen
2001-11-16 15:06 ` Andres Loeh [this message]
2001-11-16 16:37 ` [ConTeXt] " Hans Hagen
2001-11-16 15:29 ` Andres Loeh
2001-11-16 16:38 ` Hans Hagen
[not found] <Your message of "Fri, 16 Nov 2001 16:06:37 +0100." <20011116160637.G29519@cs.uu.nl>
2001-11-16 15:47 ` [ConTeXt] " Patrick Gundlach
2001-11-16 16:48 ` Hans Hagen
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=20011116160637.G29519@cs.uu.nl \
--to=andres@cs.uu.nl \
--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).