MakeIndex, Nomenclature, Glossaries and AcronymsCustomizing index entries

Information and discussion about MakeIndex - the tool to generate subject indices for LaTeX documents.
Post Reply
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

Customizing index entries

Post by svend_tveskaeg »

Dear (La)TeX friends.

If I want every index entry in the .ind file to look like

Code: Select all

\item <text> \hfil\dotfill <another text> \dotfill \hyperpage{<number>}
what do I have to write in my .ist file?

Update: Every <text> should be flushed left and every <another text> should be aligned at the center of the line. (I hope it makes sense.)

Here is my .ist file (it is a "rip-off" of the examples on pages 662 and 664 in "The LaTeX Companion" 2nd Edition):

Code: Select all

% My index style file.
heading_prefix "{\\bfseries\\hfil " % Insert in front of letter.
heading_suffix "}\\nopagebreak\n"   % Append after letter.
headings_flag       1               % Turn on headings (uppercase).
delim_0        "\\dotfill "         % \item level entry dots filling.
I thought of something like

Code: Select all

delim_0        "\\hfil\\dotfill #1 \\dotfill "
but it failed, of course. (I am almost totally new to creating indices.)


Thanks in advance!
Last edited by svend_tveskaeg on Tue Jul 27, 2010 4:30 am, edited 2 times in total.
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Post Reply