12.07.2015 Views

The memoir class - The UK TeX Archive

The memoir class - The UK TeX Archive

The memoir class - The UK TeX Archive

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

17. BACK MATTER\item bridge, 2,3,7\subitem railway, 24\subsubitem Tay, 37bridge, 2, 3, 7railway, 24Tay, 37if the Tay Bridge 1 was mentioned on page 37.17.2.3 MakeIndexIt is possible, but time consuming and error prone, to create your index by hand from theoutput of the \index commands you have scattered throughout the text. Most use theMakeIndex program to do this for them; there is also the xindy program [Keh98] but this ismuch less known.\xindyindexIt turns out that xindy cannot handle a <strong>memoir</strong> hyperindex (which can be obtained withthe aid of the hyperref package), although MakeIndex can do so. 2 If you are going to usexindy to process the raw index data put \xindyindex in the preamble, which will preventhyperindexing.MakeIndex reads an idx file containg the raw index data (which may include somecommands to MakeIndex itself), sorts the data, and then outputs an ind file containing thesorted data, perhaps with some La<strong>TeX</strong> commands to control the printing. MakeIndex wascreated as a general purpose index processing program and its operation can be controlledby a ‘makeindex configuration file’ (by default this is an ist file). Such a file consists oftwo parts. <strong>The</strong> first part specifies MakeIndex commands that can be included in the 〈stuff 〉argument to \index. <strong>The</strong> second part controls how the sorted index data is to be output.I will only describe the most common elements of what you can put in an ist file;consult the MakeIndex manual [CH88], or the Companion [MG + 04], for all the details.You can embed commands, in the form of single characters, in the argument to \indexthat guide MakeIndex in converting the raw idx file into an ind file for final typesetting.<strong>The</strong> complete set of these is given in Table 17.1. <strong>The</strong>y all have defaults and you can modifythese via a MakeIndex configuration file.In the simplest case you just use the name of the index item as the argument to the\index command. However, spaces are significant as far as MakeIndex is concerned. <strong>The</strong>following three uses of \index will result in three different entries in the final index\index{ entry} \index{entry} \index{entry }<strong>The</strong> ! character<strong>The</strong> level specifier starts a new minor level, or subitem, with a maximum of two sublevels.<strong>The</strong> default level specifier is the special character !. For example:1 A railway (railroad) bridge in Scotland that collapsed in 1879 killing 90 people. <strong>The</strong> disaster lives for ever in thepoem <strong>The</strong> Tay Bridge Disaster by William McGonagall (1830–?), the first verse of which goes:Beautiful Railway Bridge of the Silv’ry Tay!Alas! I am very sorry to sayThat ninety lives have been taken awayOn the last Sabbath day of 1879,Which will be remember’d for a very long time.2 This deficiency in xindy was discovered by Frederic Connes, who also provided the \xindyindex command.306

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!