ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] processor for index sub-entry?
@ 2024-07-05 20:36 Henning Hraban Ramm
  2024-07-07 16:01 ` [NTG-context] " Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Henning Hraban Ramm @ 2024-07-05 20:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,
is it possible to apply a processor to an index sub-entry?

\index{Modules+\type{filter}}
looks good, but "filter" is sorted under "type".

\defineprocessor[type][style=mono]
\index{Modules+type->filter}
results in a "Modules / type->filter" entry.

\index[Modules+filter]{Modules+\type{filter}}
works and looks good, but the code feels bad…


Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: processor for index sub-entry?
  2024-07-05 20:36 [NTG-context] processor for index sub-entry? Henning Hraban Ramm
@ 2024-07-07 16:01 ` Wolfgang Schuster
  2024-07-07 17:38   ` Henning Hraban Ramm
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2024-07-07 16:01 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Henning Hraban Ramm

Henning Hraban Ramm schrieb am 05.07.2024 um 22:36:
> Hi,
> is it possible to apply a processor to an index sub-entry?
> 
> \index{Modules+\type{filter}}
> looks good, but "filter" is sorted under "type".
> 
> \defineprocessor[type][style=mono]
> \index{Modules+type->filter}
> results in a "Modules / type->filter" entry.
> 
> \index[Modules+filter]{Modules+\type{filter}}
> works and looks good, but the code feels bad…

1. Complete your example to test them without adding stuff.

2. Use \setregisterentry which allows you to set processors for each 
entry level.

\defineprocessor[type][style=mono]

\starttext

xxx\setregisterentry[index][entries:1=Modules,entries:2=filter,processors:2=type]

\placeindex[n=1]

\stoptext

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: processor for index sub-entry?
  2024-07-07 16:01 ` [NTG-context] " Wolfgang Schuster
@ 2024-07-07 17:38   ` Henning Hraban Ramm
  0 siblings, 0 replies; 3+ messages in thread
From: Henning Hraban Ramm @ 2024-07-07 17:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 07.07.24 um 18:01 schrieb Wolfgang Schuster:
> Henning Hraban Ramm schrieb am 05.07.2024 um 22:36:
>> Hi,
>> is it possible to apply a processor to an index sub-entry?
>>
>> \index{Modules+\type{filter}}
>> looks good, but "filter" is sorted under "type".
>>
>> \defineprocessor[type][style=mono]
>> \index{Modules+type->filter}
>> results in a "Modules / type->filter" entry.
>>
>> \index[Modules+filter]{Modules+\type{filter}}
>> works and looks good, but the code feels bad…
> 
> 1. Complete your example to test them without adding stuff.

Sorry.

> 2. Use \setregisterentry which allows you to set processors for each 
> entry level.
> 
> \defineprocessor[type][style=mono]
> 
> \starttext
> 
> xxx\setregisterentry[index][entries:1=Modules,entries:2=filter,processors:2=type]

Oh wow, another command that I didn’t know. Might make sense to use in 
macros or automated setups.

Thank you!

Hraban

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2024-07-07 17:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-05 20:36 [NTG-context] processor for index sub-entry? Henning Hraban Ramm
2024-07-07 16:01 ` [NTG-context] " Wolfgang Schuster
2024-07-07 17:38   ` Henning Hraban Ramm

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