2

I have a document which defines quite some terms. I want to create an index where those terms are listed, along with prominent usages. In the index, I want to differentiate between the page that defines the link and occurrences. I also want the terms be clickable and link to the defining occurrence with coupling=yes. So, if a term is defined on page 3 and is referenced on page 1 and 5, it should look something like this:

term 1, 3, 5

and link to the occurrence on page 3.

As I understand the documentation, coupling will setup my index to link to the first or last occurrence, which is not helpful in this case. I also understand that there are processors, but they are used for styling the entry, not the page numbers.

Is this possible to do with ConTeXt registers?

  • “I want list of things” is not a question. – Henri Menke Jul 23 '18 at 10:32
  • The two things I want – having one page number bold and linking to that occurrence – are tightly coupled. I don't think it makes sense to split them into two questions. – flyx Jul 23 '18 at 10:41
5

I'm no expert, but there is a comment on the Wiki page for setupregister under coupling that states "(no effect in MkIV?)". This might not say much, but I couldn't get it to work myself...

As for the styling, I do think it's possible to get what you want with processors:

\setupinteraction[state=start]

\defineregister[index][pagestyle=normal,n=2]
\defineprocessor[definition][style=italic,color=blue]

\starttext

    \placeindex \page[yes]

    First occurrence of term\index{term}\index{term}. \page[yes]
    Second occurrence of term where it is defined\index[definition->]{term}. \page[yes]
    Third occurrence of term\index{term}.


\stoptext

Which gives:

enter image description here

In this case, all the numbers are clickable and take you to the right occurrence.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.