From: Hans Hagen <pragma@wxs.nl>
Subject: Re: typesetting chapter--label for cross references
Date: Wed, 12 Mar 2003 00:24:51 +0100 [thread overview]
Message-ID: <5.1.0.14.1.20030312002231.02499ec0@server-1> (raw)
In-Reply-To: <u8yw6nl08.fsf_-_@multiline.com.au>
At 04:25 PM 2/24/2003 +0800, you wrote:
>I'd like to display a cross reference, using a en-dash to separate the
>chapter number from the text being cross referenced. In the example
>below, if you look at label attached to the example caption "A Sample
>XML file," you'll see that it is typeset as
>
> Example~1--1
>
>however if you look at the cross reference to the example, it is
>typeset as
>
> Example~1.1
>
>how do I change the period (.) separator in the cross reference to an
>en-dash separator (--).
>
>-----
>
>\defineenumeration
> [example]
> [location=serried,
> text=Example,
> before=\blank,
> after=\blank,
> way=bychapter,
> style=italic,
> separator=--]
>
>\starttext
>
>\chapter{One}
>
>\in{Example}[ex:Simple-doc] has the chapter number separated from the
>example number by a period, and not an en-dash.
>
>\example[ex:Simple-doc] A Sample XML file
>
>\startXML
><?xml version="1.0"?>
><?xml-stylesheet href="simple-doc.xsl" type="text/xsl"?>
>\stopXML
>
>\stoptext
This is a mixture of a bug and feature. I'm not sure if the following patch
is completely safe (so i'll have to test it for a while)
\unprotect
\def\preparethenumber#1#2#3% {\??id#1} \number \result
{\doifelsevaluenothing{#1\c!scheider}
{\let\numberseparator\empty
\let#3#2}
{\edef\numberseparator{\getvalue{#1\c!scheider}}%
\edef#3{\@EA\separatednumber\@EA{#2}}}} % hm, etex
\protect
the best way to handle sep's is
\definesymbol[MySep][--]
separator={\symbol[MySep]}
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | pragma@wxs.nl
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
information: http://www.pragma-ade.com/roadmap.pdf
documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------
next prev parent reply other threads:[~2003-03-11 23:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-24 8:25 Guy Worthington
2003-03-11 23:24 ` Hans Hagen [this message]
2003-03-12 13:06 ` Guy Worthington
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=5.1.0.14.1.20030312002231.02499ec0@server-1 \
--to=pragma@wxs.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).