Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

literal character in index macros

6 views
Skip to first unread message

Charles P. Schaum

unread,
Feb 4, 2012, 7:36:10 PM2/4/12
to
Normally the “literal” character used in \index is the @ sign to
correlate macro output with the alphabetized entry. In dtx files, the
usual style employs an = sign, which makes lots of sense. My nameauth
style—I have a new update in the wings—now makes extensive use of the
“literal” character and works fine in regular situations but not well
when cranking out the documentation.

I have not found in Goossens, et al., the method for using one character
for the dtx, but another for normal use. Any ideas of a “canonical”
approach?

Thanks much.

Dan

unread,
Feb 5, 2012, 3:20:52 PM2/5/12
to
On Feb 4, 6:36 pm, "Charles P. Schaum"
<charles.no.spam.sch...@att.net> wrote:
> Normally the “literal” character used in \index is the @ sign to
> correlate macro output with the alphabetized entry. In dtx files, the
> usual style employs an = sign, which makes lots of sense. My nameauth
> style—I have a new update in the wings—now makes extensive use of the
> “literal” character and works fine in regular situations but not well
> when cranking out the documentation.

The "literal" character is set by the makeindex style file.
In the case of dtx files, this is gind.ist. The instructions
for processing dtx files usually say to run makeindex on
*.idx with option "-s gind.ist" (and on *.glo with with
option "-s gglo.ist).

The incantation in gind.ist that performs this assignment
is
actual '='
on a line by itself. You can make your own .ist file with
this line in it and use that for any document.

>
> I have not found in Goossens, et al., the method for using one character
> for the dtx, but another for normal use. Any ideas of a “canonical”
> approach?

You can use one .ist for the dtx but another (or none at all)
for "normal use".

As far as I know it is not possible for the .idx file to
instruct makeindex which .ist file to use (nor to put this
"actual" instruction into the .idx file) though either of
these would be a nice enhancement for makeindex.

I don't know how other index processors (e.g., xindy)
handle these things.


Dan

Charles P. Schaum

unread,
Feb 6, 2012, 12:33:16 AM2/6/12
to
Never mind...

I used \@ifclassloaded{ltxdoc} to set a Boolean value at load time. At
first I tried to \let a character token based on that value, but that
only worked in some cases. So I simply checked the Boolean value at all
places where \index was called and picked either @ or =, depending.

Bottom line, it may not be pretty, but it works.

Charles P. Schaum

unread,
Feb 12, 2012, 9:53:54 AM2/12/12
to
Thanks,

That helped me design a better explanation in the nameauth documentation
regarding the macron control sequence used with gind.ist.

Charles

0 new messages