From: Florian Grammel <florian.grammel@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: compressing register ranges
Date: Fri, 16 Jun 2017 23:06:00 +0200 [thread overview]
Message-ID: <438C23C3-4F39-4CC6-84A3-9CEC200B97ED@gmail.com> (raw)
In-Reply-To: <013B24C2-C880-4754-B882-541C89FBD61C@fiee.net>
[-- Attachment #1.1: Type: text/plain, Size: 1519 bytes --]
>> Using [compress=all] for registers yields somewhat puzzling results (1.0.4 (TeX Live 2017)).
>> I would expect the register of the following code to become one single range "1--7", though context produces "1--2, 3--7".
>> Is this the expected behaviour?
>> And if so: is there another switch to get the ranges to be collapsed completely?
>>
>> Also: There wouldn't be a shorthand to define explicit ranges? LaTeX has \index{Demorange|(} to \index{Demorange|)} which is actually very convenient.
>
> ConTeXt has \startregister, see http://wiki.contextgarden.net/Registers#Collapse_Page_Numbers
I shoud probably have been more specific: While \startregister as such works for me, it
1) isn't collapsed as expected together with ordinary single register-entries (my main problem, cf mwe below)
2) is a bit cumbersome to use as it requires the user to keep track of keys, as explained in your link from contextgarden.
Best,
Florian.
>
> \defineregister [demo] [demoes]
> \starttext
>
> 1
> \demo{Demorange}
>
> \page[yes]
>
> 2
> \demo{Demorange}
>
> \page[yes]
>
> 3
> \startregister[demo][demorange]{Demorange}
>
> \page[yes]
>
> 4
> \demo{Demorange}
>
> \page[yes]
>
> 5
>
> \page[yes]
>
> 6
> \stopregister[demo][demorange]
>
> \page[yes]
>
> 7
> \demo{Demorange}
>
> \page[yes]
>
> \placeregister [demo] [compress=all]
>
> \stoptext
____________________________________________
Florian Grammel
Copenhagen, Denmark
[-- Attachment #1.2: Type: text/html, Size: 6014 bytes --]
[-- Attachment #2: Type: text/plain, Size: 492 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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
prev parent reply other threads:[~2017-06-16 21:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-16 15:42 Florian Grammel
2017-06-16 20:00 ` Henning Hraban Ramm
2017-06-16 21:06 ` Florian Grammel [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=438C23C3-4F39-4CC6-84A3-9CEC200B97ED@gmail.com \
--to=florian.grammel@gmail.com \
--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).