From: Philipp Gesang <gesang@stud.uni-heidelberg.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Registers with distinguishable entries.
Date: Thu, 26 Apr 2012 12:53:57 +0200 [thread overview]
Message-ID: <20120426105357.GB1250@phlegethon> (raw)
In-Reply-To: <CEBC3611-1BD4-428A-B75F-ED41A2F3DB09@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1630 bytes --]
Hi Robert,
On 2012-04-26 12:07, Robert Blackstone wrote:
> In many books page numbers indicating illustrations are set in italics. Pagenumbers indicating foot- or endnotes often have a suffix "n".
This I’d like to have in Context, too.
> Furthermore, when an indexed item is discussed on a number of consecutive pages, usually a range is given in the index, like 144-53, or 143 ff.
You want the “compress” switch in placeregister, or indicate
ranges with \{start,stop}register:
········································································
\defineregister [demo] [demoes]
\starttext
\demo{Demoitem} foo
\page[yes]
\demo{Demoitem} foo
\page[yes]
%%% Here’s the range; should work without “compress”
\startregister[demo][demorange]{Demorange}
\demo{Demoitem} foo
\page[yes]
\demo{Otheritem} bar
\page[yes]
\demo{Otheritem} bar
\page[yes]
\stopregister[demo][demorange]%% <= you’ll need to explicitly terminate the ranges so they can overlap
\demo{Otheritem} bar
\page[yes]
\demo{Demoitem} foo
\page[yes]
\demo{Demoitem} foo
\page[yes]
%%%% Here’s the relevant bit:
\placeregister [demo] [compress=yes]
\stoptext
········································································
Btw. have you read the small print: http://wiki.contextgarden.net/Registers#Tricks ?
Regards
Philipp
--
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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 prev parent reply other threads:[~2012-04-26 10:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-26 10:07 Robert Blackstone
2012-04-26 10:18 ` S Barmeier
2012-04-26 13:14 ` Alan BRASLAU
2012-04-27 8:58 ` S Barmeier
2012-04-26 10:53 ` Philipp Gesang [this message]
2012-04-26 17:44 Robert Blackstone
2012-04-26 17:59 Robert Blackstone
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=20120426105357.GB1250@phlegethon \
--to=gesang@stud.uni-heidelberg.de \
--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).