Dear Wolfgang,
many thanks for this very helpful suggestion. Using |\defineprocessor|
with |->| works perfectly and solves the problem of displaying titles in
italics while keeping a clean sorting key.
I had been trying to use the |@| syntax out of habit from other indexing
systems, but your solution is clearly the correct approach with ConTeXt
registers.
Thanks again for the clear explanation and example.
Best//JP
Le 13/03/2026 à 11:44, Wolfgang Schuster a écrit :
Am 13.03.2026 um 09:26 schrieb Jean-Pierre Delange via ntg-context:
Dear list,
I am using two registers for separate indexes (/index nominum/ and /
index rerum/):
\defineregister[nominum] \defineregister[rerum]
\setupregister[nominum] [criterium=all]
\setupregister[rerum][criterium=all]
Entries in the text work as expected:
Hume\nominum{Hume, David} discusses scepticism\rerum{scepticism}.
However, I would also like to index *titles of works* (e.g. Kant’s /
Kritik der reinen Vernunft/) and have them appear *in italics in the
index*.
I tried the usual |sortkey@display| syntax:
\rerum{Kritik der reinen Vernunft@\emph{Kritik der reinen Vernunft}}
but the |@...| part is printed literally in the index.
Here is a MWE:
\starttext \defineregister[rerum]
\setupregister[rerum][criterium=all] In his \emph{Kritik der reinen
Vernunft} \rerum{Kritik der reinen Vernunft@\emph{Kritik der reinen
Vernunft}} Kant develops his critical philosophy. \page
\placeregister[rerum] \stoptext
Desired result:
*
sorting key: |Kritik der reinen Vernunft|
*
display in index: /Kritik der reinen Vernunft/
What is the recommended way to achieve this with registers defined
via | \defineregister|?
You can create with \defineprocessor a named style and apply it to
your register entry with ->.
\defineregister[rerum]
\setupregister[rerum][criterium=all]
\defineprocessor[jean] [style=italic]
\defineprocessor[pierre][style=bold]
\starttext
In his \emph{Kritik der reinen Vernunft}
\rerum{jean->Kritik der reinen Vernunft}%
Kant develops his critical philosophy.
%In his \emph{Kritik der reinen Vernunft}
%\rerum{pierre->Kritik der reinen Vernunft}%
%Kant develops his critical philosophy.
\page \placeregister[rerum]
\stoptext
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry
to the Wiki!
maillist : [email protected] /
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
___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
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
___________________________________________________________________________________