# [NTG-context] index questions - again

Thomas A. Schmitz thomas.schmitz at uni-bonn.de
Tue Mar 13 21:03:51 CET 2007

On Mar 13, 2007, at 6:41 PM, Hans Hagen wrote:

>> OK, I tried a hack, and I just wanted to ask if there's anything
>> wrong with it: as dirty workaround, I added a fourth key to
>> dostartregister:
>>
>>
>> \def\startregister
>>
>> \def\dostartregister[#1][#2][#3][#4]#5%
>>    {\chardef\registerpagestatus\plustwo
>>     \def\currentregister{#1}%
>>     \setgvalue{\??id#1\??id#2}{\dodostopregister[#1][#3]{#5}}%
>>     \dodoregister[#3]{#4}{#5}}
>>
>> and after a quick test, this seems to do what I want. The endash
>> between numbers is not bold, but I could live with that. Any comments
>> from the developers?
>>
>>
> looks harmless to me so we can patch that
>

Hmm, I'm not quite sure I'm doing the right thing. I thought I could
have 4 arguments in []:

\startregister[name of register][key for range][type of register]
[sort key]{register entry}

but the [sort key] doesn't seem to work. The hack is OK for me now,
but it may not be good for the distribution.

> can you also provide the appropriate cont-en.xml entry

Would like to, but comparing "register" to "startregister," I don't
see anything that has to be changed?

<cd:command name="register" generated="yes" file="core-reg.tex">
<cd:sequence>
<cd:variable value="register"/>
</cd:sequence>
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:text"/>
</cd:keywords>
<cd:index list="yes"/>
</cd:arguments>
</cd:command>

<cd:command name="startregister" generated="yes" file="core-reg.tex">
<cd:sequence>
<cd:string value="start"/>
<cd:variable value="register"/>
</cd:sequence>
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="cd:text"/>
</cd:keywords>
<cd:index list="yes"/>
</cd:arguments>
</cd:command>

Best

Thomas