/usr/share/doc/fweb/html-info/Merging-indexes.html is in fweb-doc 1.62-13.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 6.1, http://www.gnu.org/software/texinfo/ -->
<head>
<title>FWEB: Merging indexes</title>
<meta name="description" content="FWEB: Merging indexes">
<meta name="keywords" content="FWEB: Merging indexes">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Concept-index.html#Concept-index" rel="index" title="Concept index">
<link href="Parameter-index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Index.html#Index" rel="up" title="Index">
<link href="Customization.html#Customization" rel="next" title="Customization">
<link href="Using-makeindex.html#Using-makeindex" rel="prev" title="Using makeindex">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>
</head>
<body lang="en">
<a name="Merging-indexes"></a>
<div class="header">
<p>
Previous: <a href="Using-makeindex.html#Using-makeindex" accesskey="p" rel="prev">Using makeindex</a>, Up: <a href="Index.html#Index" accesskey="u" rel="up">Index</a> [<a href="Parameter-index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-index.html#Concept-index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="Using-the-idxmerge-utility-to-merge-indexes"></a>
<h3 class="section">11.3 Using the <code>idxmerge</code> utility to merge indexes</h3>
<a name="index-Indexes_002c-merging"></a>
<a name="index-idxmerge_002esty"></a>
<p>In a large project, one may maintain and work with several <small>FWEB</small>
files. It may be useful to produce a global index that spans all of
those files. To this end, the utility <code>idxmerge</code> and associated
LaTeX package <code>idxmerge</code> are supplied with
the <small>FWEB</small> distribution.
</p>
<a name="Using-idxmerge_003a-Summary"></a>
<h4 class="subsection">11.3.1 Using <code>idxmerge</code>: Summary</h4>
<p>As quick reference for those who have already plowed through the
following details, here is a summary of the procedure. To print a
stand-alone index by merging the indexes from several <code>web</code>
sources, do the following. First, create, if necessary, a file
<samp>index.tex</samp> that <code>\input</code>s <samp>index.ind</samp>. Then:
</p>
<div class="example">
<pre class="example">fweave -XI test1.web
fweave -XI test2.web
fweave -XI test3.web
idxmerge -oindex test1.idx test2.idx test3.idx
% Creates index.ind and index-names.tex.
makeindex -s test1.sty index
latex index
</pre></div>
<p>Note the use of the ‘<samp>-XI</samp>’ option. For further background, see the
previous section, <a href="Using-makeindex.html#Using-makeindex">Using makeindex</a>.
</p>
<a name="Using-idxmerge_003a-Details"></a>
<h4 class="subsection">11.3.2 Using <code>idxmerge</code>: Details</h4>
<p>Suppose one has three files, <samp>test1.web</samp>, <samp>test2.web</samp>, and
<samp>test3.web</samp>. To use <code>idxmerge</code>, weave each of the files
separately, using the ‘<samp>-XI</samp>’ option to create <samp>test*.idx</samp> and
<samp>test*.sty</samp>. Then say
</p>
<div class="example">
<pre class="example">idxmerge -oindex test1.idx test2.idx test3.idx
</pre></div>
<p>This creates two output files: <samp>index.idx</samp>, and
<samp>index-names.tex</samp>. <code>idxmerge</code> first sorts the list of file
names. It then writes one entry into <samp>index-names.tex</samp> for each
file, of the form
</p>
<div class="example">
<pre class="example">\idxname{<var>n</var>}{file_name<var>n</var>}
</pre></div>
<p>This file can be <code>\input</code> by the <code>\topofindex</code> command (for an
example, see the LaTeX2e package <code>idxmerge</code>) (supplied with
the <small>FWEB</small> distribution) and used to create a list of the merged files.
<a name="index-_005ctopofindex"></a>
<a name="index-_005cidxname"></a>
</p>
<p>Then it merges the <code>\indexentry</code> commands from each of the input
files into <samp>index.idx</samp>, filling in the integer file identifier <var>n</var>
(the position of the file in the sorted list) into the first argument of
the <code>\pg</code> macro. One can now say
</p>
<div class="example">
<pre class="example">makeindex -s test1.sty index
</pre></div>
<p>This creates <samp>index.ind</samp>, which can be processed by, for example,
a simple modification of the simple LaTeX template given above in
<a href="Using-makeindex.html#Using-makeindex">Using makeindex</a>. The only difference is that the package
<code>idxmerge</code> was used; in that file, the macros <code>\topofindex</code>
and <code>\idxname</code> are appropriately defined to print out a numbered
list of the merged files to cross-reference into the numerical file- and
page-number entries in the body of the index. Here is an example
(provided in the <small>FWEB</small> distribution):
</p>
<div class="example">
<pre class="example">% index.tex --- skeleton for printing a stand-alone index.
\documentclass{article}
\usepackage{fwebmac,idxmerge}
\begin{document}
\input{\jobname.ind}
\end{document}
</pre></div>
<hr>
<div class="header">
<p>
Previous: <a href="Using-makeindex.html#Using-makeindex" accesskey="p" rel="prev">Using makeindex</a>, Up: <a href="Index.html#Index" accesskey="u" rel="up">Index</a> [<a href="Parameter-index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-index.html#Concept-index" title="Index" rel="index">Index</a>]</p>
</div>
</body>
</html>
|