On Thu, Mar 07, 2019 at 01:57:08PM -0700, [email protected] wrote:
> OK. No problem. The number field must match /^([ivxdlcm]+|([0-9]+)$/
> to be a number. Otherwise it's a see/see also.
I found that text in the number field would have to be surrounded in
braces, like this:
@entry{bbb}{{see also @code{ee@`e}}}{bbb}
otherwise the code in \pdfgettoks would make any spaces disappear, and
"seealso" would appear. This appears to work okay with texindex: the
following in seealso.cp:
@entry{aaa}{1}{aaa}
@entry{bbb}{1}{bbb}
@entry{bbb}{{see also @code{ee@`e}}}{bbb}
produces the following in seealso.cps:
@initial {A}
@entry {aaa}{1}
@initial {B}
@entry {bbb}{1, {see also @code{ee@`e}}}
So there might not be much required in terms of changes to texindex to
support this.
I am not sure about the regex for matching Roman numerals is a good
idea. There are more features for index formatting that we haven't
considered: page numbers having styles such as bold or italic is
something that occurs in some indices in books or articles. Then we
might want e.g. @b{23} or @i{56} in the number field - that wouldn't be
a "see also". I can imagine an obscure bug where the word "mix" appears
in the page number field when it does not mean 1009. I'd prefer
something more explicit.