* Fine tuning an index
@ 2020-10-08 15:58 Duncan Hothersall
2020-10-08 20:36 ` jbf
0 siblings, 1 reply; 4+ messages in thread
From: Duncan Hothersall @ 2020-10-08 15:58 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1503 bytes --]
I'm doing my first mkiv index (it took me a long time to upgrade from
mkii!) and I really like the processor feature to format elements
differently. But there are a couple of things I would really like to
achieve that I'm struggling with:
1. Elided numbers in an index range entry. For example if I have a
\startregister - \stopregister pair resulting in an index entry like
entry 354--356
I would like to be able to make this read
entry 354--6
There are different conventions for number span elision but usually
teens aren't elided so
entry 314--316
would become
entry 314-16.
It strikes me that if I could set up a processor specifically for page
number ranges I could possibly write a macro to do elision; but I don't
think that's currently possible? Maybe it's possible in lua to write code
which both identifies range page numbers and carries out the elision. I'm
not quite sure where to start.
2. Fine tuning column and page breaking in an index. This is tricky,
because there are usually very few "good" places to break an index, and
automatic breaking seems to alter slightly depending on whether
interactions are set up or not, but is there a way to manually insert a
column or page break into the register before or after a certain entry, the
way there is for a table of contents?
Sorry for no MWE, for obvious reasons. Any pointers to what might be able
to be done on these would be much appreciated.
Thanks.
Duncan
[-- Attachment #1.2: Type: text/html, Size: 1916 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 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] 4+ messages in thread
* Re: Fine tuning an index
2020-10-08 15:58 Fine tuning an index Duncan Hothersall
@ 2020-10-08 20:36 ` jbf
2020-10-09 6:25 ` Duncan Hothersall
0 siblings, 1 reply; 4+ messages in thread
From: jbf @ 2020-10-08 20:36 UTC (permalink / raw)
To: Duncan Hothersall; +Cc: ntg >> mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 674 bytes --]
Duncan, have you looked at
https://wiki.contextgarden.net/Command/setinjector?
<https://wiki.contextgarden.net/Command/setinjector>
You might also need \showinjector. But it should work for indexes
(register).
Julian
On 9/10/20 2:58 am, Duncan Hothersall wrote:
> Fine tuning column and page breaking in an index. This is tricky,
> because there are usually very few "good" places to break an index,
> and automatic breaking seems to alter slightly depending on whether
> interactions are set up or not, but is there a way to manually insert
> a column or page break into the register before or after a certain
> entry, the way there is for a table of contents?
[-- Attachment #1.2: Type: text/html, Size: 1065 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 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] 4+ messages in thread
* Re: Fine tuning an index
2020-10-08 20:36 ` jbf
@ 2020-10-09 6:25 ` Duncan Hothersall
2020-10-09 7:31 ` Duncan Hothersall
0 siblings, 1 reply; 4+ messages in thread
From: Duncan Hothersall @ 2020-10-09 6:25 UTC (permalink / raw)
To: jbf; +Cc: ntg >> mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 825 bytes --]
Brilliant, thanks, I didn't know about that one. Much appreciated.
Duncan
On Thu, 8 Oct 2020 at 21:36, jbf <roma83537@gmail.com> wrote:
> Duncan, have you looked at
> https://wiki.contextgarden.net/Command/setinjector?
> <https://wiki.contextgarden.net/Command/setinjector>
>
> You might also need \showinjector. But it should work for indexes
> (register).
>
> Julian
> On 9/10/20 2:58 am, Duncan Hothersall wrote:
>
> Fine tuning column and page breaking in an index. This is tricky, because
> there are usually very few "good" places to break an index, and automatic
> breaking seems to alter slightly depending on whether interactions are set
> up or not, but is there a way to manually insert a column or page break
> into the register before or after a certain entry, the way there is for a
> table of contents?
>
>
[-- Attachment #1.2: Type: text/html, Size: 1608 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 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] 4+ messages in thread
* Re: Fine tuning an index
2020-10-09 6:25 ` Duncan Hothersall
@ 2020-10-09 7:31 ` Duncan Hothersall
0 siblings, 0 replies; 4+ messages in thread
From: Duncan Hothersall @ 2020-10-09 7:31 UTC (permalink / raw)
To: ntg >> mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1304 bytes --]
Just a note to add, that \showinjector doesn't seem to do anything unless
you also have a \setinjector command, which is a bit counterintuitive since
probably the first thing you want to do is see the ID of each line in your
list/register before you know what \setinjector command you need.
I've worked around it by adding
\setinjector[register][1][\relax]
after \showinjector.
On Fri, 9 Oct 2020 at 07:25, Duncan Hothersall <dh@capdm.com> wrote:
> Brilliant, thanks, I didn't know about that one. Much appreciated.
>
> Duncan
>
> On Thu, 8 Oct 2020 at 21:36, jbf <roma83537@gmail.com> wrote:
>
>> Duncan, have you looked at
>> https://wiki.contextgarden.net/Command/setinjector?
>> <https://wiki.contextgarden.net/Command/setinjector>
>>
>> You might also need \showinjector. But it should work for indexes
>> (register).
>>
>> Julian
>> On 9/10/20 2:58 am, Duncan Hothersall wrote:
>>
>> Fine tuning column and page breaking in an index. This is tricky, because
>> there are usually very few "good" places to break an index, and automatic
>> breaking seems to alter slightly depending on whether interactions are set
>> up or not, but is there a way to manually insert a column or page break
>> into the register before or after a certain entry, the way there is for a
>> table of contents?
>>
>>
[-- Attachment #1.2: Type: text/html, Size: 2660 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 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] 4+ messages in thread
end of thread, other threads:[~2020-10-09 7:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-08 15:58 Fine tuning an index Duncan Hothersall
2020-10-08 20:36 ` jbf
2020-10-09 6:25 ` Duncan Hothersall
2020-10-09 7:31 ` Duncan Hothersall
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).