Difference between revisions of "Command/defineregister"

From Wiki
Jump to navigation Jump to search
m
 
(4 intermediate revisions by one other user not shown)
Line 3: Line 3:
 
|attributes=
 
|attributes=
 
}}
 
}}
 +
 +
== [[Help:Reference|Syntax]] (autogenerated) ==
 +
<syntax>defineregister</syntax>
 +
 +
== [[Help:Reference|Syntax]] ==
 +
<table cellspacing="4" cellpadding="2" class="cmd">
 +
  <tr>
 +
    <td colspan="2" class="cmd">\defineregister<span class="first" >[...]</span><span class="second" >[...]</span></td>
 +
  </tr>
 +
  <tr valign="top" class="first">
 +
    <td class="cmd">[...]</td>
 +
    <td>singular </td>
 +
  </tr>
 +
  <tr valign="top" class="second">
 +
    <td class="cmd">[...]</td>
 +
    <td>plural </td>
 +
  </tr>
 +
  <tr valign="top" class="second">
 +
    <td class="cmd">[...]</td>
 +
    <td>compress </td>
 +
  </tr>
 +
</table>
  
 
== Description ==
 
== Description ==
  
The {{cmd|defineregister}} command configures how indexes are presented.
+
The {{cmd|defineregister}} command creates a new index (register) definition. It also allows the index to be configured.
  
 
== Examples ==
 
== Examples ==
Line 30: Line 52:
 
</context>
 
</context>
  
=== ===
+
== See also ==
 
 
== [[Help:Reference|Syntax]] ==
 
<table cellspacing="4" cellpadding="2" class="cmd">
 
  <tr>
 
    <td colspan="2" class="cmd">\defineregister<span class="first" >[...]</span><span class="second" >[...]</span></td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[...]</td>
 
    <td>singular </td>
 
  </tr>
 
  <tr valign="top" class="second">
 
    <td class="cmd">[...]</td>
 
    <td>plural </td>
 
  </tr>
 
  <tr valign="top" class="second">
 
    <td class="cmd">[...]</td>
 
    <td>compress </td>
 
  </tr>
 
</table>
 
  
 
+
See {{cmd|setupregister}} for details.
== Description ==
 
 
 
 
 
 
 
== Example ==
 
<!-- Please fill in an example if you can -->
 
 
 
== See also ==
 
<!-- something like {{cmd|goto}} -->
 
  
 
== Help from ConTeXt-Mailinglist/Forum ==
 
== Help from ConTeXt-Mailinglist/Forum ==

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: