Difference between revisions of "Command/defineregister"

From Wiki
Jump to navigation Jump to search
m (cleaned up)
 
(16 intermediate revisions by 3 users not shown)
Line 3: Line 3:
 
|attributes=
 
|attributes=
 
}}
 
}}
 +
 +
== [[Help:Reference|Syntax]] (autogenerated) ==
 +
<syntax>defineregister</syntax>
  
 
== [[Help:Reference|Syntax]] ==
 
== [[Help:Reference|Syntax]] ==
Line 16: Line 19:
 
     <td class="cmd">[...]</td>
 
     <td class="cmd">[...]</td>
 
     <td>plural </td>
 
     <td>plural </td>
 +
  </tr>
 +
  <tr valign="top" class="second">
 +
    <td class="cmd">[...]</td>
 +
    <td>compress </td>
 
   </tr>
 
   </tr>
 
</table>
 
</table>
  
 +
== Description ==
 +
 +
The {{cmd|defineregister}} command creates a new index (register) definition. It also allows the index to be configured.
 +
 +
== Examples ==
  
== Description ==
+
The following section provides example usages.
  
 +
=== Hyphenated Sequences ===
  
 +
Often indexes will have consecutive page numbers hyphenated, such as: 1, 4-7, 10. The following code produces a hyphenated index:
  
== Example ==
+
<context source="yes">
<!-- Please fill in an example if you can -->
+
\defineregister
 +
  [photographer]
 +
  [compress=yes]
 +
 
 +
\starttext
 +
  \dorecurse{4}{%%
 +
    Foo
 +
    \photographer{Yousuf Karsh} \page}
 +
 
 +
  \completephotographer
 +
\stoptext
 +
</context>
  
 
== See also ==
 
== See also ==
<!-- something like [[cmd:goto|\goto]] -->
 
  
[[Category:Reference/en|defineregister]]
+
See {{cmd|setupregister}} for details.
 +
 
 +
== Help from ConTeXt-Mailinglist/Forum ==
 +
All issues with:
 +
{{Forum|{{SUBPAGENAME}}}}
 +
 
 +
[[Category:Command/Registers|defineregister]]

Latest revision as of 16:28, 19 November 2019

\defineregister

Syntax (autogenerated)

\defineregister[...][...][...=...,...]
[...]name
[...]name
...=...,...inherits from \setupregister


Syntax

\defineregister[...][...]
[...] singular
[...] plural
[...] compress

Description

The \defineregister command creates a new index (register) definition. It also allows the index to be configured.

Examples

The following section provides example usages.

Hyphenated Sequences

Often indexes will have consecutive page numbers hyphenated, such as: 1, 4-7, 10. The following code produces a hyphenated index:

\defineregister
  [photographer]
  [compress=yes]

\starttext
  \dorecurse{4}{%%
    Foo
    \photographer{Yousuf Karsh} \page}

  \completephotographer
\stoptext

See also

See \setupregister for details.

Help from ConTeXt-Mailinglist/Forum

All issues with: