Command/setupregister

From Wiki
Jump to navigation Jump to search


\setupregister

Summary

The command \setupregister is used for the settings of an index.

Settings

\setupregister[...][...=...,...]
[...]name name:number
referencemethodforward
expansionyes no xml
ownnumberyes no
xmlsetupname
alternativea b A B
methoddefault before after first last ch mm zm pm mc zc pc uc
compressyes no all packed text
checkyes no
criteriumlocal text current previous all section
pageprefixseparatorsetcommand
pageprefixconversionsetname
pageprefixstartercommand processor->command
pageprefixstoppercommand processor->command
pageprefixsetname
pageprefixsegmentsnumber number:number number:* number:all section section:section section:* section:all current
pageprefixconnectorcommand
pageprefixyes no
pageseparatorsetname
pageconversionsetname
pagestartercommand processor->command
pagestoppercommand processor->command
pagesegmentsnumber number:number number:* number:all
maxwidthdimension
indicatoryes no
beforecommand
aftercommand
commandoneargument
textcommandoneargument
deeptextcommandoneargument
pagecommandoneargument
distancedimension
interactiontext pagenumber
pagenumberyes no
symbola n none 1 2 command
languagedefault DIN␣5007-1 DIN␣5007-2 Duden de-DE de-CH de-AT ru-iso9 ocs-scn language
stylestyle command
colorcolor
textstylestyle command
textcolorcolor
pagestylestyle command
pagecolorcolor
pageleftcommand
pagerightcommand
nnumber
balanceyes no
alignsee \setupalign
numberordernumbers
pagemethodpage section

OptionExplanation
expansion
When the entry is a command or XML element, expansion=yes forces the expansion before writing to the TUC file (register). Otherwise non-expanded form will be written (command or reference to the XML element).
method
sets up the sorter used for \placeregister, explained at Command/keyword:method
compress
collapse page numbers (i.e. make “10–13” from “10,11,12,13”)
yes 10–13
no 10,11,12,13
text makes “10ff.”. Configurable via \setuplabeltext[en][following:singular=f.,following:plural=ff.]
check
set \seeindex entry as entered without verifying. Default no.
criterium
for part/chapter/section registers
maxwidth
maximum length for the text of the index entry in the registerlist (the command uses \limitatetext to do this)
indicator
create letter sections?
textcommand
custom command for index word
pagecommand
custom command for page number
distance
between text and pagenumber as well as indentation of nested entries
interaction
which part should be clickable?
symbol
for pagenumber (a=a,b,c; n=1,2,3; 1=dots; 2=blocks)
language
language code like in \language, influences sorting; see definitions in sort-lan.mkiv
DIN␣5007-1 German default sorting, ß = ss
DIN␣5007-2 German phone book sorting, ä = ae etc.
Duden German Duden sorting, ß = s
de-AT Austrian phone book sorting, umlauts after vocals (a, ä, o, ö, u, ü)
ru-iso9 Russian in ISO-9 Latin transcription
ocs-scn Old Slavonic, scientific transcription
style
style of the indicator letters
textstyle
style of index word
pagestyle
style of page number
pageleft
custom command before the first page number
pageright
custom command after the last page number
n
number of columns
balance
balance columns?
align
balance related (it’s difficult; try which combination suits you)

Settings argument

\setupregister[...,...][...,...][...=...,...]
[...,...]name
[...,...]number
referencemethodforward
expansionyes no xml
ownnumberyes no
xmlsetupname
alternativea b A B
methoddefault before after first last ch mm zm pm mc zc pc uc
compressyes no all packed text
checkyes no
criteriumlocal text current previous all section
pageprefixseparatorsetcommand
pageprefixconversionsetname
pageprefixstartercommand processor->command
pageprefixstoppercommand processor->command
pageprefixsetname
pageprefixsegmentsnumber number:number number:* number:all section section:section section:* section:all current
pageprefixconnectorcommand
pageprefixyes no
pageseparatorsetname
pageconversionsetname
pagestartercommand processor->command
pagestoppercommand processor->command
pagesegmentsnumber number:number number:* number:all
maxwidthdimension
indicatoryes no
beforecommand
aftercommand
commandoneargument
textcommandoneargument
deeptextcommandoneargument
pagecommandoneargument
distancedimension
interactiontext pagenumber
pagenumberyes no
symbola n none 1 2 command
languagedefault DIN␣5007-1 DIN␣5007-2 Duden de-DE de-CH de-AT ru-iso9 ocs-scn language
stylestyle command
colorcolor
textstylestyle command
textcolorcolor
pagestylestyle command
pagecolorcolor
pageleftcommand
pagerightcommand
nnumber
balanceyes no
alignsee \setupalign
numberordernumbers
pagemethodpage section

Description

For setting the pagestyle, and more, see the material on \defineprocessor that is on this page.

Examples

Own register

\defineregister[nickname]
\setupregister [nickname]
  [partnumber=no,alternative=A,criterium=all,n=3,balance=yes,pagestyle=normal]
\setupregister [nickname][foto][pagestyle=bold]

\starttext

Text about Mamut\nickname{Mamut}.
\placefigure[]
  {Kuba\nickname[foto::]{Kuba} on the photo.}
  {\externalfigure[kuba][width=0.2\textwidth]}

\page
And text about Kuba\nickname{Kuba}.

\completenickname
\stoptext

yields

right-aligned page number

\setupregister[index]
     [pageleft=\hfilll,
      pageright=\frozen\parfillleftskip 0pt plus 1fill\frozen\parfillrightskip 0pt\par]

MkII approach, might still work:

\setupregister[index][pageleft=\wordright\bgroup,pageright=\egroup]

Notes

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: