Difference between revisions of "Command/setregisterentry"

From Wiki
Jump to navigation Jump to search
(Summary of the command)
 
m (Example 1)
Line 1: Line 1:
 
<cd:commandgroup name="setregisterentry" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807">
 
<cd:commandgroup name="setregisterentry" xmlns:cd="http://wiki.contextgarden.net/commanddoc/20200807">
 
<cd:shortdesc><!-- a short command summary goes here -->
 
<cd:shortdesc><!-- a short command summary goes here -->
The command <tt>\setregisterentry</tt> is used for putting the entry to the register. In addition to <tt>\index</tt> command it allows user to specify sorting keys of up to three levels.
+
The command <tt>\setregisterentry</tt> is used for putting the entry to the register. Contrary to <tt>\index</tt> command it allows user to specify sorting keys of up to three levels.
 
</cd:shortdesc>
 
</cd:shortdesc>
 
<cd:variants>
 
<cd:variants>
Line 67: Line 67:
 
<cd:description><!-- the long description of the command goes here -->
 
<cd:description><!-- the long description of the command goes here -->
 
</cd:description>
 
</cd:description>
<cd:examples></cd:examples>
+
<cd:examples><cd:example title="Basic example (3 levels)">\setupregister[index][balance=no]
 +
 
 +
\starttext
 +
 
 +
\chapter{Alfred Hitchcock}
 +
 
 +
 
 +
The Skin Game (1931)    \setregisterentry[index]
 +
                        [keys:1=Hitchcock Alfred,
 +
                        entries:1={Hitchcock, Alfred},
 +
                        keys:2=1931,
 +
                        entries:2=1931,
 +
                        keys:3=Skin Game,
 +
                        entries:3={Skin Game, The}]
 +
 
 +
Mary (1931)            \setregisterentry[index]
 +
                        [keys:1=Hitchcock Alfred,
 +
                        entries:1={Hitchcock, Alfred},
 +
                        keys:2=1931,
 +
                        entries:2=1931,
 +
                        keys:3=Mary,
 +
                        entries:3=Mary]
 +
 
 +
Rich and Strange (1931) \setregisterentry[index]
 +
                        [keys:1=Hitchcock Alfred,
 +
                        entries:1={Hitchcock, Alfred},
 +
                        keys:2=1931,
 +
                        entries:2=1931,
 +
                        keys:3=Rich and Strange,
 +
                        entries:3=Rich and Strange]
 +
 
 +
 
 +
Number Seventeen (1932) \setregisterentry[index]
 +
                        [keys:1=Hitchcock Alfred,
 +
                        entries:1={Hitchcock, Alfred},
 +
                        keys:2=1932,
 +
                        entries:2=1932,
 +
                        keys:3=Number Seventeen,
 +
                        entries:3=Number Seventeen]
 +
 
 +
 
 +
\blank
 +
 
 +
\placeregister[index]    % without title
 +
 
 +
\stoptext
 +
</cd:example></cd:examples>
 
<cd:notes></cd:notes>
 
<cd:notes></cd:notes>
 
<cd:seealso>
 
<cd:seealso>

Revision as of 14:13, 12 October 2020


\setregisterentry

Summary

The command \setregisterentry is used for putting the entry to the register. Contrary to \index command it allows user to specify sorting keys of up to three levels.

Settings

\setregisterentry[...][...=...,...][...=...,...]
[...]name
labelname
keystext processor->text
entriestext processor->text
keys:1text
keys:2text
keys:3text
entries:1text
entries:2text
entries:3text
alternativetext
keyvalue

Description

Examples

Basic example (3 levels)

\setupregister[index][balance=no]

\starttext

\chapter{Alfred Hitchcock}


The Skin Game (1931) \setregisterentry[index]

                       [keys:1=Hitchcock Alfred,
                       entries:1={Hitchcock, Alfred},
                       keys:2=1931,
                       entries:2=1931,
                       keys:3=Skin Game,
                       entries:3={Skin Game, The}]

Mary (1931) \setregisterentry[index]

                       [keys:1=Hitchcock Alfred,
                       entries:1={Hitchcock, Alfred},
                       keys:2=1931,
                       entries:2=1931,
                       keys:3=Mary,
                       entries:3=Mary]

Rich and Strange (1931) \setregisterentry[index]

                       [keys:1=Hitchcock Alfred,
                       entries:1={Hitchcock, Alfred},
                       keys:2=1931,
                       entries:2=1931,
                       keys:3=Rich and Strange,
                       entries:3=Rich and Strange]


Number Seventeen (1932) \setregisterentry[index]

                       [keys:1=Hitchcock Alfred,
                       entries:1={Hitchcock, Alfred},
                       keys:2=1932,
                       entries:2=1932,
                       keys:3=Number Seventeen,
                       entries:3=Number Seventeen]


\blank

\placeregister[index] % without title

\stoptext

Notes

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: