[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Feature-Request: more flexible Makeindex commands

From: Jan Braun
Subject: Feature-Request: more flexible Makeindex commands
Date: Thu, 12 Dec 2019 16:17:05 +0000

Dear David,
ladies and gentleman,

first of all, I want to thank you for supporting and developing AUCTeX.  I 
can’t remember using anything else, to write my LaTeX documents with! 

For the first time in my life, I am actually preparing  (via AUCTeX) a 
document, which recently got an index added.  

Because I am busy working on the document, lots of things are changed.  Many of 
them are related to its newly index.

Right now, I am testing different index style files and such stuff, but this is 
no fun.  

I think the index generating part of AUCTeX could and should be improved.

To my humble experience, using an index style is common practice.  (Alone in my 
TeXLive are more than 50 styles distributed!)  

Therefore AUCTeX should have some kind of support for this.

Unfortunately, the way different support for different LaTeX packages is added, 
will most likely not work for generating the index.  When you add a 
\usepackage{} command to your file, AUCTeX can easily scan that package and try 
to guess, which new commands, environments, … it provides.  AUCTeX does an 
excellent job here.

But e.g. to use the Makeindex style .gind.sty, you do not need to load an extra 
LaTeX package (by means of \usepackage}.  AUCTeX has no chance, to guess this 
addition correctly.   Even if you would load the latex package gindex.sty, you 
could choose from two different makeindex styles and  
And maybe a lot of other makeindex styles like to.

What AUCTeX could (and hsould) do, is to scan the TeX directories and notice 
all the *.ist file it finds.  It than can employ this data to give hints to the 
user or to complete any related user input.

Different users will have different ideas, which style should be used as 
default style.  

Mosè Giordano has posted (a long time ago) an answer to a closely similar 
question on emacs.SE,
 ,  where he offered a solution, by setting a file local variable.   Thank you, 

Some of his code could be implemented in std. AUCTeX, I guess.  Especially 
enhancing makeindex, to have a style file variable.  

But I tested this solution of Mosè.  I wasn’t completely happy with it.  First, 
the file local variable works only for the local buffer.  I happen to have my 
document split in different files. I set the TeX-master local file variable in 
the sub files and can than start the compilation, without switching to the main 
file itself.  This is so convenient.  But in this particular case, I have to 
switch back to the master file, in order, to run the correct command more or 
less automatically.

For complex documents, I mostly use C-c C-a to run all necessary steps, 
including BibTeX oder biber.  (I was pleased to learn, that there are means, to 
switch AUCTeX default behaviour from bibtex to biber very easily.  Works like a 
charme!)  But C-c C-a wont obeye the local to the master document set index 
style variable as well.  Moreover, TeX-command-run-all will still call „Index“ 
and not the more sophisticated MyIndex choice.

I’d suggest, that you add some more flexibility to this.  Define an empty 
indexing-option, which is added by default to the index command.  Than it would 
be nice, to have a emacs command, to manipulate this variable, by reading the 
users input and completing it.  (By searching the TeX directories first.)  The 
only problem I see is, how to store this manipulation permanently.  Of course, 
this definition could be stored in the auto file of the master TeX document, 
but it will be overwritten, the next time the user presses C-c C-n.  

How about this: one could define in the top of the master file some kind of 
file local variable, which contains the name of the desired style file.  When 
AUCTeX parses the file the next time, it recognizes this content and stores it 
appropriately in the  auto file.  Than the user could call TeX-command-run-all 
from any of the subfiles and AUCTeX will propagate to create an index and use 
the desired index style file.  (Not as elegant as the usual parsing, but better 
than anything else?)  The emacs command described above could also set this 
file local variable and store it also in the auto files.

Thank you very much in advance.

Greetings from Clausthal


Jan Braun
Dezernat 4 — Technischer Betriebsdienst
TU Clausthal,
Leibnizstraße 13a, Gebäude C13
Telefon: 0 53 23 / 72-22 50
E-Mail: address@hidden

Attachment: smime.p7s
Description: S/MIME cryptographic signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]