ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Guy Worthington <guyw@multiline.com.au>
Subject: Re: typesetting chapter--label for cross references
Date: 12 Mar 2003 21:06:57 +0800	[thread overview]
Message-ID: <uy93k3f9q.fsf@multiline.com.au> (raw)
In-Reply-To: <5.1.0.14.1.20030312002231.02499ec0@server-1>

Hans Hagen wrote:
> Guy Worthington wrote:

>> I'd like to display a cross reference, using a en-dash to separate
>> the chapter number from the text being cross referenced.

> This is a mixture of a bug and feature.

I don't understand what you did to patch the bug, but I can certainly
appreciate the feature.  I get a lot of pleasure when I trip across
these types of electric macros.

-----
%output=pdf

\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

\definesymbol[MySep][--]

\defineenumeration
  [example]
  [location=serried,
   text=Example,
   before=\blank,
   after=\blank,
   way=bychapter,
   style=italic,
   separator={\symbol[MySep]}]

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

      reply	other threads:[~2003-03-12 13:06 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
2003-03-12 13:06   ` Guy Worthington [this message]

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=uy93k3f9q.fsf@multiline.com.au \
    --to=guyw@multiline.com.au \
    --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).