ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* compressing register ranges
@ 2017-06-16 15:42 Florian Grammel
  2017-06-16 20:00 ` Henning Hraban Ramm
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Grammel @ 2017-06-16 15:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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.

Best regards,
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

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: compressing register ranges
  2017-06-16 15:42 compressing register ranges Florian Grammel
@ 2017-06-16 20:00 ` Henning Hraban Ramm
  2017-06-16 21:06   ` Florian Grammel
  0 siblings, 1 reply; 3+ messages in thread
From: Henning Hraban Ramm @ 2017-06-16 20:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 2017-06-16 um 17:42 schrieb Florian Grammel <florian.grammel@gmail.com>:

> 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

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: compressing register ranges
  2017-06-16 20:00 ` Henning Hraban Ramm
@ 2017-06-16 21:06   ` Florian Grammel
  0 siblings, 0 replies; 3+ messages in thread
From: Florian Grammel @ 2017-06-16 21:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-06-16 21:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-16 15:42 compressing register ranges Florian Grammel
2017-06-16 20:00 ` Henning Hraban Ramm
2017-06-16 21:06   ` Florian Grammel

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).