Hi.

Gavin Smith <[email protected]> wrote:

> I found that text in the number field would have to be surrounded in 
> braces, like this:

No problem dealing with that.

> 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.

This is easy; we match against @see(also)? in that field. If it doesn't
match, it's a page number.

> > I guess these become:
> > 
> >     @cindex output record separator @see{@code{ORS} variable}
> >     @cindex @code{print} statement @seealso{redirection@comma{} of output}

After more thought, I'd like this to turn into

        @entry{output record separator}{{@see{@code{ORS} variable}}{output 
record separator}
        @entry{print statement}{{@seealso{redirection@comma{} of 
output}}}{@code{print} statement}

The part before the @see or @seealso is the text and sort key; I want to
be able to allow for

        @cindex output record separator @see{@code{ORS} variable}
        @cindex output record separator

I will sort "see" and "see" also before entries with page numbers.
(It's probably bad practice to have such things but why should we limit it?)

Output from texindex would be:

        @entry{output record separator, @see{@code{ORS} variable}}{}
        @entry{@code{print} statement, @seealso{redirection@comma{} of 
output}}{}

That is, the page number field will be empty for "see" and "see also".

> What is this supposed to look like in the kind of index formatting
> that texinfo.tex uses, with the dot leaders?  Should the leaders be
> present or not for a "see"?  (I guess not.)

I agree, no dots.

> Where does a "see also" appear in relation to the leaders and the other
> page numbers?  (I guess after all the page numbers, after the leaders.)

I would put it before the entries with the page numbers.

> What precedent is there for this?

For see and see also? Take a look at any O'Reilly book, for example.

> It is much more common for there to be no leaders
> when an index is formatted and for the page numbers to follow the
> index entry immediately.  I tried to check if similar output could
> be output for LaTeX, but I didn't find how to get the dot leaders type
> of index formatting in the time I spent on it.

The source for Karl's "TeX for the Impatient" is available, as a GNU
project even. That might be a useful reference.

I kind of like the leaders (or at least the right justified page
numbers) myself.

In any case, those are my current thoughts.

Thanks!

Arnold

Reply via email to