diff options
Diffstat (limited to 'Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-multind.html')
-rw-r--r-- | Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-multind.html | 126 |
1 files changed, 126 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-multind.html b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-multind.html new file mode 100644 index 00000000000..8dad6c9943a --- /dev/null +++ b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-multind.html @@ -0,0 +1,126 @@ +<head> +<title>UK TeX FAQ -- question label multind</title> +</head><body> +<h3>Multiple indexes</h3> +<p/>LaTeX’s standard indexing capabilities (those provided by the +<i>makeidx</i> package) only provide for one index in your +document; even quite modest documents can be improved by indexes for +separate topics. +<p/>The <i>multind</i> package provides simple and straightforward +multiple indexing. You tag each <code>\</code><code>makeindex</code>, <code>\</code><code>index</code> and +<code>\</code><code>printindex</code> command with a file name, and indexing commands are +written to (or read from) the name with the appropriate (<code>.idx</code> or +<code>.ind</code>) extension appended. The <code>\</code><code>printindex</code> command is modified +from the LaTeX standard so that it doesn’t create its own chapter +or section heading; you therefore decide what names (or sectioning +level, even) to use for the indexes, and +<a href="FAQ-fixnam.html"><code>\</code><code>indexname</code></a> is completely ignored. +<p/>To create a “general” and an “authors” index, one might write: +<blockquote> +<pre> +\usepackage{multind} +\makeindex{general} +\makeindex{authors} +... +\index{authors}{Another Idiot} +... +\index{general}{FAQs} +... +\printindex{general}{General index} +\printindex{authors}{Author index} +</pre> +</blockquote><p> +To complete the job, run LaTeX on your file enough times that +labels, etc., are stable, and then execute the commands +<blockquote> +<pre> +makeindex general +makeindex authors +</pre> +</blockquote><p> +before running LaTeX again. Note that the names of the index files +to process are not necessarily related to the name of the LaTeX +file you’re processing, at all. (There’s no documentation that comes +with the package: what you see above is as good as you will +get...) +<p/>The <i>index</i> package provides a comprehensive set of indexing +facilities, including a <code>\</code><code>newindex</code> command that allows the +definition of new styles of index. <code>\</code><code>newindex</code> takes a ‘tag’ (for +use in indexing commands), replacements for the <code>.idx</code> and +<code>.ind</code> file extensions, and a title for the index when it’s +finally printed; it can also change the item that’s being indexed +against (for example, one might have an index of artists referenced by +the figure number where their work is shown). +<p/>Using <i>index</i>, to create an author index together with a +“normal” index, one would start with preamble commands: +<blockquote> +<pre> +\usepackage{index} +\makeindex +\newindex{aut}{adx}{and}{Name Index} +</pre> +</blockquote><p> +which load the package, define a “main” (original-style) index, and +then define an author index. Then, in the body of the document, we +might find commands like: +<blockquote> +<pre> +\index[aut]{Another Idiot} +... +\index{FAQs} +</pre> +</blockquote><p> +Which place an entry in the author index, and then one in the main +index. At the end of the document, we have two commands: +<blockquote> +<pre> +\printindex +\printindex[aut] +</pre> +</blockquote><p> +Which will print the main index and then the author index. Supposing +this lot to be in <i>myfile.tex</i>, after enough runs through +LaTeX that labels are stable, execute the following commands +(Unix-style shell commands shown here, but the principle is the same +whatever system you’re using): +<blockquote> +<pre> +makeindex myfile +makeindex myfile.adx -o myfile.and +</pre> +</blockquote><p> +and rerun LaTeX. The <i>makeindex</i> commands process +<i>myfile.idx</i> to <i>myfile.ind</i> (the default action), and then +<i>myfile.adx</i> to <i>myfile.and</i>, the two files needed as input +by the two <code>\</code><code>printindex</code> commands in <i>myfile.tex</i>. +<p/>The <i>splitidx</i> package can operate in the same way as the +others: load the package with the <code>split</code> option, and +declare each index with a <code>\</code><code>newindex</code> command: +<blockquote> + <code>\</code><code>newindex[<<i>index name</i>>]{<<i>shortcut</i>>}</code> +</blockquote><p> +and <i>splitidx</i> will generate a file +<code>\</code><code>jobname</code><code>.<<i>shortcut</i>></code> to receive index entries +generated by commands like <code>\</code><code>sindex[<<i>shortcut</i>>]{<<i>item</i>>}</code>. +As with the other packages, this method is limited by TeX’s total +number of output files. However, <i>splitindex</i> also comes with +a small executable <i>splitindex</i> (available for a variety of +operating systems); if you use this auxiliary program (and don’t use +<code>split</code>), there’s no limit to the number of indexes. Apart +from this trick, <i>splitidx</i> supports the same sorts of things +as does <i>index</i>. An example of use appears in +the documentation. +<p/>The <i>memoir</i> class has its own multiple-index functionality (as +well as its own index layout options, which other packages delegate to +the index style used by <i>makeindex</i>). +<dl> +<dt><tt><i>index.sty</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/index.zip">macros/latex/contrib/index</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/index.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/index/">browse</a>) +<dt><tt><i>makeidx.sty</i></tt><dd>Part of the LaTeX distribution +<dt><tt><i>memoir.cls</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/memoir.zip">macros/latex/contrib/memoir</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/memoir.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/memoir/">browse</a>) +<dt><tt><i>multind.sty</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/macros/latex209/contrib/misc/multind.sty">macros/latex209/contrib/misc/multind.sty</a> +<dt><tt><i>splitidx.sty and splitindex</i></tt><dd> + <a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/splitindex.zip">macros/latex/contrib/splitindex</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/splitindex.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/splitindex/">browse</a>) +</dl> +<p/> +<p/><p/><p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=multind">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=multind</a> +</body> |