Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using some description paragraphs as definitions for some concepts. I want to add them to my register and typeset their pagenumbers in bold numbers (to recognize where is the definition).

The wiki puts an example:

\defineregister[nickname][nicknames]
\setupregister [nickname][foto][pagestyle=bold]

\starttext
And text about Kuba\nickname[foto::]{Kuba}.
\completenickname
\stoptext 

But, as you see, it only puts the word under the F letter. I tried with processors too, but it turns bold the word rather than pagenumber. I suspect the manual is outdated in this part too, but I don't know how to do this... Thanks for any help!

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

In MkIV register formatting is handled differently. Like in the legacy version, both page numbers and entry text can be assigned a style to highlight certain entries. However, where MkII lets you specify sub-styles that are local to a register, the current version provides the more generic processors.

A processor is defined globally and can be applied to entries of different lists. Also, the separation between pagestyle and textstyle has been removed, which had been redundant anyways. Processors follow the pattern of style alternatives instead and can be configured through the usual style and color options. Finally, “->” replaces the double colon as operator for style application. The wiki page on registers now has a description of processors with examples.

%% step 1: define a register (no plural in MkIV!)
\defineregister [nickname] [style=\WORD\bold,pagestyle=normal]

%% step 2: define a style processor
\defineprocessor [relevant] [style=bold,color=red]

%% step 2a: works with custom styles, too
\definealternativestyle [neato] [\bfb]
\defineprocessor [weird] [style=neato]

\starttext
  \title{List of Known Nicknames}
  \placenickname
  \page

  \page text \nickname{foo}
  \page text \nickname{bar}
  \page text \nickname{baz}
%% step 3: use in text
  \page text \nickname[relevant->]{foo}
  \page text \nickname{bar}
  \page text \nickname{baz}
  \page text \nickname{foo}
  \page text \nickname[weird->]{bar}
  \page text \nickname{baz}
  \page text \nickname{foo}
  \page text \nickname{bar}
  \page text \nickname[relevant->]{baz}
\stoptext 

demo of register entry processors

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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