MAKEINDEX(1)

๐Ÿ“ฆ version 2026.0, in alpine 3.24

๐Ÿ’– MAKEINDEX(1) ๐Ÿ’–

Okay bestie, this is makeindex (manual section 1, from TeX Live) ๐ŸŽ€

โœจ NAME โœจ

makeindex - a general purpose, formatter-independent index processor ๐Ÿ“š

๐Ÿงš SYNOPSIS ๐Ÿงš

makeindex [-c] [-g] [-i] [-l] [-o ind] [-p num] [-q] [-r] [-s sfile] [-t
log] [-L] [-T] [idx0 idx1 idx2...]

๐ŸŒธ DESCRIPTION ๐ŸŒธ

Okay so makeindex is a general purpose hierarchical index generator and it is literally so iconic ๐Ÿ˜ญโœจ It takes one or more input files, which are often made by a text formatter like TeX (tex(1L)) or troff(1). Then it sorts the entries and spits out an output file you can format. The index can go up to three levels (0, 1, and 2) of subitem nesting, which is giving very organized energy ๐Ÿ’…

Quick heads up: the way words get flagged for indexing inside your main document depends on whichever formatter you're using. makeindex does NOT pick the words for you ๐Ÿ™ˆ

Now, the output index is hierarchical, so makeindex is basically complementary to the awk(1)-based make.index(1L) system from Bentley and Kernighan. That one is specific to troff(1), makes non-hierarchical indices, and uses a much simpler syntax for marking entries. Different vibes, both valid ๐Ÿฆ‹ For illustration of use with troff and TeX, check the section EXAMPLES below.

The formats of the input and output files are set in a style file ๐Ÿ“ By default, the input is assumed to be a .idx file, the kind LaTeX generates.

Unless you say otherwise, the base name of the first input file (idx0) is used to figure out the names of the other files ๐Ÿ’œ For each input file name you give, a file of that name gets looked for. If it's not found and the file name has no extension, the extension .idx gets added. If no file with that name exists at all, makeindex aborts. Rip ๐Ÿ’€

If exactly one input file was given and you didn't pick a style file with -s, makeindex will use a file with the extension .mst as the default style file, but only if it's actually there ๐ŸŽ€

For the important notes on how to pick index keywords, read the document by Lamport cited below. Separate from picking keywords, there's a systematic way to place index terms in a document in a paper called Index Preparation and Processing, also cited below. Bookmark both, they're the real deal ๐Ÿ”ฅ

๐ŸŽ€ OPTIONS ๐ŸŽ€

  • -c โ€” Compress the in-between blanks ๐Ÿซง Leading and trailing blanks and tabs get ignored. By default, the blanks in the index key are kept.
  • -g โ€” Okay this one is for German vibes ๐Ÿ‡ฉ๐Ÿ‡ช It uses German word ordering from DIN 5007. Normally, makeindex orders things as: symbols, numbers, uppercase letters, then lowercase letters. German ordering goes: symbols, lowercase letters, uppercase letters, then numbers. This option also lets makeindex read the German TeX commands {"a, "o, "u and "s} as {ae, oe, ue and ss} while sorting entries. The quote character has to be redefined in a style file first (for example, redefine quote as '+'). If you don't redefine the quote character, makeindex throws an error and aborts ๐Ÿ˜ญ
  • -i โ€” Take the input from stdin ๐Ÿ“ฅ When you use this and skip -o, the output gets written to stdout.
  • -l โ€” Letter ordering! By default, word ordering is used instead, so check the ORDERING section for the deets ๐Ÿ’…
  • -o ind โ€” Use ind as the output index file ๐ŸŒท By default, the file name is made by adding the extension .ind to the base name of the first input file (idx0).
  • -p num โ€” Set the starting page number of the output index file to be num ๐Ÿ“„ This is super useful when the index file gets formatted separately. The argument num can be a number or one of these three slay options:
    • any โ€” The starting page is the last source page number plus 1 โœจ
    • odd โ€” The starting page is the first odd page after the last source page number ๐ŸŽ€
    • even โ€” The starting page is the first even page after the last source page number ๐Ÿฆ‹

The last source page is found by searching backward through the log file for the first number wrapped in paired square brackets ([...]) ๐Ÿ” If a page number is missing, or the log file can't be found, makeindex won't even try to set the starting page number ๐Ÿ™ˆ The source log file name is made by adding the extension .log to the base name of the first input file (idx0).

  • -q โ€” Quiet mode ๐Ÿคซ No messages go to stderr. By default, progress and error messages get sent to stderr and the transcript file.
  • -r โ€” Turns off implicit page range formation ๐Ÿšซ That means page ranges have to be made with explicit range operators, see SPECIAL EFFECTS below. By default, three or more successive pages get automatically shortened into a range (e.g. 1โ€”5), so this is you saying "nah, I'm doing it myself" ๐Ÿ’–
  • -s sty โ€” Use sty as the style file ๐Ÿ“ There's no default for this one. The environment variable INDEXSTYLE defines the path where the style file should be found, so keep an eye on that.
  • -t log โ€” Use log as the transcript file ๐Ÿ“œ By default, the file name is made by adding the extension .ilg to the base name of the first input file (idx0).
  • -L โ€” Sort based on locale settings ๐ŸŒ Not available on all systems, so no cap, check yours first.
  • -T โ€” Special support for Thai documents ๐Ÿ‡น๐Ÿ‡ญ Not available on all systems either, bestie ๐Ÿซถ

โœจ STYLE FILE โœจ

okay so the style file is basically makeindex's cheat sheet ๐Ÿ“๐Ÿ’– It tells makeindex what your .idx input files look like AND how the final output should look. ๐ŸŽ€ The file can live anywhere on the path set by the environment variable INDEXSTYLE. ๐Ÿ—บ๏ธ Inside, you've got a bunch of specifier, attribute pairs, and they can show up in any order, no stress ๐Ÿฆ‹ A line starting with % is a comment, so it gets ignored ๐Ÿ™ˆ

Quick guide to the placeholders: <string> is any arbitrary string wrapped in double quotes ("..."), <char> is one single letter wrapped in single quotes ('...'), and <number> is a nonnegative integer ๐Ÿ”ข Strings can be at most 2048 characters long ๐Ÿ“ And if you need a literal backslash or quote inside a string, you have to escape it with a backslash ๐Ÿ’…

Anything you don't set in the style file gets its default value, which is shown at the top of the rightmost column in the original layout โœจ So you only need to write down the stuff you want to change, bestie ๐Ÿซถ

โœจ INPUT STYLE SPECIFIERS โœจ

  • actual <char> โ€” default ยด@ยด. This is the symbol that tells makeindex the next entry should show up in the output file ๐ŸŽฏ
  • arg_close <char> โ€” default ยด}ยด. The closing delimiter for the index entry argument ๐Ÿ”’
  • arg_open <char> โ€” default ยด{ยด. The opening delimiter for the index entry argument ๐Ÿ”“
  • encap <char> โ€” default ยด|ยด. When this symbol shows up, everything after it becomes the encapsulating command for the page number ๐ŸŽ
  • escape <char> โ€” default ยด\\ยด. This symbol escapes whatever letter comes right after it ๐Ÿฆ„ The one exception is when the letter before it is the escape symbol itself, then it's just a regular character ๐Ÿ™ƒ Also, quote works the same way, escaping the letter that follows it, but if quote is preceded by escape, it's treated as an ordinary character too. โš ๏ธ The two symbols have to be different from each other, or things get chaotic ๐Ÿ’€
  • keyword <string> โ€” default "\\indexentry". This is the command that tells makeindex "hey, the argument here is an index entry" ๐Ÿ“ฃ
  • level <char> โ€” default ยด!ยด. The delimiter that marks a new level of subitem ๐ŸŒธ
  • page_compositor <string> โ€” default "-". This separates the parts of a composite page number, which you can read about in SPECIAL EFFECTS below ๐Ÿ‘€
  • quote <char> โ€” default ยด"ยด. This one escapes the letter immediately after it, but if escape comes right before it, it counts as an ordinary character instead ๐Ÿช„ Same rule as before: quote and escape must be distinct symbols ๐Ÿšซ
  • range_close <char> โ€” default ยด)ยด. The closing delimiter that marks the end of an explicit page range ๐Ÿ”š
  • range_open <char> โ€” default ยด(ยด. The opening delimiter that marks the start of an explicit page range ๐ŸŒ…

โœจ OUTPUT STYLE SPECIFIERS โœจ

  • preamble <string> โ€” default "\\begin{theindex}\n". This is what goes at the very top of the output file ๐ŸŒˆ
  • postamble <string> โ€” default "\n\n\\end{theindex}\n". This is what goes at the very bottom of the output file ๐Ÿ
  • setpage_prefix <string> โ€” default "\n \\setcounter{page}{". The beginning of the command that sets the starting page number ๐Ÿ”ข
  • setpage_suffix <string> โ€” default "}\n". The end of that same starting-page-number command ๐ŸŽ€
  • group_skip <string> โ€” default "\n\n \\indexspace\n". The vertical space that gets added before a brand new group starts ๐Ÿซง
  • headings_flag <string> โ€” default 0. This flag controls how new group headers look. Group headers get inserted before each new group, which covers symbols, numbers, and the 26 letters ๐Ÿ”ค A positive value puts an uppercase letter between the prefix and suffix, a negative value puts a lowercase letter there instead, and the default of 0 means no header at all ๐Ÿ™…โ€โ™€๏ธ
  • heading_prefix <string> โ€” default "". The letter heading prefix that goes in before a new letter begins ๐Ÿ–‹๏ธ
  • heading_suffix <string> โ€” default "". The letter heading suffix that goes in when a new letter begins ๐Ÿ–๏ธ
  • symhead_positive <string> โ€” default "Symbols". The heading for symbols, used when headings_flag is positive โœจ
  • symhead_negative <string> โ€” default "symbols". The heading for symbols, used when headings_flag is negative ๐ŸŒ™
  • numhead_positive <string> โ€” default "Numbers". The heading for numbers, used when headings_flag is positive ๐Ÿ”ข
  • numhead_negative <string> โ€” default "numbers". The heading for numbers, used when headings_flag is negative ๐Ÿงฎ
  • item_0 <string> โ€” default "\n \\item ". The command that goes between two primary (level 0) items ๐Ÿ’œ
  • item_1 <string> โ€” default "\n \\subitem ". The command that goes between two secondary (level 1) items ๐Ÿฆ‹
  • item_2 <string> โ€” default "\n \\subsubitem ". The command that goes between two level 2 items ๐Ÿงš
  • item_01 <string> โ€” default "\n \\subitem ". The command that goes between a level 0 item and a level 1 item ๐Ÿ’ซ
  • item_x1 <string> โ€” default "\n \\subitem ". Same as item_01, but this one is for when the level 0 item doesn't have any associated page numbers ๐Ÿซฅ
  • item_12 <string> โ€” default "\n \\subsubitem ". The command that goes between a level 1 item and a level 2 item ๐Ÿ“
  • item_x2 <string> โ€” default "\n \\subsubitem ". Same as item_12, but for when the level 1 item doesn't have any associated page numbers ๐ŸŒท
  • delim_0 <string> โ€” default ", ". The delimiter between a level 0 key and its first page number (so by default, a comma followed by a blank) ๐Ÿ’…
  • delim_1 <string> โ€” default ", ". The delimiter between a level 1 key and its first page number (default: comma followed by a blank) ๐Ÿ’–
  • delim_2 <string> โ€” default ", ". The delimiter between a level 2 key and its first page number (default: comma followed by a blank) ๐ŸŒธ
  • delim_n <string> โ€” default ", ". The delimiter between two page numbers for the same key, at any level (default: comma followed by a blank) ๐Ÿ“„
  • delim_r <string> โ€” default "--". The delimiter between the starting and ending page numbers of a range ๐ŸŒ‰
  • delim_t <string> โ€” default "". The delimiter tacked onto the end of a page list. Heads up, this one does nothing for entries that don't have a page list at all ๐Ÿคทโ€โ™€๏ธ
  • encap_prefix <string> โ€” default "\\". The first part of the prefix for the command that wraps around the page number ๐ŸŽ
  • encap_infix <string> โ€” default "{". The second part of that same prefix ๐Ÿง
  • encap_suffix <string> โ€” default "}".. The suffix for the command that wraps around the page number ๐ŸŽ€
  • page_precedence <string> โ€” default "rnaRA".. This sets the order that page types get sorted in ๐Ÿ“š The default goes: lowercase roman, then numeric/arabic, then lowercase alphabetic, then uppercase roman, then uppercase alphabetic ๐Ÿ” 
  • line_max <number> โ€” default 72. The maximum length of a line in the output. Anything longer than this wraps onto the next line ๐Ÿ“
  • indent_space <string> โ€” default "\t\t". The whitespace that goes in front of a wrapped line (by default, two tabs) ๐Ÿชถ
  • indent_length <number> โ€” default 16. The length of indent_space. The default of 16 is the same thing as two tabs ๐Ÿ”ข
  • suffix_2p <string> โ€” default "". A delimiter that replaces both the range delimiter and the second page number in a two page list. When it's set, it overrides delim_r. Example: "f." โœจ
  • suffix_3p <string> โ€” default "". A delimiter that replaces both the range delimiter and the second page number in a three page list. When it's set, it overrides both delim_r and suffix_mp. Example: "ff." ๐ŸŒŸ
  • suffix_mp <string> โ€” default "". A delimiter that replaces both the range delimiter and the second page number in a multiple page list (that means three or more pages). When it's set, it overrides delim_r. Example: "f." ๐Ÿ’ซ

โœจ EXAMPLES โœจ

๐ŸŽ€ TeX EXAMPLE ๐ŸŽ€

okay so first up, we've got a style file called book.ist ๐Ÿ“š It sets up an index for a book that can be formatted on its own, separate from the main source. bestie this is so clean ๐Ÿ’–

preamble
"\\documentstyle[12pt]{book}
\\begin{document}
\\begin{theindex}
{\\small\n"
postamble
"\n\n}
\\end{theindex}
\\end{document}\n"

now say a certain book style needs the index (and any chapters) to start on an odd page number ๐Ÿฆ‹ and the input file is called foo.idx. this command line makes the output go into footmp.ind โœจ

makeindex  -s book.ist  -o footmp.ind  -p odd  foo

we're using a non-default output file name here so we don't accidentally clobber the output for the book itself ๐Ÿ™ˆ (presumably foo.dvi, which would've been the default name for the index output file, lol!!) ๐Ÿ’€

๐ŸŒธ TROFF EXAMPLE ๐ŸŒธ

okay this one's a sample control file for making an index. we're gonna pretend it lives in sample.ist ๐Ÿงš

keyword "IX:"
preamble
".\\\" start of index output
\".\\\" enter two column mode
.2C
.SH
.ce
INDEX
.XS
INDEX
.XE
.R
.ps 9p
.vs 11p
.sp
.de I1
.ti 0.25i
..
.de I2
.ti 0.5i
.."
postamble "\n.\\\" end of index output"
setpage_prefix "\n.nr % "
setpage_suffix ""
group_skip "\n.sp 1.0"
headings_flag 1
heading_prefix "\n.IS\n"
heading_suffix "\n.IE"
item_0 "\n.br\n"
item_1 "\n.I1\n"
item_2 "\n.I2\n"
item_01 "\n.I1\n"
item_x1 "\n.I1\n"
item_12 "\n.I2\n"
item_x2 "\n.I2\n"
delim_0 ", "
delim_1 ", "
delim_2 ", "
delim_r "-"
delim_t "."
encap_prefix "\\fB"
encap_infix ""
encap_suffix "\\fP"
indent_space ""
indent_length 0

so the local macro package might need a little tweaking ๐Ÿ’… here's an example of an extension to the -ms macros. (heads up: at some sites this macro should replace a pre-existing macro with the same name, so check your setup!) ๐Ÿ‘€

.
.de IX
.ie '\\n(.z'' .tm IX: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9 {\\n(PN}
.el \\!.IX \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9 {\\n(PN}
..

(the string {\\n(PN} is separated from the rest of the line by a tab, so keep that tab in there ๐Ÿซถ) if your local macro package doesn't have this extension, just pop those lines at the beginning of your file. next, here's a simple troff(1) input file that we'll pretend is called sample.txt ๐Ÿ“

This is a sample file to test the \fImakeindex\fP(1L)
program, and see
.IX {indexing!programs!C language}
.IX {makeindex@\fImakeindex\fP(1L)}
.bp
.rs
.IX {Knuth}
.IX {typesetting!computer-aided}
how well it functions in the \fItroff\fP(1) environment.

the main thing to know: index entries are marked with the .IX macro, and that makes the text that follows get written to stdout, along with the current page number ๐Ÿ”ฅ

๐Ÿš CREATING THE INDEX FILE IN THE BOURNE SHELL ๐Ÿš

so to make an input file for makeindex in the Bourne shell, you want to do whatever the equivalent at your site is of this command ๐Ÿ’œ

psroff -ms -Tpsc -t sample.txt > /dev/null 2> sample.tmp

some sites will need ditroff instead of psroff, so keep that in mind โœจ to filter out any genuine error messages, call in grep(1) like this:

grep '^IX: ' sample.tmp > sample.idx

๐ŸŒˆ CREATING THE INDEX FILE USING UCSF ENHANCED TROFF/TRANSCRIPT ๐ŸŒˆ

with UCSF Enhanced troff/TRANSCRIPT, the -I option of psroff(1L) can produce both the formatter output and an index file at the same time. it's giving efficiency ๐ŸคŒ

psroff -ms -I sample.inp -Tpsc sample.txt

and if you wanna suppress the formatter output, do this instead ๐Ÿ™ˆ

psroff -ms -I sample.inp -Tpsc -t sample.txt > /dev/null

๐ŸŽฏ COMPLETING THE INDEX ๐ŸŽฏ

no matter which of the above routes you take, the input for makeindex ends up in sample.inp ๐Ÿซถ next step is to invoke makeindex:

makeindex -s sample.ist sample.idx

and that leaves you with troff(1)-ready output in the file sample.ind ๐ŸŽ€


๐Ÿ’… ORDERING ๐Ÿ’…

okay so by default, makeindex assumes word ordering ๐Ÿ”ค but if the -l option is in effect, it switches to letter ordering. the big difference: in word ordering, a blank comes before any letter in the alphabet, whereas in letter ordering, a blank doesn't count at all ๐Ÿ™ˆ look at this example and you'll get it immediately:

word order                      letter order
sea lion                        seal
seal                            sea lion

numbers are always sorted in numeric order, no debate ๐Ÿ”ข

9 (nine),  123
10 (ten), see Derek, Bo

letters get sorted first without caring about case. when words are identical, the uppercase version goes before its lowercase counterpart โœจ

now a special symbol is defined here as any character that isn't in the union of digits and English alphabetic characters ๐Ÿ‘‘ patterns starting with special symbols come first, then numbers, then patterns starting with letters. and as a special case, a string that starts with a digit but is mixed with non-digits counts as a pattern starting with a special character. ๐Ÿ’€ it's a whole vibe, but that's the rule ๐Ÿ˜ญ

โœจ SPECIAL EFFECTS โœจ

okay so this part is where makeindex gets to show off ๐Ÿ’… bestie, entries can do sooo much more than plain text. Watch this:

\indexentry{alpha}{1}
\indexentry{alpha!beta}{3}
\indexentry{alpha!beta!gamma}{10}

in your input file get turned into

\item alpha, 1
   \subitem beta, 3
      \subsubitem gamma, 10

in the output index file. Notice that the level symbol (!) is what splits things into levels above ๐ŸŒธ

It's also possible to make an item show up in a specific form with the actual (@) operator. For instance,

\indexentry{alpha@{\it alpha\/}}{1}

will become

\item {\it alpha\/},  1

after processing ๐ŸŽ€ The bit before the @ is used as the sort key, and the bit after it is what actually gets written to the output file. Also, two entries with the same key, one with the actual operator and one without, count as distinct entries. Not the same girl, different vibe ๐Ÿ™ˆ

The item, subitem, and subsubitem fields can each have their own sort keys too:

\indexentry{aa@{\it aa\/}!bb@{\it bb\/}!cc@{\it cc\/}}{1}

This will be converted to

\item {\it aa}, 1
   \subitem {\it bb}, 3
      \subsubitem {\it cc}, 10

Now the encap (|) operator is the one that wraps a page number in a command you pick ๐Ÿฆ‹

\indexentry{alpha|bold}{1}

will be converted to

\item alpha, \bold{1}

where, with a suitable definition for TeX, \bold{n} will expand to {\bf n}. In this example, the three output attributes linked to page encapsulation, which are encap_prefix, encap_infix, and encap_suffix, correspond to backslash, left brace, and right brace, in that order. This is how page numbers get set in different fonts! Like, the page where a keyword is defined can be in one font, the spot with a primary example in another, and everything else in a third font. Iconic organisation energy โœจ

The encap operator can also make cross references:

\indexentry{alpha|see{beta}}{1}

will become

\item alpha, \see{beta}{1}

in the output file, where

\see{beta}{1}

will expand to

{\it see\/} beta
Heads up: in a cross reference like this, the page number disappears ๐Ÿ’€

A pair of encap concatenated with range_open (|() and range_close (|)) makes an explicit page range ๐ŸŒˆ

\indexentry{alpha|(}{1}
\indexentry{alpha|)}{5}

will become

\item alpha, 1โ€”5

Pages indexed with the same key in between get merged into the range automatically. This is seriously useful when you want a whole section indexed, because you only need to put the range opening and closing operators at the start and end of that section. Explicit page ranges can also take an extra command to set the range in a special font:

\indexentry{alpha|(bold}{1}
\indexentry{alpha|)}{5}

will become

\item alpha, \bold{1--5}

Now, a few potential problems are worth knowing about, bestie ๐Ÿซถ First, entries like these:

\indexentry{alpha|(}{1}
\indexentry{alpha|bold}{3}
\indexentry{alpha|)}{5}

will be interpreted as

\item alpha, \bold{3}, 1--5

but you'll get a warning message in the transcript about an inconsistent page encapsulator ๐Ÿ˜ญ An explicit range that starts with a Roman page number and ends in Arabic is also an error. In that case, if it's possible, the range gets split into two subranges, one Roman and one Arabic. For instance,

\indexentry{alpha|(}{i}
\indexentry{alpha}{iv}
\indexentry{alpha}{3}
\indexentry{alpha|)}{7}

will be turned into

\item alpha, i--iv, 3--7

with a warning in the transcript file complaining about an illegal range formation.

Every special symbol mentioned in this section can be escaped with the quote operator ("). So

\indexentry{alpha"@beta}{1}

will actually become

\item alpha@beta,  1

when you run makeindex. The quoting power of quote gets cancelled if it's immediately preceded by escape (\). For example,

\indexentry{f\"ur}{1}

becomes

\item f\"ur, 1

which represents an umlaut-accented u to the TeX family of processors ๐Ÿฆ‹

A page number can be a composite of one or more fields separated by the delimiter bound to page_compositor (-). For example, II-12 means page 12 of Chapter II. Page numbers can have up to ten fields, which is a lot of chapters, honestly ๐Ÿ“–


๐ŸŒˆ ASCII ENERGY ๐ŸŒˆ

Since version 2.11 of makeindex, the quote operator can quote any character in the range 1 ... 255. Character 0 is excluded because makeindex uses it internally in its source code as a string terminator. With this change, sort keys can be made for all eight-bit characters except 0. The sorting order is

  1. punctuation characters (in ASCII order),
  2. digits,
  3. control characters (1 ... 31),
  4. space (32),
  5. letters (ignoring case),
  6. characters 127 ... 255.

Here's an example that indexes all printable ASCII characters other than letters and digits, assuming the default TeX format. For convenience, the page number references are the matching ASCII ordinal values ๐Ÿ“

\indexentry{" @"  (space)}{32}
\indexentry{"!@"! (exclamation point)}{33}
\indexentry{""@"" (quotation mark)}{34}
\indexentry{"#@"\# (sharp sign)}{35}
\indexentry{"$@"\$ (dollar sign)}{36}
\indexentry{"%@"\% (percent sign)}{37}
\indexentry{"&@"\& (ampersand)}{38}
\indexentry{"<@"$<$ (left angle bracket)}{60}
\indexentry{"=@"= (equals)}{61}
\indexentry{">@"$>$ (right angle bracket)}{62}
\indexentry{"?@"? (query)}{63}
\indexentry{"@@"@ (at sign)}{64}
\indexentry{"[@"[ (left square bracket)}{91}
\indexentry{"\@"\verb=\= (backslash)}{92}
\indexentry{"]@"] (right square bracket)}{93}
\indexentry{"^@"\verb=^= (caret)}{94}
\indexentry{"_@"\verb=_= (underscore)}{95}
\indexentry{"`@"\verb=~= (grave accent)}{96}
\indexentry{"{@"\"{ (left brace)}{123}
\indexentry{"|@"\verb="|= (vertical bar)}{124}
\indexentry{"}@"\"} (right brace)}{125}
\indexentry{"~@"\verb=~= (tilde)}{126}

Characters in the actual fields after the @ that mean something special to TeX have to be written as control sequences, or as math mode characters. Pay extra attention to how the at sign, the left and right braces, and the vertical bar are coded ๐Ÿ‘€ The index file makeindex spits out for this example looks like this:

\begin{theindex}

  \item ! (exclamation point), 33
  \item " (quotation mark), 34
  \item \# (sharp sign), 35
  \item \$ (dollar sign), 36
  \item \% (percent sign), 37
  \item \& (ampersand), 38
  \item $<$ (left angle bracket), 60
  \item = (equals), 61
  \item $>$ (right angle bracket), 62
  \item ? (query), 63
  \item @ (at sign), 64
  \item [ (left square bracket), 91
  \item \verb=\= (backslash), 92
  \item ] (right square bracket), 93
  \item \verb=^= (caret), 94
  \item \verb=_= (underscore), 95
  \item \verb=~= (grave accent), 96
  \item \{ (left brace), 123
  \item \verb=|= (vertical bar), 124
  \item \} (right brace), 125
  \item \verb=~= (tilde), 126

  \indexspace

  \item   (space), 32

\end{theindex}

๐ŸŽ€ FILES ๐ŸŽ€

  • makeindex โ€” executable file
  • $TEXMFMAIN/tex/plain/makeindex/idxmac.tex โ€” TeX macro file used by makeindex
  • $TEXMFMAIN/tex/latex/base/makeidx.sty โ€” TeX macro file used by makeindex

๐Ÿ“š SEE ALSO ๐Ÿ“š

Check these out if you want more:

  • ditroff(1L)
  • latex(1L)
  • make.index (1L)
  • qsort(3)
  • tex(1L)
  • troff(1L)

Papers and reports, if you're feeling academic ๐Ÿค“

  • UCSF Enhanced troff/TRANSCRIPT โ€” An Overview, R. P. C. Rodgers and Conrad Huang, LSMB Technical Report 90-2, UCSF School of Pharmacy, San Francisco, 1990.
  • Index Preparation and Processing, Pehong Chen and Michael A. Harrison, Software: Practice and Experience, 19(9), 897โ€“915, September 1988.
  • Automating Index Preparation, Pehong Chen and Michael A. Harrison. Technical Report 87/347, Computer Science Division, University of California, Berkeley, 1987 (a LaTeX document supplied with makeindex).
  • MakeIndex: An Index Processor for LaTeX, Leslie Lamport, February 1987 (a LaTeX document supplied with makeindex).
  • Tools for Printing Indices, Jon L. Bentley and Brian W. Kernighan, Electronic Publishing โ€” Origination, Dissemination, and Design, 1(1), 3โ€“18, June 1988 (also available as: Computing Science Technical Report No. 128, AT&T Bell Laboratories, Murray Hill, NJ 07974, 1986).

๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

Pehong Chen, Chen & Harrison International Systems, Inc. Palo Alto, California, USA.

Manual page extensively revised and corrected, and troff(1) examples created by Rick P. C. Rodgers, UCSF School of Pharmacy.


๐Ÿซถ ACKNOWLEDGMENTS ๐Ÿซถ

Leslie Lamport contributed significantly to the design of MakeIndex. Michael Harrison provided valuable comments and suggestions. Nelson Beebe improved on the portable version, and maintained the source distribution for the TeX Users Group for many years. Andreas Brosig contributed to the German word ordering. The modification to the -ms macros was derived from a method proposed by Ravi Sethi of AT&T Bell Laboratories. The LOG and CONTRIB files in the makeindex source distribution record other contributions.

makeindex is currently maintained as part of the TeX Live distribution (http://tug.org/texlive); please send bug reports to tex-k@tug.org.


๐ŸŒธ And that's a wrap, bestie! This one's from the TeX Live crew, last updated 12 November 2014 ๐Ÿ’– Go make your indexes slay โœจ๐Ÿ’…

๐Ÿ“ฆ where this page comes from
  • alpine 3.24: texmf-dist-doc 2026.0-r0 ยท LPPL-1.0 AND LPPL-1.1 AND LPPL-1.2 AND LPPL-1.3a AND LPPL-1.3c AND GPL-2.0-only
  • ๐Ÿ’– girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms