Difference between revisions of "Command/setupregister"
< Command
Jump to navigation
Jump to search
(point to MkIV defineprocessor for setting pagestyle) |
(conflict with setupinteraction) |
||
(18 intermediate revisions by 9 users not shown) | |||
Line 3: | Line 3: | ||
|attributes= | |attributes= | ||
}} | }} | ||
+ | |||
+ | == [[Help:Reference|Syntax]] (autogenerated) == | ||
+ | <syntax>setupregister</syntax> | ||
== [[Help:Reference|Syntax]] == | == [[Help:Reference|Syntax]] == | ||
Line 50: | Line 53: | ||
</tr> | </tr> | ||
<tr valign="top" class="third"> | <tr valign="top" class="third"> | ||
+ | <td class="cmd">[[Command/keyword:check|check]]</td> | ||
+ | <td>[[Command/value:yes|yes]] [[Command/value:no|no]] </td> | ||
+ | </tr> <tr valign="top" class="third"> | ||
<td class="cmd">[[Command/keyword:sectionnumber|sectionnumber]]</td> | <td class="cmd">[[Command/keyword:sectionnumber|sectionnumber]]</td> | ||
<td>[[Command/value:yes|yes]] [[Command/value:no|no]] </td> | <td>[[Command/value:yes|yes]] [[Command/value:no|no]] </td> | ||
Line 107: | Line 113: | ||
<tr valign="top" class="third"> | <tr valign="top" class="third"> | ||
<td class="cmd">[[Command/keyword:compress|compress]]</td> | <td class="cmd">[[Command/keyword:compress|compress]]</td> | ||
− | <td>[[Command/value:yes|yes]] [[Command/value:no|no]]</td> | + | <td>[[Command/value:yes|yes]] [[Command/value:no|no]] [[Command/value:text|text]]</td> |
+ | </tr> | ||
+ | <tr valign="top" class="third"> | ||
+ | <td class="cmd">[[Command/keyword:language|language]]</td> | ||
+ | <td>[[Command/value:language|language code]]</td> | ||
</tr> | </tr> | ||
<tr valign="top" class="third"> | <tr valign="top" class="third"> | ||
<td class="cmd">[[Command/keyword:method|method]]</td> | <td class="cmd">[[Command/keyword:method|method]]</td> | ||
<td>[[Command/value:default|default]] [[Command/value:before|before]] [[Command/value:after|after]] [[Command/value:first|first]] [[Command/value:last|last]]</td> | <td>[[Command/value:default|default]] [[Command/value:before|before]] [[Command/value:after|after]] [[Command/value:first|first]] [[Command/value:last|last]]</td> | ||
+ | </tr> | ||
+ | <tr valign="top" class="third"> | ||
+ | <td class="cmd">[[Command/keyword:pageleft|pageleft]]</td> | ||
+ | <td>[[Command/value:command|command]]</td> | ||
+ | </tr> | ||
+ | <tr valign="top" class="third"> | ||
+ | <td class="cmd">[[Command/keyword:pageright|pageright]]</td> | ||
+ | <td>[[Command/value:command|command]]</td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
Line 117: | Line 135: | ||
== Description == | == Description == | ||
− | The options are as follows: | + | The options are as follows (beware, some options can be in conflict with {{cmd|setupinteraction}} and changing parameters has no impact, e.g. <tt>pagestyle</tt>): |
<table cellspacing="4" cellpadding="2"> | <table cellspacing="4" cellpadding="2"> | ||
Line 126: | Line 144: | ||
<tr> | <tr> | ||
<td>n</td> | <td>n</td> | ||
− | <td> | + | <td>number of columns</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 134: | Line 152: | ||
<tr> | <tr> | ||
<td>align</td> | <td>align</td> | ||
− | <td> | + | <td>balance related (it’s difficult; try which combination suits you)</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>style</td> | <td>style</td> | ||
− | <td> | + | <td>style of the indicator letters</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 154: | Line 172: | ||
<tr> | <tr> | ||
<td>coupling</td> | <td>coupling</td> | ||
− | <td>special feature for screen documents</td> | + | <td>special feature for screen documents (no effect in MkIV?)</td> |
+ | </tr> | ||
+ | <tr> | ||
+ | <td>check</td> | ||
+ | <td>set {{cmd|seeindex}} entry as entered without verifying. Default no.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 166: | Line 188: | ||
<tr> | <tr> | ||
<td>distance</td> | <td>distance</td> | ||
− | <td>between text and pagenumber</td> | + | <td>between text and pagenumber as well as indentation of nested entries</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 178: | Line 200: | ||
<tr> | <tr> | ||
<td>expansion</td> | <td>expansion</td> | ||
− | <td> | + | <td>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 refference to the XML element).</td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 198: | Line 220: | ||
<tr> | <tr> | ||
<td>compress</td> | <td>compress</td> | ||
− | <td>collapse page numbers</td> | + | <td>collapse page numbers (i.e. make “10–13” from “10,11,12,13”); “<tt>text</tt>” (new in April 2019) makes “10ff.”. You can configure the latter via {{cmd|setuplabeltext}}<tt>[en][following:singular=f.,following:plural=ff.]</tt></td> |
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 210: | Line 232: | ||
<tr> | <tr> | ||
<td>alternative</td> | <td>alternative</td> | ||
− | <td></td> | + | <td>?</td> |
+ | </tr> | ||
+ | <tr> | ||
+ | <td>language</td> | ||
+ | <td>language code like in {{cmd|language}}, influences sorting; see definitions in {{src|sort-lan.mkiv}}</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>method</td> | <td>method</td> | ||
− | <td>sets up the sorter used for {{cmd|placeregister}}</td> | + | <td>sets up the sorter used for {{cmd|placeregister}}, explained at [[Command/keyword:method]]</td> |
+ | </tr> | ||
+ | <tr> | ||
+ | <td>pageleft</td> | ||
+ | <td>custom command before the first page number</td> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>pageright</td> | ||
+ | <td>custom command after the last page number</td> | ||
</tr> | </tr> | ||
</table> | </table> | ||
+ | |||
+ | Some options don’t seem to have any effect, at least in MkIV. | ||
== Example == | == Example == | ||
Line 247: | Line 283: | ||
I found it safer to put \register command after punctuation e.g.: Mamut.\nickname{Mamut} [P.K.] | I found it safer to put \register command after punctuation e.g.: Mamut.\nickname{Mamut} [P.K.] | ||
− | For the MkIV version of setting the pagestyle, and more, see the material on {{cmd|defineprocessor}} that is on [[Registers# | + | For the MkIV version of setting the pagestyle, and more, see the material on {{cmd|defineprocessor}} that is on [[Registers#Processors|this page]]. |
+ | |||
+ | == pageleft and pageright == | ||
+ | |||
+ | They were introduced in ConTeXt MkIV version 1.02 (2018.05.12 00:07). | ||
+ | |||
+ | You can use them, for example, to move the page numbers to the right, with: | ||
+ | |||
+ | <pre> | ||
+ | \setupregister[index][pageleft=\wordright\bgroup,pageright=\egroup] | ||
+ | </pre> | ||
+ | |||
+ | See [http://www.mail-archive.com/ntg-context@ntg.nl/msg87812.html this thread] | ||
+ | on the mailing list. | ||
+ | |||
+ | In MkXL (lmtx) one would rather use: | ||
+ | |||
+ | <pre> | ||
+ | \setupregister[index] | ||
+ | [pageleft=\hfilll, | ||
+ | pageright=\frozen\parfillleftskip 0pt plus 1fill\frozen\parfillrightskip 0pt\par] | ||
+ | </pre> | ||
+ | |||
== See also == | == See also == | ||
− | + | ||
+ | * {{cmd|index}} | ||
+ | * {{gen|register}} | ||
== Help from ConTeXt-Mailinglist/Forum == | == Help from ConTeXt-Mailinglist/Forum == |
Latest revision as of 22:06, 29 July 2021
\setupregister
Syntax (autogenerated)
\setupregister[...,...][...,...][...=...,...] | |
[...,...] | name |
[...,...] | number |
referencemethod | forward |
expansion | yes no xml |
ownnumber | yes no |
xmlsetup | name |
alternative | a b A B |
method | default before after first last ch mm zm pm mc zc pc uc |
compress | yes no all packed text |
check | yes no |
criterium | local text current previous all section |
pageprefixseparatorset | command |
pageprefixconversionset | name |
pageprefixstarter | command processor->command |
pageprefixstopper | command processor->command |
pageprefixset | name |
pageprefixsegments | number number:number number:* number:all section section:section section:* section:all current |
pageprefixconnector | command |
pageprefix | yes no |
pageseparatorset | name |
pageconversionset | name |
pagestarter | command processor->command |
pagestopper | command processor->command |
pagesegments | number number:number number:* number:all |
maxwidth | dimension |
indicator | yes no |
before | command |
after | command |
command | oneargument |
textcommand | oneargument |
deeptextcommand | oneargument |
pagecommand | oneargument |
distance | dimension |
interaction | text pagenumber |
pagenumber | yes no |
symbol | a n none 1 2 command |
language | default DIN␣5007-1 DIN␣5007-2 Duden de-DE de-CH de-AT ru-iso9 ocs-scn language |
style | style command |
color | color |
textstyle | style command |
textcolor | color |
pagestyle | style command |
pagecolor | color |
pageleft | command |
pageright | command |
n | number |
balance | yes no |
align | see \setupalign |
numberorder | numbers |
pagemethod | page section |
\setupregister[...][...=...,...] | |
[...] | name name:number |
referencemethod | forward |
expansion | yes no xml |
ownnumber | yes no |
xmlsetup | name |
alternative | a b A B |
method | default before after first last ch mm zm pm mc zc pc uc |
compress | yes no all packed text |
check | yes no |
criterium | local text current previous all section |
pageprefixseparatorset | command |
pageprefixconversionset | name |
pageprefixstarter | command processor->command |
pageprefixstopper | command processor->command |
pageprefixset | name |
pageprefixsegments | number number:number number:* number:all section section:section section:* section:all current |
pageprefixconnector | command |
pageprefix | yes no |
pageseparatorset | name |
pageconversionset | name |
pagestarter | command processor->command |
pagestopper | command processor->command |
pagesegments | number number:number number:* number:all |
maxwidth | dimension |
indicator | yes no |
before | command |
after | command |
command | oneargument |
textcommand | oneargument |
deeptextcommand | oneargument |
pagecommand | oneargument |
distance | dimension |
interaction | text pagenumber |
pagenumber | yes no |
symbol | a n none 1 2 command |
language | default DIN␣5007-1 DIN␣5007-2 Duden de-DE de-CH de-AT ru-iso9 ocs-scn language |
style | style command |
color | color |
textstyle | style command |
textcolor | color |
pagestyle | style command |
pagecolor | color |
pageleft | command |
pageright | command |
n | number |
balance | yes no |
align | see \setupalign |
numberorder | numbers |
pagemethod | page section |
Syntax
\setupregister[...][...][...,...=...,...] | |
[...] | singular |
[...] | name |
n | number |
balance | yes no |
align | yes no |
style | normal bold slanted boldslanted type cap small... command |
pagestyle | normal bold slanted boldslanted type cap small... command |
textstyle | normal bold slanted boldslanted type cap small... command |
indicator | yes no |
coupling | yes no |
check | yes no |
sectionnumber | yes no |
criterium | section local all |
distance | dimension |
symbol | 1 2 ... n a ... none |
interaction | pagenumber text |
expansion | yes no command |
referencing | on off |
location | left middle right |
maxwidth | dimension |
unknownreference | empty none |
alternative | a b A B |
prefix | both first none |
pagecommand | command |
textcommand | command |
compress | yes no text |
language | language code |
method | default before after first last |
pageleft | command |
pageright | command |
Description
The options are as follows (beware, some options can be in conflict with \setupinteraction and changing parameters has no impact, e.g. pagestyle):
Option | Description |
---|---|
n | number of columns |
balance | balance columns? |
align | balance related (it’s difficult; try which combination suits you) |
style | style of the indicator letters |
pagestyle | style of page number |
textstyle | style of index word |
indicator | create letter sections? |
coupling | special feature for screen documents (no effect in MkIV?) |
check | set \seeindex entry as entered without verifying. Default no. |
(section)number | print part/... numbers? |
criterium | for part/chapter/section registers |
distance | between text and pagenumber as well as indentation of nested entries |
symbol | for pagenumber (a=a,b,c; n=1,2,3; 1=dots; 2=blocks) |
interaction | which part should be clickable? |
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 refference to the XML element). |
referencing | create references for letter sections (like "index:a")? |
textcommand | custom command for index word |
pagecommand | custom command for page number |
location | ? |
compress | collapse page numbers (i.e. make “10–13” from “10,11,12,13”); “text” (new in April 2019) makes “10ff.”. You can configure the latter via \setuplabeltext[en][following:singular=f.,following:plural=ff.] |
maxwidth | Set the maximum length for the text of the index entry in the registerlist (the command uses \limitatetext to do this) |
unknownreference | insert a horizontal space before and after the reference in the text if you use interactive mode to move from one entry in the text to next or previous one and there is no previous or next reference. |
alternative | ? |
language | language code like in \language, influences sorting; see definitions in sort-lan.mkiv |
method | sets up the sorter used for \placeregister, explained at Command/keyword:method |
pageleft | custom command before the first page number |
pageright | custom command after the last page number |
Some options don’t seem to have any effect, at least in MkIV.
Example
Here is an example for MkII:
\defineregister[nickname][nicknames] \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
I found it safer to put \register command after punctuation e.g.: Mamut.\nickname{Mamut} [P.K.]
For the MkIV version of setting the pagestyle, and more, see the material on \defineprocessor that is on this page.
pageleft and pageright
They were introduced in ConTeXt MkIV version 1.02 (2018.05.12 00:07).
You can use them, for example, to move the page numbers to the right, with:
\setupregister[index][pageleft=\wordright\bgroup,pageright=\egroup]
See this thread on the mailing list.
In MkXL (lmtx) one would rather use:
\setupregister[index] [pageleft=\hfilll, pageright=\frozen\parfillleftskip 0pt plus 1fill\frozen\parfillrightskip 0pt\par]
See also
Help from ConTeXt-Mailinglist/Forum
All issues with: