Table of Contents

%META:TOPICINFO{author=“HerbertVoss” date=“1354971525” format=“1.1” reprev=“1.1” version=“1.1”}% %META:TOPICPARENT{name=“Verzeichnisse”}%

Programm MakeIndex

Make-Index is a general purpose index processor. It takes one or more raw index files (normally generated by a formatter), sorts the entries, and produces the actual index file. It is not dependent on

any particular format of raw index file, although the “literal”>.idx file generated by LaTeX is the default. Up to hree levels (0, 1, and 2) of subitem nesting within the same entry s supported. The input format may be redefined in a style file so hat raw index or glossary output from other formatters may be rocessed. The style file also defines the style of output index ile. Unless specified otherwise, the file name base of the first nput file (idx0) is used to determine ther related input/output files. The default input file type is idx.

<a id="makeindex-options" name="makeindex-options"></a>Options

Make-Index is a Unix program, and therefore has a Unix-style command line. Instead of qualifiers delimited with a slash /), Make-Index options are delimited ith a hyphen (-).

<a id="makeindex-option-c" name="makeindex-option-c"></a> -c

<br />Enable blank compression. By default every blank counts in the index key. The -c option ignores reading and trailing blanks and tabs and compresses intermediate nes to a single space.

<a id="makeindex-option-g" name="makeindex-option-g"></a> -g

Employ German word ordering in the index, in accord with rules set forth in DIN 5007. The quote character must be redefined in a style file (for example, redefine quote as “literal”>'+'). If the quote character is not redefined, Make-Index will produce an error message and abort.

<a id="makeindex-option-i" name=<br />"makeindex-option-i"></a> -i

Use stdin as the input file. When this option is specified and the -o is not, output is written to stdout.

<a id="makeindex-option-l" name="makeindex-option-l"></a> -l

Use letter ordering. Default is word ordering (explained in the

<a id="makeindex-option-q" name="makeindex-option -q"></a> -q

<br />Quiet mode, send no messages to “literal”>stderr. By default progress and error messages are sent to stderr as well as the transcript file. The -q option disables the stderr messages.

<a id="makeindex-option-r" name="makeindex-option-r"></a> -r

Disable implicit page range formation. By default three or more successive pages will be automatically abbreviated as a range (e.g. 1–5). The -r option disables it, making the explicit range operators the only way to create page ranges (see the <a class=“link” href=“#makeindex-special-effects”<br />title=“5 Special Effects”>Special Effects</a> section below).

<a id="makeindex-option-s-sty" name="makeindex-option-s-sty"></a> -s<br />sty

Take sty as the style file. There is no default for the style file name. The environment variable INDEXSTYLE defines the path where the style file should be found.

<a id="makeindex-option-o-ind" name="makeindex-option-o-ind"></a> -o<br />ind

Take ind as the output index file.<br />By default the file name base of the first input file “literal”>idx0 concatenated with the extension “literal”>.ind is used as the output file name.

<a id="makeindex-option-t-log" name="makeindex-option-t-log"></a> -t<br />log

Take log as the transcript file. By default the file name base of the first input file “literal”>idx0 concatenated with the extension “literal”>.ilg is used as the transcript file name.

<a id="makeindex-option-p-no" name="makeindex-option-p-no"></a> -p<br />no

Set the starting page number of the output index file to be no. This is useful when the index file is to be formatted separately. Other than pure numbers, three special cases are allowed for no: any, odd, and “literal”>even. In these special cases, the starting page number is determined by retrieving the last page number from the source log file. The source log file name is determined by concatenating the file name base of the first raw index file (idx0) with the extension “literal”>.log. The last source page is obtained by searching backward in the log file for the first instance of a number included in […]. If a page number is missing or the log file is not found, no attempt will be made to set the starting page number. The meaning of each of these cases follows:

<a id="makeindex-option-L" name="makeindex-option-L"></a> -L

<br />Sort based on locale settings. String comparisons for sorting are done using “command”> strcoll(3), which compares strings according to the current locale category “literal”>LC_COLLATE.

Not available on all systems (depends on compile time settings).

<a id="makeindex-option-T" name="makeindex-option-T"></a> -T

Special support for Thai documents.

Not available on all systems (depends on compile time settings).

<a id="makeindex-style-file" name="makeindex-style-file"></a>Style File

The style file format is very simple. It is a list of pairs. There are two types of specifiers (input and output). The pairs don't have to obey any particular order in the file. A line lead by `%' is a comment. The following is a list of all the specifiers and their respective arguments where <string> is an arbitrary string delimited by double quotes (“…”), <char> is a single letter embraced by single quotes ('…'), and <number> is a nonnegative integer. The maximum length of a “literal”><string> is 144. Notice that a backslash must be escaped (by an extra backslash) in the string quotation. Anything not specified in the style file will be assigned a default value, which is shown on a separate line. This file can reside anywhere in the path defined by the environment variable INDEXSTYLE.

<a id="makeindex-style" name="makeindex-style"></a> Input Style Specifiers

<a id="makeindex-actual-char" name="makeindex-actual-char"></a> actual <char>

<br />Default: @

The symbol which indicates that the next entry is to appear in<br />the actual index file.

<a id="makeindex-arg-close" name="makeindex-arg-close"></a> arg_close <char>

Default: }

This is the closing delimiter for the index entry argument.

<a id="makeindex-style-arg-open" name="makeindex-style-arg-open"></a> arg_open <char>

<br /><a id=“idp11906208” class=“indexterm” name=“idp11906208”></a>

Default: {

This is the opening delimiter for the index entry argument.

<a id="makeindex-encap-char" name=<br />"makeindex-encap-char"></a>2.1.4 encap <char>

<br /><a id=“idp11910752” class=“indexterm” name=“idp11910752”></a>

Default: |

The symbol which indicates that the rest of the argument list is<br />to be used as the encapsulating command for the page number.

<a id="makeindex-escape-char" name=<br />"makeindex-escape-char"></a>2.1.5 escape <char>

<br /><a id=“idp11915408” class=“indexterm” name=“idp11915408”></a>

Default: \ The symbol which escapes the next letter, unless its preceding<br />letter is escape. In other words, quote is used to escape the<br />letter which immediately follows it. But if it is preceded by<br />escape, it does not escape anything.

Notice that the two symbols must be distinct.

<a id="makeindex-style-string" name=<br />"makeindex-style-string"></a>2.1.6 keyword <string>

<br /><a id=“idp11920576” class=“indexterm” name=“idp11920576”></a>

Default: “\\indexentry”

This is the command which tells Make-Index that its argument is<br />an index entry.

<a id="makeindex-level-char" name=<br />"makeindex-level-char"></a>2.1.7 level <char>

<br /><a id=“idp11925648” class=“indexterm” name=“idp11925648”></a>

Default: !

The delimiter which denotes a new level of subitem.

<a id="makeindex-quote-char" name=<br />"makeindex-quote-char"></a>2.1.8 quote <char>

<br /><a id=“idp11930176” class=“indexterm” name=“idp11930176”></a>

Default: “

quote is used to escape the letter<br />which immediately follows it, but if it is preceded by escape, it<br />is treated as a ordinary character. These two symbols must be<br />distinct.

<a id="makeindex-range-close" name=<br />"makeindex-range-close"></a>2.1.9 range_close <char>

<br /><a id=“idp11935456” class=“indexterm” name=“idp11935456”></a>

Default: )

The closing delimiter indicating the end of an explicit page<br />range.

<a id="makeindex-range-open" name=<br />"makeindex-range-open"></a>2.1.10 range_open <char>

<br /><a id=“idp11939984” class=“indexterm” name=“idp11939984”></a>

Default: (

The opening delimiter indicating the beginning of an explicit<br />page range.

<a id="makeindex-output-style-specs" name=<br />"makeindex-output-style-specs"></a>2.2 Output Style Specifiers

<br /><a id=“idp11944672” class=“indexterm” name=“idp11944672”></a>

<a id="makeindex-page-compositor" name=<br />"makeindex-page-compositor"></a>2.2.1 page_compositor<br /><string>

<br /><a id=“idp11947360” class=“indexterm” name=“idp11947360”></a>

Default: ”-“

This specifier is used to separate a range of page numbers.

Officially undocumented!

<a id="makeindex-output-preamble-string" name=<br />"makeindex-output-preamble-string"></a>2.2.2 preamble<br /><string>

<br /><a id=“idp11952416” class=“indexterm” name=“idp11952416”></a>

Default: “\\begin{theindex}\n”

The preamble of actual index file.

<a id="makeindex-output-postamble-string" name=<br />"makeindex-output-postamble-string"></a>2.2.3 postamble<br /><string>

<br /><a id=“idp11957040” class=“indexterm” name=“idp11957040”></a>

Default: “literal”>“\n\n\\end{theindex}\n”

The postamble of actual index file.

<a id="makeindex-output-setpage-prefix" name=<br />"makeindex-output-setpage-prefix"></a>2.2.4 setpage_prefix<br /><string>

<br /><a id=“idp11961680” class=“indexterm” name=“idp11961680”></a>

Default: “\n<br />\\setcounter{page}{”

The prefix of the command which sets the starting page<br />number.

<a id="makeindex-output-setpage-suffix" name=<br />"makeindex-output-setpage-suffix"></a>2.2.5 setpage_suffix<br /><string>

<br /><a id=“idp11966320” class=“indexterm” name=“idp11966320”></a>

Default: ”}\n“

The suffix of the command which sets the starting page<br />number.

<a id="makeindex-output-group-skip" name=<br />"makeindex-output-group-skip"></a>2.2.6 group_skip<br /><string>

<br /><a id=“idp11970992” class=“indexterm” name=“idp11970992”></a>

Default: “\n\n \\indexspace\n

The vertical space to be inserted before a new group begins.

<a id="makeindex-output-heading-prefix-string"<br />name="makeindex-output-heading-prefix-string"></a>2.2.7<br />heading_prefix <string>

<br /><a id=“idp11975616” class=“indexterm” name=“idp11975616”></a>

Default: ”“

The header prefix to be inserted before a new letter begins.

<a id="makeindex-output-heading-suffix-string"<br />name="makeindex-output-heading-suffix-string"></a>2.2.8<br />heading_suffix <string>

<br /><a id=“idp11980256” class=“indexterm” name=“idp11980256”></a>

Default: ”“

The header suffix to be inserted before a new letter begins.

<a id="makeindex-output-headings-flag" name=<br />"makeindex-output-headings-flag"></a>2.2.9 headings_flag<br /><string>

<br /><a id=“idp11984848” class=“indexterm” name=“idp11984848”></a>

Default: 0

The flag indicating the condition of inserting new letter<br />header. Default is 0, which means no header. Positive means insert<br />an uppercase letter between prefix and suffix. Negative means<br />insert a lowercase letter.

“2.2.10 symhead_positive <string>”>

<a id="makeindex-output-symhead-positive" name=<br />"makeindex-output-symhead-positive"></a>2.2.10 symhead_positive<br /><string>

<br /><a id=“idp11989600” class=“indexterm” name=“idp11989600”></a>

Default: “Symbols”

Heading for symbols to be inserted if “literal”>headings_flag is positive.

“2.2.11 symhead_negative <string>”>

<a id="makeindex-output-symhead-negative" name=<br />"makeindex-output-symhead-negative"></a>2.2.11 symhead_negative<br /><string>

<br /><a id=“idp11994928” class=“indexterm” name=“idp11994928”></a>

Default: “symbols”

Heading for symbols to be inserted if “literal”>headings_flag is negative.

“2.2.12 numhead_positive <string>”>

<a id="makeindex-output-numhead-positive" name=<br />"makeindex-output-numhead-positive"></a>2.2.12 numhead_positive<br /><string>

<br /><a id=“idp12000304” class=“indexterm” name=“idp12000304”></a>

Default: “Numbers”

Heading for numbers to be inserted if “literal”>headings_flag is positive.

“2.2.13 numhead_negative <string>”>

<a id="makeindex-output-numhead-negative" name=<br />"makeindex-output-numhead-negative"></a>2.2.13 numhead_negative<br /><string>

<br /><a id=“idp12005680” class=“indexterm” name=“idp12005680”></a>

Default: “numbers”

Heading for numbers to be inserted if “literal”>headings_flag is negative.

<a id="makeindex-output-item-0" name=<br />"makeindex-output-item-0"></a>2.2.14 item_0 <string>

<br /><a id=“idp12010960” class=“indexterm” name=“idp12010960”></a>

Default: “\n \\item ”

The command to be inserted between two primary (level 0)<br />items.

<a id="makeindex-output-item-1" name=<br />"makeindex-output-item-1"></a>2.2.15 item_1 <string>

<br /><a id=“idp12015584” class=“indexterm” name=“idp12015584”></a>

Default: “\n \\subitem ”

The command to be inserted between two secondary (level 1)<br />items.

<a id="makeindex-output-item-2" name=<br />"makeindex-output-item-2"></a>2.2.16 item_2 <string>

<br /><a id=“idp12020208” class=“indexterm” name=“idp12020208”></a>

Default: “\n \\subsubitem ”

The command to be inserted between two level 2 items.

<a id="makeindex-output-item-01" name=<br />"makeindex-output-item-01"></a>2.2.17 item_01 <string>

<br /><a id=“idp12024896” class=“indexterm” name=“idp12024896”></a>

Default: “\n \\subitem ”

The command to be inserted between a level 0 item and a level 1<br />item.

<a id="makeindex-output-item-x1" name=<br />"makeindex-output-item-x1"></a>2.2.18 item_x1 <string>

<br /><a id=“idp12029520” class=“indexterm” name=“idp12029520”></a>

Default: “\n \\subitem ”

The command to be inserted between a level 0 item and a level 1<br />item. The difference between this and previous is that in this case<br />the level 0 item doesn't have any page numbers.

<a id="makeindex-output-item-12" name=<br />"makeindex-output-item-12"></a>2.2.19 item_12 <string>

<br /><a id=“idp12034256” class=“indexterm” name=“idp12034256”></a>

Default: “\n \\subsubitem ”

The command to be inserted between a level 1 item and a level 2<br />item.

<a id="makeindex-output-item-x2" name=<br />"makeindex-output-item-x2"></a>2.2.20 item_x2 <string>

<br /><a id=“idp12038928” class=“indexterm” name=“idp12038928”></a>

Default: “\n \\subsubitem ”

The command to be inserted between a level 1 item and a level 2<br />item. The difference between this and previous is that in this case<br />the level 1 item doesn't have any page numbers.

<a id="makeindex-output-delim-0" name=<br />"makeindex-output-delim-0"></a>2.2.21 delim_0 <string>

<br /><a id=“idp12043712” class=“indexterm” name=“idp12043712”></a>

Default: ”, “

The delimiter to be inserted between a level 0 key and its first<br />page number. Default is a comma followed by a blank.

<a id="makeindex-output-delim-1" name=<br />"makeindex-output-delim-1"></a>2.2.22 delim_1 <string>

<br /><a id=“idp12048368” class=“indexterm” name=“idp12048368”></a>

Default: ”, “

The delimiter to be inserted between a level 1 key and its first<br />page number. Default is a comma followed by a blank.

<a id="makeindex-output-delim-2" name=<br />"makeindex-output-delim-2"></a>2.2.23 delim_2 <string>

<br /><a id=“idp12053040” class=“indexterm” name=“idp12053040”></a>

Default: ”, “

The delimiter to be inserted between a level 2 key and its first<br />page number. Default is a comma followed by a blank.

<a id="makeindex-output-delim-n" name="makeindex-output-delim-n"></a> delim_n <string>

<br /><a id=“idp12057696” class=“indexterm” name=“idp12057696”></a>

Default: ”, “

The delimiter to be inserted between two page numbers for the<br />same key in any level. Default is a comma followed by a blank.

<a id="makeindex-output-delim-r" name="makeindex-output-delim-r"></a> delim_r <string>

<br /><a id=“idp12062368” class=“indexterm” name=“idp12062368”></a>

Default: ”–“

The delimiter to be inserted between the starting and ending<br />page numbers of a range.

<a id="makeindex-output-delim-t" name="makeindex-output-delim-t"></a> delim_t <string>

Default: ”“

The delimiter to be inserted at the end of a page list. This delimiter has no effect on entries which have no associated page list.

<a id="makeindex-output-encap-prefix" name="makeindex-output-encap-prefix"></a> encap_prefix<br /><string>

Default: “\\”

The prefix for the command which encapsulates the page number.

<a id="makeindex-output-encap-infox" name="makeindex-output-encap-infox"></a> encap_infix<br /><string>

Default: ”{“

The prefix for the command which encapsulates the page number.

<a id="makeindex-output-encap-suffix" name="makeindex-output-encap-suffix"></a> encap_suffix<br /><string>

Default: ”}“

The suffix for the command which encapsulates the page number.

<a id="makeindex-output-line-max" name="makeindex-output-line-max"></a> line_max <number>

Default: 72

The maximum length of a line in the output beyond which a line wraps around.

<a id="makeindex-output-indent-space" name="makeindex-output-indent-space"></a> indent_space<br /><string>

Default: “\t\t”

The space to be inserted in front of a wrapped line. Default is two tabs.

<a id="makeindex-output-indent-length" name="makeindex-output-indent-length"></a> indent_length<br /><number>

<br />Default: 16

The length of indent_space. In the default case this is 16 (for 2 tabs).

<a id="makeindex-output-suffix-2p" name=<br />"makeindex-output-suffix-2p"></a> suffix_2p<br /><string>

<br />Default: ”“

Delimiter to replace the range delimiter and the second pagenumber of a two page list. When present, it overrides “literal”>delim_r.

<a id="makeindex-output-suffix-3p" name=<br />"makeindex-output-suffix-3p"></a> suffix_3p<br /><string>

<br />Default: ”“

Delimiter to replace the range delimiter and the second page<br />number of a three page list. When present, it overrides<br />delim_r and “literal”>suffix_mp.

<a id="makeindex-output-suffix-mp" name="makeindex-output-suffix-mp"></a> suffix_mp<br /><string>

<br />Default: ”“

Delimiter to replace the range delimiter and the second page number of a multiple page list (three or more pages). When present, it overrides delim_r.

<a id="makeindex-example"<br />name="makeindex-example"></a>Example

<br />The following example shows a style file called “literal”>book.isty which defines a stand-alone index for a book. By stand-alone, we mean it can be formatted independent of the main source.

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

Suppose a particular book style requires the index (as well as any chapters) to start from an odd page number. Given “literal”>foo.idx as the raw index file, the following command line produces an index in file “literal”>foo-.ind.

makeindex -s book.isty -o foo-.ind -p odd foo 

The reason to use a non-default output file name is to avoid clobbering the source output (presumably “literal”>foo.dvi) because if the index is in file foo.ind, its output will also be in foo.dvi as a result of separate formatting using . In the example the index is in “literal”>foo-.ind, its output will be in “literal”>foo-.dvi and thus introduces no confusion.

<a id="makeindex-ordering"<br />name="makeindex-ordering"></a>Ordering

<br />By default makeindex assumes word ordering. The -l option turns it into letter ordering. The only difference is whether a blank is treated as an effective letter or not. In word ordering, a blank precedes any letter in the alphabet, whereas in letter ordering, it doesn't count at all. This is best illustrated by the following example:

_word<br />order_ _letter<br />order_
sea lion seal
seal seal lion

Numbers are sorted in numeric order. For instance,

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

Letters are first sorted with uppercase and lowercase considered identical; then, within identical words the uppercase letter precedes its lowercase counterpart.

Patterns lead by a special symbol precede numbers, which precede patterns lead by a letter. The symbol here refers to anything not in the union of digits and English alphabet. This includes those which follow 'z' in the ASCII chart. As a special case, anything started with a digit but mixed with non-digits is considered a symbol-leading pattern instead of a number.

<a id="makeindex-special-effects" name="makeindex-special-effects"></a>Special Effects

<br />In the normal case entries such as

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

in the raw index file will be converted to

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

in the output index file by Make-Index. Notice that the level symbol () is used to delimit levels of nesting.

It is possible to make an item appear in a designated form by using the actual (@) operator. For instance,

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

will become

\item {\it alpha\/} 1 

after the conversion. The idea is that the pattern preceding @ is used as sort key, whereas the one following it is put in the actual result. However, the same key with and without the actual part are regarded as distinct entries.

It is also possible to encapsulate a page number with a designated command using the encap (|) operator. For example, in the default case,

\indexentry{alpha|bold}{1} 

will be converted to

\item alpha \bold{1} 

where \bold{n} will expand to {\bf n}. This allows the encap operator to be used to set pages in different fonts, thereby conveying more information about whatever being indexed. For instance, given the same key the page where its definition appears can be in one font while where its primary example is given can be in another, with other ordinary appearances in a third. Notice that in this example, the three output attributes associated with page encapsulation encap_prefix, encap_infix, and “literal”>encap_suffix correspond respectively to backslash, left brace, and right brace. If this is to be formatted by languages other than , they would be defined differently.

By the same token, the encap operator can be used to make cross references in the index. For instance,

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

will become

\item alpha \see{beta}{1} 

in the output index file after the conversion, where

\see{beta}{1} 

will expand to

{\it see\/} beta 

Notice that in a cross reference like this the page number disappears. Therefore, where to insert such a command in the source is immaterial.

A pair of encap concatenated with “literal”>range_open (|() and with range_close (“literal”>|)) creates an explicit page range. That is,

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

will become

\item alpha, 1--5 

Intermediate pages indexed by the same key will be merged into the range implicitly. This is especially useful when an entire section about a particular subject is to be indexed, in which case only the range opening and closing operators need to be inserted at the beginning and end of the section, respectively. This explicit page range formation can also include an extra command to set the page range in a designated font. Thus

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

will become

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

A couple of special cases are worth mentioning here. First, entries like

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

will be interpreted as

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

but with a warning message in the transcript about the encounter of an inconsistent page encapsulator. Secondly, an explicit range beginning in a Roman page number and ending in Arabic is considered an error. In a case like this the range is broken into two subranges, if possible, one in Roman, the other in Arabic. For instance,

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

will be turned into

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

with a warning message in the transcript complaining about the illegal range formation. Finally, every special symbol mentioned in this section may be escaped by the quote operator (”). Thus

\indexentry{alpha"@beta}{1}  

will actually become

\item alpha@beta, 1 

as a result of executing Make-Index. However, if quote is preceded by escape (\), its following letter is not escaped. That is,

\indexentry{f\"ur}{1}  

means

\item f\"ur, 1 

which represents umlaut accented u to the family of processors.

– Main.HerbertVoss - 08 Dec 2012