mirror of
https://github.com/boostorg/auto_index.git
synced 2025-05-11 13:34:10 +00:00
Some tips added and some editorial corrections.
Merged with John Maddock's additions 27 Jan, hopefully without causing trouble. See also pdf version. [SVN r68534]
This commit is contained in:
parent
91eb6e8482
commit
94ef1c7ab6
@ -49,7 +49,7 @@
|
|||||||
<dt><span class="term">--internal-index</span></dt>
|
<dt><span class="term">--internal-index</span></dt>
|
||||||
<dd><p>
|
<dd><p>
|
||||||
Specifies that auto_index should generate the actual indexes rather than
|
Specifies that auto_index should generate the actual indexes rather than
|
||||||
inserting <code class="computeroutput"><span class="special"><</span><span class="identifier">indexterm</span><span class="special">></span></code>'s and leaving index generation to
|
inserting <code class="computeroutput"><span class="special"><</span><span class="identifier">indexterm</span><span class="special">></span></code>s and leaving index generation to
|
||||||
the XSL stylesheets.
|
the XSL stylesheets.
|
||||||
</p></dd>
|
</p></dd>
|
||||||
<dt><span class="term">--no-section-names</span></dt>
|
<dt><span class="term">--no-section-names</span></dt>
|
||||||
@ -73,7 +73,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||||
<td align="left"></td>
|
<td align="left"></td>
|
||||||
<td align="right"><div class="copyright-footer">Copyright © 2008 John Maddock<p>
|
<td align="right"><div class="copyright-footer">Copyright © 2008 , 2011 John Maddock<p>
|
||||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||||
</p>
|
</p>
|
||||||
|
@ -29,10 +29,24 @@
|
|||||||
for each occurrence of each term to be indexed.
|
for each occurrence of each term to be indexed.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Instead AutoIndex will scan one or more C/C++ header files and extract all
|
Instead AutoIndex will automatically scan one or more C/C++ header files and
|
||||||
the <span class="emphasis"><em>function</em></span>, <span class="emphasis"><em>class</em></span>, <span class="emphasis"><em>macro</em></span>
|
extract all the <span class="emphasis"><em>function</em></span>, <span class="emphasis"><em>class</em></span>,
|
||||||
and <span class="emphasis"><em>typedef</em></span> names that are defined by those headers, and
|
<span class="emphasis"><em>macro</em></span> and <span class="emphasis"><em>typedef</em></span> names that are
|
||||||
then insert the <code class="computeroutput"><span class="special"><</span><span class="identifier">indexterm</span><span class="special">></span></code>'s into the XML document for you.
|
defined by those headers, and then insert the <code class="computeroutput"><span class="special"><</span><span class="identifier">indexterm</span><span class="special">></span></code>s
|
||||||
|
into the XML document for you.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
AutoIndex can also scan <span class="emphasis"><em>text files</em></span>, usually Quickbook
|
||||||
|
files, but in this case you need to manually provide a simple list of index
|
||||||
|
terms (in a script file, optionally using regular expressions). This may allow
|
||||||
|
the user to find references to more descriptive items that may not occur in
|
||||||
|
the C++ classes and functions header files.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Providing a manual list of terms in the text to index is a tedious task (especially
|
||||||
|
handling plurals and variants), and requires enough knowledge of the library
|
||||||
|
to guess what users may be seeking to know, but at least the real 'grunt work'
|
||||||
|
of finding the term and listing the page number is automated.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
AutoIndex creates index entries as follows - for each occurrence of each search
|
AutoIndex creates index entries as follows - for each occurrence of each search
|
||||||
@ -116,7 +130,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||||
<td align="left"></td>
|
<td align="left"></td>
|
||||||
<td align="right"><div class="copyright-footer">Copyright © 2008 John Maddock<p>
|
<td align="right"><div class="copyright-footer">Copyright © 2008 , 2011 John Maddock<p>
|
||||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||||
</p>
|
</p>
|
||||||
|
@ -23,16 +23,16 @@
|
|||||||
The following elements can occur in a script:
|
The following elements can occur in a script:
|
||||||
</p>
|
</p>
|
||||||
<a name="autoindex.script_ref.comments_and_blank_lines"></a><h5>
|
<a name="autoindex.script_ref.comments_and_blank_lines"></a><h5>
|
||||||
<a name="id1016394"></a>
|
<a name="id869246"></a>
|
||||||
<a class="link" href="script_ref.html#autoindex.script_ref.comments_and_blank_lines">Comments and
|
<a class="link" href="script_ref.html#autoindex.script_ref.comments_and_blank_lines">Comments and
|
||||||
blank lines</a>
|
blank lines</a>
|
||||||
</h5>
|
</h5>
|
||||||
<p>
|
<p>
|
||||||
Blank lines consisting of only whitespace are ignored, so are lines that start
|
Blank lines consisting of only whitespace are ignored, so are lines that <span class="bold"><strong>start with</strong></span> a '#'. (But, of course, you can't append
|
||||||
with a '#'.
|
# comments onto the end of a line!).
|
||||||
</p>
|
</p>
|
||||||
<a name="autoindex.script_ref.simple_inclusions"></a><h5>
|
<a name="autoindex.script_ref.simple_inclusions"></a><h5>
|
||||||
<a name="id1016410"></a>
|
<a name="id869267"></a>
|
||||||
<a class="link" href="script_ref.html#autoindex.script_ref.simple_inclusions">Simple Inclusions</a>
|
<a class="link" href="script_ref.html#autoindex.script_ref.simple_inclusions">Simple Inclusions</a>
|
||||||
</h5>
|
</h5>
|
||||||
<pre class="programlisting"><span class="identifier">term</span> <span class="special">[</span><span class="identifier">regular</span><span class="special">-</span><span class="identifier">expression1</span> <span class="special">[</span><span class="identifier">regular</span><span class="special">-</span><span class="identifier">expression2</span> <span class="special">[</span><span class="identifier">category</span><span class="special">]]]</span>
|
<pre class="programlisting"><span class="identifier">term</span> <span class="special">[</span><span class="identifier">regular</span><span class="special">-</span><span class="identifier">expression1</span> <span class="special">[</span><span class="identifier">regular</span><span class="special">-</span><span class="identifier">expression2</span> <span class="special">[</span><span class="identifier">category</span><span class="special">]]]</span>
|
||||||
@ -99,15 +99,15 @@
|
|||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
<a name="autoindex.script_ref.source_file_scanning"></a><h5>
|
<a name="autoindex.script_ref.source_file_scanning"></a><h5>
|
||||||
<a name="id1016619"></a>
|
<a name="id870626"></a>
|
||||||
<a class="link" href="script_ref.html#autoindex.script_ref.source_file_scanning">Source File Scanning</a>
|
<a class="link" href="script_ref.html#autoindex.script_ref.source_file_scanning">Source File Scanning</a>
|
||||||
</h5>
|
</h5>
|
||||||
<pre class="programlisting"><span class="special">!</span><span class="identifier">scan</span> <span class="identifier">source</span><span class="special">-</span><span class="identifier">file</span><span class="special">-</span><span class="identifier">name</span>
|
<pre class="programlisting"><span class="special">!</span><span class="identifier">scan</span> <span class="identifier">source</span><span class="special">-</span><span class="identifier">file</span><span class="special">-</span><span class="identifier">name</span>
|
||||||
</pre>
|
</pre>
|
||||||
<p>
|
<p>
|
||||||
Scans the C/C++ source file <span class="emphasis"><em>source-file-name</em></span> for definitions
|
Scans the C/C++ source file <span class="emphasis"><em>source-file-name</em></span> for definitions
|
||||||
of <span class="emphasis"><em>function</em></span>'s, <span class="emphasis"><em>class</em></span>'s, <span class="emphasis"><em>macro</em></span>'s
|
of <span class="emphasis"><em>function</em></span>s, <span class="emphasis"><em>class</em></span>s, <span class="emphasis"><em>macro</em></span>s
|
||||||
or <span class="emphasis"><em>typedef</em></span>'s and makes each of these a term to be indexed.
|
or <span class="emphasis"><em>typedef</em></span>s and makes each of these a term to be indexed.
|
||||||
Terms found are assigned to the index category "function_name", "class_name",
|
Terms found are assigned to the index category "function_name", "class_name",
|
||||||
"macro_name" or "typedef_name" depending on how they were
|
"macro_name" or "typedef_name" depending on how they were
|
||||||
seen in the source file. These may then be included in a specialised index
|
seen in the source file. These may then be included in a specialised index
|
||||||
@ -128,7 +128,7 @@
|
|||||||
</p></td></tr>
|
</p></td></tr>
|
||||||
</table></div>
|
</table></div>
|
||||||
<a name="autoindex.script_ref.directory_and_source_file_scanning"></a><h5>
|
<a name="autoindex.script_ref.directory_and_source_file_scanning"></a><h5>
|
||||||
<a name="id1016697"></a>
|
<a name="id870704"></a>
|
||||||
<a class="link" href="script_ref.html#autoindex.script_ref.directory_and_source_file_scanning">Directory
|
<a class="link" href="script_ref.html#autoindex.script_ref.directory_and_source_file_scanning">Directory
|
||||||
and Source File Scanning</a>
|
and Source File Scanning</a>
|
||||||
</h5>
|
</h5>
|
||||||
@ -141,7 +141,7 @@
|
|||||||
<dd><p>
|
<dd><p>
|
||||||
The directory to scan: this should be a path relative to the script file
|
The directory to scan: this should be a path relative to the script file
|
||||||
(or to the path specified with the prefix=path option on the command
|
(or to the path specified with the prefix=path option on the command
|
||||||
line) and should use all forward slashes in it's file name.
|
line) and should use all forward slashes in its file name.
|
||||||
</p></dd>
|
</p></dd>
|
||||||
<dt><span class="term">file-name-regex</span></dt>
|
<dt><span class="term">file-name-regex</span></dt>
|
||||||
<dd><p>
|
<dd><p>
|
||||||
@ -157,7 +157,7 @@
|
|||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
<a name="autoindex.script_ref.excluding_terms"></a><h5>
|
<a name="autoindex.script_ref.excluding_terms"></a><h5>
|
||||||
<a name="id1016822"></a>
|
<a name="id870828"></a>
|
||||||
<a class="link" href="script_ref.html#autoindex.script_ref.excluding_terms">Excluding Terms</a>
|
<a class="link" href="script_ref.html#autoindex.script_ref.excluding_terms">Excluding Terms</a>
|
||||||
</h5>
|
</h5>
|
||||||
<pre class="programlisting"><span class="special">!</span><span class="identifier">exclude</span> <span class="identifier">term</span><span class="special">-</span><span class="identifier">list</span>
|
<pre class="programlisting"><span class="special">!</span><span class="identifier">exclude</span> <span class="identifier">term</span><span class="special">-</span><span class="identifier">list</span>
|
||||||
@ -170,7 +170,7 @@
|
|||||||
of things to index.
|
of things to index.
|
||||||
</p>
|
</p>
|
||||||
<a name="autoindex.script_ref.rewriting_section_names"></a><h5>
|
<a name="autoindex.script_ref.rewriting_section_names"></a><h5>
|
||||||
<a name="id1016877"></a>
|
<a name="id870884"></a>
|
||||||
<a class="link" href="script_ref.html#autoindex.script_ref.rewriting_section_names">Rewriting Section
|
<a class="link" href="script_ref.html#autoindex.script_ref.rewriting_section_names">Rewriting Section
|
||||||
Names</a>
|
Names</a>
|
||||||
</h5>
|
</h5>
|
||||||
@ -217,7 +217,7 @@
|
|||||||
all index entries - thus preventing lots of entries under "The" etc!
|
all index entries - thus preventing lots of entries under "The" etc!
|
||||||
</p>
|
</p>
|
||||||
<a name="autoindex.script_ref.defining_or_changing_the_file_scanners"></a><h5>
|
<a name="autoindex.script_ref.defining_or_changing_the_file_scanners"></a><h5>
|
||||||
<a name="id1017030"></a>
|
<a name="id871036"></a>
|
||||||
<a class="link" href="script_ref.html#autoindex.script_ref.defining_or_changing_the_file_scanners">Defining
|
<a class="link" href="script_ref.html#autoindex.script_ref.defining_or_changing_the_file_scanners">Defining
|
||||||
or Changing the File Scanners</a>
|
or Changing the File Scanners</a>
|
||||||
</h5>
|
</h5>
|
||||||
@ -319,9 +319,9 @@
|
|||||||
Will look for <span class="emphasis"><em>any</em></span> occurrence of whatever class names the
|
Will look for <span class="emphasis"><em>any</em></span> occurrence of whatever class names the
|
||||||
scanner may find in the documentation.
|
scanner may find in the documentation.
|
||||||
</p>
|
</p>
|
||||||
<a name="autoindex.script_ref.debugging"></a><h5>
|
<a name="autoindex.script_ref.debugging_scanning"></a><h5>
|
||||||
<a name="id1017532"></a>
|
<a name="id871539"></a>
|
||||||
<a class="link" href="script_ref.html#autoindex.script_ref.debugging">Debugging</a>
|
<a class="link" href="script_ref.html#autoindex.script_ref.debugging_scanning">Debugging scanning</a>
|
||||||
</h5>
|
</h5>
|
||||||
<p>
|
<p>
|
||||||
If you see a term in the index, and you don't understand why it's there, add
|
If you see a term in the index, and you don't understand why it's there, add
|
||||||
@ -343,10 +343,14 @@ The search regex is: [P|p]arser
|
|||||||
The section constraint is: .<span class="bold"><strong>qi.reference.parser_concepts.</strong></span>
|
The section constraint is: .<span class="bold"><strong>qi.reference.parser_concepts.</strong></span>
|
||||||
The index type for this entry is: qi_index
|
The index type for this entry is: qi_index
|
||||||
</pre>
|
</pre>
|
||||||
|
<p>
|
||||||
|
This can produce a lot of output in your log file, but until you are satisfied
|
||||||
|
with your file selection and scanning process, it is worth switching it on.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||||
<td align="left"></td>
|
<td align="left"></td>
|
||||||
<td align="right"><div class="copyright-footer">Copyright © 2008 John Maddock<p>
|
<td align="right"><div class="copyright-footer">Copyright © 2008 , 2011 John Maddock<p>
|
||||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||||
</p>
|
</p>
|
||||||
|
@ -19,9 +19,10 @@
|
|||||||
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
||||||
<a name="autoindex.tut"></a><a class="link" href="tut.html" title="Getting Started and Tutorial">Getting Started and Tutorial</a>
|
<a name="autoindex.tut"></a><a class="link" href="tut.html" title="Getting Started and Tutorial">Getting Started and Tutorial</a>
|
||||||
</h2></div></div></div>
|
</h2></div></div></div>
|
||||||
<a name="autoindex.tut.step_1__build_the_tool"></a><h5>
|
<a name="autoindex.tut.step_1__build_the_autoindex_tool"></a><h5>
|
||||||
<a name="id1010871"></a>
|
<a name="id867220"></a>
|
||||||
<a class="link" href="tut.html#autoindex.tut.step_1__build_the_tool">Step 1: Build the tool</a>
|
<a class="link" href="tut.html#autoindex.tut.step_1__build_the_autoindex_tool">Step 1: Build
|
||||||
|
the AutoIndex tool</a>
|
||||||
</h5>
|
</h5>
|
||||||
<p>
|
<p>
|
||||||
cd into <code class="computeroutput"><span class="identifier">tools</span><span class="special">/</span><span class="identifier">auto_index</span><span class="special">/</span><span class="identifier">build</span></code> and invoke bjam as:
|
cd into <code class="computeroutput"><span class="identifier">tools</span><span class="special">/</span><span class="identifier">auto_index</span><span class="special">/</span><span class="identifier">build</span></code> and invoke bjam as:
|
||||||
@ -35,9 +36,10 @@
|
|||||||
<pre class="programlisting"><span class="identifier">bjam</span> <span class="identifier">release</span> <span class="identifier">gcc</span>
|
<pre class="programlisting"><span class="identifier">bjam</span> <span class="identifier">release</span> <span class="identifier">gcc</span>
|
||||||
</pre>
|
</pre>
|
||||||
<p>
|
<p>
|
||||||
Now open up your user-config.jam file and at the end add the line:
|
Now open up your <code class="computeroutput"><span class="identifier">user</span><span class="special">-</span><span class="identifier">config</span><span class="special">.</span><span class="identifier">jam</span></code>
|
||||||
|
file and at the end of the file add the line:
|
||||||
</p>
|
</p>
|
||||||
<pre class="programlisting">using auto-index : <span class="emphasis"><em>full-path-of-executable</em></span> ;
|
<pre class="programlisting">using auto-index : <span class="emphasis"><em>full-path-of-executable-auto-index.exe</em></span> ;
|
||||||
</pre>
|
</pre>
|
||||||
<div class="note"><table border="0" summary="Note">
|
<div class="note"><table border="0" summary="Note">
|
||||||
<tr>
|
<tr>
|
||||||
@ -46,11 +48,11 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr><td align="left" valign="top">
|
<tr><td align="left" valign="top">
|
||||||
<p>
|
<p>
|
||||||
This declaration must go towards the end of user-config.jam, or in any case
|
This declaration must go towards the end of <code class="computeroutput"><span class="identifier">user</span><span class="special">-</span><span class="identifier">config</span><span class="special">.</span><span class="identifier">jam</span></code>, or
|
||||||
after the Boostbook initialisation.
|
in any case after the Boostbook initialisation.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Also note that Windows users must use forward slashes in the paths in user-config.jam
|
Also note that Windows users must use forward slashes in the paths in <code class="computeroutput"><span class="identifier">user</span><span class="special">-</span><span class="identifier">config</span><span class="special">.</span><span class="identifier">jam</span></code>
|
||||||
</p>
|
</p>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
</table></div>
|
</table></div>
|
||||||
@ -61,10 +63,20 @@
|
|||||||
your main Boost tree): this is a temporary fix that will go away if the tool
|
your main Boost tree): this is a temporary fix that will go away if the tool
|
||||||
is accepted into Boost.
|
is accepted into Boost.
|
||||||
</p>
|
</p>
|
||||||
<a name="autoindex.tut.step_2__configure_boost_build"></a><h5>
|
<div class="caution"><table border="0" summary="Caution">
|
||||||
<a name="id1011036"></a>
|
<tr>
|
||||||
<a class="link" href="tut.html#autoindex.tut.step_2__configure_boost_build">Step 2: Configure
|
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../images/caution.png"></td>
|
||||||
Boost.Build</a>
|
<th align="left">Caution</th>
|
||||||
|
</tr>
|
||||||
|
<tr><td align="left" valign="top"><p>
|
||||||
|
If you move to a new machine you will need to do this! An error message will
|
||||||
|
warn about missing <code class="computeroutput"><span class="keyword">auto</span><span class="special">-</span><span class="identifier">index</span><span class="special">.</span><span class="identifier">jam</span></code>.
|
||||||
|
</p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
<a name="autoindex.tut.step_2__configure_boost_build_to_use_autoindex"></a><h5>
|
||||||
|
<a name="id867482"></a>
|
||||||
|
<a class="link" href="tut.html#autoindex.tut.step_2__configure_boost_build_to_use_autoindex">Step
|
||||||
|
2: Configure Boost.Build to use AutoIndex</a>
|
||||||
</h5>
|
</h5>
|
||||||
<p>
|
<p>
|
||||||
Assuming you have a Jamfile for building your documentation that looks something
|
Assuming you have a Jamfile for building your documentation that looks something
|
||||||
@ -72,7 +84,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<pre class="programlisting">boostbook standalone
|
<pre class="programlisting">boostbook standalone
|
||||||
:
|
:
|
||||||
type_traits
|
mylibrary
|
||||||
:
|
:
|
||||||
# build requirements go here:
|
# build requirements go here:
|
||||||
;
|
;
|
||||||
@ -83,22 +95,42 @@
|
|||||||
<pre class="programlisting">using auto-index ; </pre>
|
<pre class="programlisting">using auto-index ; </pre>
|
||||||
<p>
|
<p>
|
||||||
to the start of the Jamfile, and then add whatever auto-index options you want
|
to the start of the Jamfile, and then add whatever auto-index options you want
|
||||||
to the build requirements section, for example:
|
to the <span class="emphasis"><em>build requirements section</em></span>, for example:
|
||||||
</p>
|
</p>
|
||||||
<pre class="programlisting">boostbook standalone
|
<pre class="programlisting">boostbook standalone
|
||||||
:
|
:
|
||||||
type_traits
|
mylibrary
|
||||||
:
|
:
|
||||||
# build requirements go here:
|
# Build requirements go here:
|
||||||
|
|
||||||
# this one turns on indexing:
|
# <auto-index>on (or off) one turns on (or off) indexing:
|
||||||
<auto-index>on
|
<auto-index>on
|
||||||
# choose indexing method for pdf's:
|
|
||||||
|
# Turns on (or off) auto-index-verbose for diagnostic info.
|
||||||
|
# This is highly recommended until you have got all the many details correct!
|
||||||
|
# (uses /bin auto-index-verbose folders).
|
||||||
|
<auto-index-verbose>on
|
||||||
|
|
||||||
|
# Choose the indexing method (separately for html and PDF) - see manual.
|
||||||
|
# Choose indexing method for PDFs:
|
||||||
<format>pdf:<auto-index-internal>off
|
<format>pdf:<auto-index-internal>off
|
||||||
# choose indexing method for html:
|
|
||||||
|
# Choose indexing method for html:
|
||||||
<format>html:<auto-index-internal>on
|
<format>html:<auto-index-internal>on
|
||||||
# set the name of the script file to use:
|
|
||||||
|
# Set the name of the script file to use (index.idx is popular):
|
||||||
<auto-index-script>index.idx
|
<auto-index-script>index.idx
|
||||||
|
# But see <auto-index-prefix> to use for the scan path to scan for script files.
|
||||||
|
|
||||||
|
# <auto-index-prefix>../../.. will get you back up to /mylibrary,
|
||||||
|
# so !scan-path "boost/mylibrary/" is where headers *.hpp will be.
|
||||||
|
# and /libs/mylibrary for other files.
|
||||||
|
# Without this you would need !scan-path "../../../boost/mylibrary"
|
||||||
|
<auto-index-prefix>../../..
|
||||||
|
|
||||||
|
# Tell Quickbook that is should enable indexing.
|
||||||
|
<quickbook-define>enable_index ;
|
||||||
|
|
||||||
;
|
;
|
||||||
</pre>
|
</pre>
|
||||||
<p>
|
<p>
|
||||||
@ -138,12 +170,15 @@
|
|||||||
<dt><span class="term"><auto-index-verbose>off/on</span></dt>
|
<dt><span class="term"><auto-index-verbose>off/on</span></dt>
|
||||||
<dd><p>
|
<dd><p>
|
||||||
Defaults to "off". When turned on AutoIndex prints progress
|
Defaults to "off". When turned on AutoIndex prints progress
|
||||||
information - generally useful only for debugging purposes.
|
information - useful for debugging purposes during setup.
|
||||||
</p></dd>
|
</p></dd>
|
||||||
<dt><span class="term"><auto-index-prefix>filename</span></dt>
|
<dt><span class="term"><auto-index-prefix>filename</span></dt>
|
||||||
<dd><p>
|
<dd><p>
|
||||||
Specifies a directory to apply as a prefix to all relative file paths
|
Specifies a directory to apply as a prefix to all relative file paths
|
||||||
in the script file.
|
in the script file. For Boost standard layout, <auto-index-prefix>../../..
|
||||||
|
will get you back up to /mylibrary, so !scan-path "boost<span class="emphasis"><em>mylibrary</em></span>"
|
||||||
|
is where headers *.hpp will be and /libs/mylibrary for other files. Without
|
||||||
|
this you would need !scan-path "../../../boost/mylibrary"
|
||||||
</p></dd>
|
</p></dd>
|
||||||
<dt><span class="term"><auto-index-type>element-name</span></dt>
|
<dt><span class="term"><auto-index-type>element-name</span></dt>
|
||||||
<dd><p>
|
<dd><p>
|
||||||
@ -312,33 +347,103 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table></div>
|
</table></div>
|
||||||
<p>
|
<p>
|
||||||
It is possible to make the use of auto-index optional in Boost.Build, to allow
|
It is considerate to make the <span class="bold"><strong>use of auto-index optional</strong></span>
|
||||||
users who do not have auto-index installed to build your documentation. One
|
in Boost.Build, to allow users who do not have auto-index installed to still
|
||||||
method of setting up optional auto-index support is to place all auto-index
|
be able to build your documentation.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
One method of setting up optional auto-index support is to place all auto-index
|
||||||
|
configuration in a the body of a <span class="emphasis"><em>bjam if statement</em></span>.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
This also very convenient while you are refining your documentation, to allow
|
||||||
|
you to decide to build indexes, or not: building indexes can take long time,
|
||||||
|
if you are just correcting typos, you won't want wait while you keep rebuilding
|
||||||
|
the index!
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
One method of setting up optional auto-index support is to place all auto-index
|
||||||
configuration in a the body of a bjam if statement:
|
configuration in a the body of a bjam if statement:
|
||||||
</p>
|
</p>
|
||||||
<pre class="programlisting"><span class="keyword">if</span> <span class="special">--</span><span class="identifier">enable</span><span class="special">-</span><span class="identifier">index</span> <span class="identifier">in</span> <span class="special">[</span> <span class="identifier">modules</span><span class="special">.</span><span class="identifier">peek</span> <span class="special">:</span> <span class="identifier">ARGV</span> <span class="special">]</span>
|
<pre class="programlisting">if --enable-index in [ modules.peek : ARGV ]
|
||||||
<span class="special">{</span>
|
{
|
||||||
<span class="keyword">using</span> <span class="keyword">auto</span><span class="special">-</span><span class="identifier">index</span> <span class="special">;</span>
|
ECHO "Building the docs with automatic index generation enabled." ;
|
||||||
<span class="identifier">project</span> <span class="special">:</span> <span class="identifier">requirements</span>
|
|
||||||
<span class="special"><</span><span class="keyword">auto</span><span class="special">-</span><span class="identifier">index</span><span class="special">></span><span class="identifier">on</span>
|
using auto-index ;
|
||||||
<span class="special"><</span><span class="keyword">auto</span><span class="special">-</span><span class="identifier">index</span><span class="special">-</span><span class="identifier">script</span><span class="special">></span><span class="identifier">index</span><span class="special">.</span><span class="identifier">idx</span>
|
project : requirements
|
||||||
<span class="error">#</span><span class="special">...</span> <span class="identifier">other</span> <span class="keyword">auto</span><span class="special">-</span><span class="identifier">index</span> <span class="identifier">options</span> <span class="identifier">here</span><span class="special">...</span>
|
<auto-index>on
|
||||||
<span class="special">;</span>
|
<auto-index-script>index.idx
|
||||||
<span class="special">}</span>
|
|
||||||
|
... other auto-index options here...
|
||||||
|
;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ECHO "Building the my_library docs with automatic index generation disabled. To get an auto-index, try building with --enable-index." ;
|
||||||
|
}
|
||||||
</pre>
|
</pre>
|
||||||
|
<p>
|
||||||
|
To use this, you need to cd to your docs folder, for example:
|
||||||
|
</p>
|
||||||
|
<pre class="programlisting"><span class="identifier">cd</span> <span class="special">\</span><span class="identifier">boost</span><span class="special">-</span><span class="identifier">sandbox</span><span class="special">\</span><span class="identifier">guild</span><span class="special">\</span><span class="identifier">mylibrary</span><span class="special">\</span><span class="identifier">libs</span><span class="special">\</span><span class="identifier">mylibrary</span><span class="special">\</span><span class="identifier">doc</span>
|
||||||
|
</pre>
|
||||||
|
<p>
|
||||||
|
and then run <code class="computeroutput"><span class="identifier">bjam</span></code> to build
|
||||||
|
the docs without index, for example:
|
||||||
|
</p>
|
||||||
|
<pre class="programlisting"><span class="identifier">bjam</span> <span class="special">-</span><span class="identifier">a</span> <span class="identifier">html</span> <span class="special">></span> <span class="identifier">mylibrary_html</span><span class="special">.</span><span class="identifier">log</span>
|
||||||
|
</pre>
|
||||||
|
<p>
|
||||||
|
or with index(es)
|
||||||
|
</p>
|
||||||
|
<pre class="programlisting"><span class="identifier">bjam</span> <span class="special">-</span><span class="identifier">a</span> <span class="identifier">html</span> <span class="special">--</span><span class="identifier">enable</span><span class="special">-</span><span class="identifier">index</span> <span class="special">></span> <span class="identifier">mylibrary_html_index</span><span class="special">.</span><span class="identifier">log</span>
|
||||||
|
</pre>
|
||||||
|
<div class="tip"><table border="0" summary="Tip">
|
||||||
|
<tr>
|
||||||
|
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="../images/tip.png"></td>
|
||||||
|
<th align="left">Tip</th>
|
||||||
|
</tr>
|
||||||
|
<tr><td align="left" valign="top"><p>
|
||||||
|
Always send the output to a log file. It will contain of lot of stuff, but
|
||||||
|
is invaluable to check if all has gone right, and else diagnose what has
|
||||||
|
gone wrong.
|
||||||
|
</p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
<div class="tip"><table border="0" summary="Tip">
|
||||||
|
<tr>
|
||||||
|
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="../images/tip.png"></td>
|
||||||
|
<th align="left">Tip</th>
|
||||||
|
</tr>
|
||||||
|
<tr><td align="left" valign="top"><p>
|
||||||
|
A return code of 0 is not a reliable indication that you have got what you
|
||||||
|
really want - inspecting the log file is the only certain way.
|
||||||
|
</p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
<div class="tip"><table border="0" summary="Tip">
|
||||||
|
<tr>
|
||||||
|
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="../images/tip.png"></td>
|
||||||
|
<th align="left">Tip</th>
|
||||||
|
</tr>
|
||||||
|
<tr><td align="left" valign="top"><p>
|
||||||
|
If you upgrade compiler version, for example MSVC from 9 to 10, then you
|
||||||
|
will need to rebuild Autoindex to avoid what Microsoft call a 'side-by-side'
|
||||||
|
error. And make sure that the autoindex.exe version you are using is the
|
||||||
|
new one.
|
||||||
|
</p></td></tr>
|
||||||
|
</table></div>
|
||||||
<a name="autoindex.tut.step_3__add_indexes_to_your_documentation"></a><h5>
|
<a name="autoindex.tut.step_3__add_indexes_to_your_documentation"></a><h5>
|
||||||
<a name="id1011645"></a>
|
<a name="id868109"></a>
|
||||||
<a class="link" href="tut.html#autoindex.tut.step_3__add_indexes_to_your_documentation">Step
|
<a class="link" href="tut.html#autoindex.tut.step_3__add_indexes_to_your_documentation">Step
|
||||||
3: Add indexes to your documentation</a>
|
3: Add indexes to your documentation</a>
|
||||||
</h5>
|
</h5>
|
||||||
<p>
|
<p>
|
||||||
To add a single index to a BoostBook/Docbook document, then add <code class="computeroutput"><span class="special"><</span><span class="identifier">index</span><span class="special">/></span></code> at the location where you want the index
|
To add a single "include everything" index to a Quickbook/BoostBook/Docbook
|
||||||
|
document, then add <code class="computeroutput"><span class="special"><</span><span class="identifier">index</span><span class="special">/></span></code> at the location where you want the index
|
||||||
to appear. The index will be rendered as a separate section when the documentation
|
to appear. The index will be rendered as a separate section when the documentation
|
||||||
is built.
|
is built.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
To add multiple indexes, then give each one a title and set it's <code class="computeroutput"><span class="identifier">type</span></code> attribute to specify which terms will
|
To add multiple indexes, then give each one a title and set its <code class="computeroutput"><span class="identifier">type</span></code> attribute to specify which terms will
|
||||||
be included, for example to place the <span class="emphasis"><em>function</em></span>, <span class="emphasis"><em>class</em></span>,
|
be included, for example to place the <span class="emphasis"><em>function</em></span>, <span class="emphasis"><em>class</em></span>,
|
||||||
<span class="emphasis"><em>macro</em></span> or <span class="emphasis"><em>typedef</em></span> names indexed by
|
<span class="emphasis"><em>macro</em></span> or <span class="emphasis"><em>typedef</em></span> names indexed by
|
||||||
<span class="emphasis"><em>auto_index</em></span> in separate indexes along with a main "include
|
<span class="emphasis"><em>auto_index</em></span> in separate indexes along with a main "include
|
||||||
@ -375,60 +480,82 @@
|
|||||||
</p></td></tr>
|
</p></td></tr>
|
||||||
</table></div>
|
</table></div>
|
||||||
<p>
|
<p>
|
||||||
In quickbook, you add the same markup but enclose it in an escape:
|
In Quickbook, you add the same markup but enclose it between two triple-tick
|
||||||
|
''' escapes, thus
|
||||||
</p>
|
</p>
|
||||||
<pre class="programlisting"><span class="char">''</span><span class="char">'<index/>'</span><span class="char">''</span>
|
<pre class="programlisting">'''<index/>''' </pre>
|
||||||
|
<p>
|
||||||
|
If you are writing a Quickbook document with Doxygen reference documentation,
|
||||||
|
the position of a <code class="computeroutput"><span class="special">[</span><span class="identifier">xinclude</span>
|
||||||
|
<span class="identifier">autodoc</span><span class="special">.</span><span class="identifier">xml</span><span class="special">]</span></code> line
|
||||||
|
in the Quickbook file determines the location of the Doxygen references section.
|
||||||
|
You will almost certainly want this as well.
|
||||||
|
</p>
|
||||||
|
<pre class="programlisting">[xinclude autodoc.xml] # Using <span class="emphasis"><em>Doxygen reference documentation</em></span>.
|
||||||
</pre>
|
</pre>
|
||||||
<p>
|
<p>
|
||||||
If you are using auto-index's internal index generation (usually recommended
|
You can control the <span class="emphasis"><em>displayed name</em></span> of the Doxygen reference
|
||||||
for HTML output) then you can also decide what kind of XML wrapper the generated
|
section thus by adding to the end of the Doxygen autodoc section in your jamfile.
|
||||||
index is placed in. By default this is a <code class="computeroutput"><span class="special"><</span><span class="identifier">section</span><span class="special">>...</</span><span class="identifier">section</span><span class="special">></span></code>
|
</p>
|
||||||
XML block (this replaces the original <code class="computeroutput"><span class="special"><</span><span class="identifier">index</span><span class="special">>...</</span><span class="identifier">index</span><span class="special">></span></code>
|
<pre class="programlisting"><xsl:param>"boost.doxygen.reftitle=Boost.mylibrary C++ Reference"
|
||||||
block). However, depending upon the structure of the document and whether or
|
</pre>
|
||||||
not you want the index on a separate page - or else on the front page after
|
<p>
|
||||||
the TOC - you may want to place the index inside a different type of XML block.
|
If you are using auto-index's internal index generation on
|
||||||
For example if your document uses <code class="computeroutput"><span class="special"><</span><span class="identifier">chapter</span><span class="special">></span></code>
|
</p>
|
||||||
top level content rather than <code class="computeroutput"><span class="special"><</span><span class="identifier">section</span><span class="special">></span></code>'s
|
<pre class="programlisting"><auto-index-internal>on
|
||||||
then it may be preferable to place the index in a <code class="computeroutput"><span class="special"><</span><span class="identifier">chapter</span><span class="special">></span></code>
|
</pre>
|
||||||
or <code class="computeroutput"><span class="special"><</span><span class="identifier">appendix</span><span class="special">></span></code> block. You can also place the index inside
|
<p>
|
||||||
an <code class="computeroutput"><span class="special"><</span><span class="identifier">index</span><span class="special">></span></code> block if you prefer, in which case the
|
(usually recommended for HTML output, and not the default) then you can also
|
||||||
index does not appear in on a page of it's own, but after the TOC in the HTML
|
decide what kind of XML wrapper the generated index is placed in. By default
|
||||||
output.
|
this is a <code class="computeroutput"><span class="special"><</span><span class="identifier">section</span><span class="special">>...</</span><span class="identifier">section</span><span class="special">></span></code> XML block (this replaces the original
|
||||||
|
<code class="computeroutput"><span class="special"><</span><span class="identifier">index</span><span class="special">>...</</span><span class="identifier">index</span><span class="special">></span></code> block). However, depending upon the structure
|
||||||
|
of the document and whether or not you want the index on a separate page -
|
||||||
|
or else on the front page after the TOC - you may want to place the index inside
|
||||||
|
a different type of XML block. For example if your document uses <code class="computeroutput"><span class="special"><</span><span class="identifier">chapter</span><span class="special">></span></code> top level content rather than <code class="computeroutput"><span class="special"><</span><span class="identifier">section</span><span class="special">></span></code>s then it may be preferable to place the
|
||||||
|
index in a <code class="computeroutput"><span class="special"><</span><span class="identifier">chapter</span><span class="special">></span></code> or <code class="computeroutput"><span class="special"><</span><span class="identifier">appendix</span><span class="special">></span></code>
|
||||||
|
block. You can also place the index inside an <code class="computeroutput"><span class="special"><</span><span class="identifier">index</span><span class="special">></span></code>
|
||||||
|
block if you prefer, in which case the index does not appear in on a page of
|
||||||
|
its own, but after the TOC in the HTML output.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
You control the type of XML block used by setting the <code class="literal"><auto-index-type>element-name</code>
|
You control the type of XML block used by setting the <code class="literal"><auto-index-type>element-name</code>
|
||||||
attribute in the Jamfile, or via the <code class="computeroutput"><span class="identifier">index</span><span class="special">-</span><span class="identifier">type</span><span class="special">=</span><span class="identifier">element</span><span class="special">-</span><span class="identifier">name</span></code> command line option to auto-index itself.
|
attribute in the Jamfile, or via the <code class="computeroutput"><span class="identifier">index</span><span class="special">-</span><span class="identifier">type</span><span class="special">=</span><span class="identifier">element</span><span class="special">-</span><span class="identifier">name</span></code> command line option to auto-index itself.
|
||||||
For example, to place the index in an appendix your Jamfile might look like:
|
For example, to place the index in an appendix, your Jamfile might look like:
|
||||||
</p>
|
</p>
|
||||||
<pre class="programlisting">using quickbook ;
|
<pre class="programlisting">using quickbook ;
|
||||||
using auto-index ;
|
using auto-index ;
|
||||||
|
|
||||||
xml type_traits : type_traits.qbk ;
|
xml mylibrary : mylibary.qbk ;
|
||||||
boostbook standalone
|
boostbook standalone
|
||||||
:
|
:
|
||||||
type_traits
|
mylibrary
|
||||||
:
|
:
|
||||||
# indexing is on:
|
# auto-indexing is on:
|
||||||
<auto-index>on
|
<auto-index>on
|
||||||
# PDF's rely on the XSL stylesheets to generate the index:
|
|
||||||
<format>pdf:<auto-index-internal>off
|
# PDFs rely on the XSL stylesheets to generate the index:
|
||||||
|
<format>pdf:<auto-index-internal>off
|
||||||
|
|
||||||
# HTML output uses auto-index to generate the index:
|
# HTML output uses auto-index to generate the index:
|
||||||
<format>html:<auto-index-internal>on
|
<format>html:<auto-index-internal>on
|
||||||
|
|
||||||
# Name of script file to use:
|
# Name of script file to use:
|
||||||
<auto-index-script>index.idx
|
<auto-index-script>index.idx
|
||||||
|
|
||||||
# Set the XML wrapper for HML Indexes to "appendix":
|
# Set the XML wrapper for HML Indexes to "appendix":
|
||||||
<format>html:<auto-index-type>appendix
|
<format>html:<auto-index-type>appendix
|
||||||
|
|
||||||
# Turn on multiple index support:
|
# Turn on multiple index support:
|
||||||
<xsl:param>index.on.type=1
|
<xsl:param>index.on.type=1
|
||||||
</pre>
|
</pre>
|
||||||
<a name="autoindex.tut.step_4__create_the_script_file"></a><h5>
|
<a name="autoindex.tut.step_4__create_the_script_file____to_control_what_to_index"></a><h5>
|
||||||
<a name="id1011948"></a>
|
<a name="id868460"></a>
|
||||||
<a class="link" href="tut.html#autoindex.tut.step_4__create_the_script_file">Step 4: Create
|
<a class="link" href="tut.html#autoindex.tut.step_4__create_the_script_file____to_control_what_to_index">Step
|
||||||
the script file</a>
|
4: Create the script file - to control what to index</a>
|
||||||
</h5>
|
</h5>
|
||||||
<p>
|
<p>
|
||||||
AutoIndex works by reading a script file that tells it what to index, at it's
|
AutoIndex works by reading a script file that tells it what to index. At its
|
||||||
simplest it will scan one or more headers for terms that should be indexed
|
simplest, it will scan one or more headers for terms that should be indexed
|
||||||
in the documentation. So for example to scan "myheader.hpp" the script
|
in the documentation. So for example to scan "myheader.hpp" the script
|
||||||
file would just contain:
|
file would just contain:
|
||||||
</p>
|
</p>
|
||||||
@ -438,13 +565,38 @@ boostbook standalone
|
|||||||
Or we can recursively scan through directories looking for all the files to
|
Or we can recursively scan through directories looking for all the files to
|
||||||
scan whose name matches a particular regular expression:
|
scan whose name matches a particular regular expression:
|
||||||
</p>
|
</p>
|
||||||
<pre class="programlisting">!scan-path "../../../../boost/math" ".*.hpp" true </pre>
|
<pre class="programlisting">!scan-path "boost/mylibrary" ".*.hpp" true </pre>
|
||||||
<p>
|
<p>
|
||||||
Note how each argument is whitespace separated and can be optionally enclosed
|
Each argument is whitespace separated and can be optionally enclosed in "double
|
||||||
in "double quotes". The final <span class="emphasis"><em>true</em></span> argument
|
quotes" (recommended).
|
||||||
indicates that subdirectories in <code class="computeroutput"><span class="special">../../../../</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span></code>
|
|
||||||
should be searched in addition to that directory.
|
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
The final <span class="emphasis"><em>true</em></span> argument indicates that subdirectories
|
||||||
|
in <code class="computeroutput"><span class="special">/</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">mylibrary</span></code> should be searched recursively
|
||||||
|
in addition to that directory.
|
||||||
|
</p>
|
||||||
|
<div class="caution"><table border="0" summary="Caution">
|
||||||
|
<tr>
|
||||||
|
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../images/caution.png"></td>
|
||||||
|
<th align="left">Caution</th>
|
||||||
|
</tr>
|
||||||
|
<tr><td align="left" valign="top"><p>
|
||||||
|
The second <span class="emphasis"><em>file-name-regex</em></span> argument is a regular expression!
|
||||||
|
</p></td></tr>
|
||||||
|
</table></div>
|
||||||
|
<div class="caution"><table border="0" summary="Caution">
|
||||||
|
<tr>
|
||||||
|
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="../images/caution.png"></td>
|
||||||
|
<th align="left">Caution</th>
|
||||||
|
</tr>
|
||||||
|
<tr><td align="left" valign="top"><p>
|
||||||
|
The scan-path is modified by any setting of <auto-index-prefix>. The
|
||||||
|
examples here assume that this is <code class="computeroutput"><span class="special"><</span><span class="keyword">auto</span><span class="special">-</span><span class="identifier">index</span><span class="special">-</span><span class="identifier">prefix</span><span class="special">>../../..</span></code> so that <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">mylibrary</span></code>
|
||||||
|
will be your header files, <code class="computeroutput"><span class="identifier">libs</span><span class="special">/</span><span class="identifier">mylibrary</span><span class="special">/</span><span class="identifier">docs</span></code> will
|
||||||
|
be your docs, like .qbk <code class="computeroutput"><span class="identifier">libs</span><span class="special">/</span><span class="identifier">mylibrary</span><span class="special">/</span><span class="identifier">examples</span></code>
|
||||||
|
will be your examples, usually .cpp.
|
||||||
|
</p></td></tr>
|
||||||
|
</table></div>
|
||||||
<p>
|
<p>
|
||||||
Often the <span class="emphasis"><em>scan</em></span> or <span class="emphasis"><em>scan-path</em></span> rules
|
Often the <span class="emphasis"><em>scan</em></span> or <span class="emphasis"><em>scan-path</em></span> rules
|
||||||
will bring in too many terms to search for, so we need to be able to exclude
|
will bring in too many terms to search for, so we need to be able to exclude
|
||||||
@ -478,8 +630,9 @@ boostbook standalone
|
|||||||
<pre class="programlisting"><span class="identifier">reflex</span> <span class="special">\<</span><span class="identifier">reflex</span><span class="special">\</span><span class="identifier">w</span><span class="special">*\></span>
|
<pre class="programlisting"><span class="identifier">reflex</span> <span class="special">\<</span><span class="identifier">reflex</span><span class="special">\</span><span class="identifier">w</span><span class="special">*\></span>
|
||||||
</pre>
|
</pre>
|
||||||
<p>
|
<p>
|
||||||
will index occurrences of "reflex", reflexing" and "reflexed"
|
will index occurrences of "reflex", "reflexing" and "reflexed"
|
||||||
all under the same entry <span class="emphasis"><em>reflex</em></span>.
|
all under the same entry <span class="emphasis"><em>reflex</em></span>. You will very often need
|
||||||
|
to use this to deal with plurals and other variants.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
This inclusion rule can also restrict the term to certain sections, and add
|
This inclusion rule can also restrict the term to certain sections, and add
|
||||||
@ -494,43 +647,73 @@ boostbook standalone
|
|||||||
</p>
|
</p>
|
||||||
<pre class="programlisting"><span class="special">!</span><span class="identifier">rewrite</span><span class="special">-</span><span class="identifier">name</span> <span class="string">"(?i)(?:A|The)\s+(.*)"</span> <span class="string">"\1"</span>
|
<pre class="programlisting"><span class="special">!</span><span class="identifier">rewrite</span><span class="special">-</span><span class="identifier">name</span> <span class="string">"(?i)(?:A|The)\s+(.*)"</span> <span class="string">"\1"</span>
|
||||||
</pre>
|
</pre>
|
||||||
<a name="autoindex.tut.step_5__add_manual_index_entries___optional"></a><h5>
|
<p>
|
||||||
<a name="id1012202"></a>
|
Adding manual terms is most useful if you are using Quickbook to prepare your
|
||||||
<a class="link" href="tut.html#autoindex.tut.step_5__add_manual_index_entries___optional">Step
|
documentation.
|
||||||
5: Add Manual Index Entries - Optional</a>
|
</p>
|
||||||
|
<p>
|
||||||
|
If many terms that you believe users would seek in the index are used in the
|
||||||
|
textual sections (and that these terms may not used in the C++ code itself,
|
||||||
|
or that you want to direct the user to the text rather than functions or classes),
|
||||||
|
then you need to add terms.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
This may lead to too much indexing (especially if you have provided a Doxygen
|
||||||
|
autodoc C++ reference section that provides a good way of getting the C++ functions
|
||||||
|
etc). So it may be more useful to <span class="bold"><strong>only</strong></span> index
|
||||||
|
the text part?
|
||||||
|
</p>
|
||||||
|
<pre class="programlisting">!scan-path "boost/mylibrary" ".*.qbk" true </pre>
|
||||||
|
<p>
|
||||||
|
You could also scan the examples (.cpp) files. This will scan and may index
|
||||||
|
any explanatory C++ comments too. If an example's output is appended as a comment
|
||||||
|
then this text will also be scanned.
|
||||||
|
</p>
|
||||||
|
<a name="autoindex.tut.step_5__add_manual_index_entries_to_docbook_xml___optional"></a><h5>
|
||||||
|
<a name="id868851"></a>
|
||||||
|
<a class="link" href="tut.html#autoindex.tut.step_5__add_manual_index_entries_to_docbook_xml___optional">Step
|
||||||
|
5: Add Manual Index Entries to Docbook XML - Optional</a>
|
||||||
</h5>
|
</h5>
|
||||||
<p>
|
<p>
|
||||||
If you add manual <code class="computeroutput"><span class="special"><</span><span class="identifier">indexentry</span><span class="special">></span></code> markup to your docbook XML then these will
|
If you add manual <code class="computeroutput"><span class="special"><</span><span class="identifier">indexentry</span><span class="special">></span></code> markup to your Docbook XML then these will
|
||||||
be passed through unchanged. Please note however, that if you are using auto-index's
|
be passed through unchanged. Please note however, that if you are using auto-index's
|
||||||
internal index generation then it only recognises <code class="computeroutput"><span class="special"><</span><span class="identifier">primary</span><span class="special">></span></code>
|
internal index generation then it only recognises <code class="computeroutput"><span class="special"><</span><span class="identifier">primary</span><span class="special">></span></code>
|
||||||
and <code class="computeroutput"><span class="special"><</span><span class="identifier">secondary</span><span class="special">></span></code> elements within the <code class="computeroutput"><span class="special"><</span><span class="identifier">indexterm</span><span class="special">></span></code>.
|
and <code class="computeroutput"><span class="special"><</span><span class="identifier">secondary</span><span class="special">></span></code> elements within the <code class="computeroutput"><span class="special"><</span><span class="identifier">indexterm</span><span class="special">></span></code>.
|
||||||
<code class="computeroutput"><span class="special"><</span><span class="identifier">tertiary</span><span class="special">></span></code>, <code class="computeroutput"><span class="special"><</span><span class="identifier">see</span><span class="special">></span></code> and
|
<code class="computeroutput"><span class="special"><</span><span class="identifier">tertiary</span><span class="special">></span></code>, <code class="computeroutput"><span class="special"><</span><span class="identifier">see</span><span class="special">></span></code> and
|
||||||
<code class="computeroutput"><span class="special"><</span><span class="identifier">seealso</span><span class="special">></span></code> elements are not currently recognised and
|
<code class="computeroutput"><span class="special"><</span><span class="identifier">seealso</span><span class="special">></span></code> elements are not currently recognised and
|
||||||
auto-index will emit a warning if these are used. Likewise none of the attributes
|
auto-index will emit a warning if these are used.
|
||||||
which can be applied to these elements are used when auto-index generates the
|
</p>
|
||||||
index itself, with the exception of the "type" attribute.
|
<p>
|
||||||
|
Likewise none of the attributes which can be applied to these elements are
|
||||||
|
used when auto-index generates the index itself, with the exception of the
|
||||||
|
"type" attribute.
|
||||||
</p>
|
</p>
|
||||||
<a name="autoindex.tut.step_6__build_the_docs"></a><h5>
|
<a name="autoindex.tut.step_6__build_the_docs"></a><h5>
|
||||||
<a name="id1016192"></a>
|
<a name="id868972"></a>
|
||||||
<a class="link" href="tut.html#autoindex.tut.step_6__build_the_docs">Step 6: Build the Docs</a>
|
<a class="link" href="tut.html#autoindex.tut.step_6__build_the_docs">Step 6: Build the Docs</a>
|
||||||
</h5>
|
</h5>
|
||||||
<p>
|
<p>
|
||||||
Make sure that auto-index.jam is in your BOOST_BUILD_PATH, by either setting
|
Make sure that auto-index.jam is in your BOOST_BUILD_PATH, by either setting
|
||||||
the environment variable BOOST_BUILD_PATH to point to the directory containing
|
the environment variable BOOST_BUILD_PATH to point to the directory containing
|
||||||
it, or by copying the file into <code class="computeroutput"><span class="identifier">boost</span><span class="special">-</span><span class="identifier">root</span><span class="special">/</span><span class="identifier">tools</span><span class="special">/</span><span class="identifier">build</span><span class="special">/</span><span class="identifier">v2</span><span class="special">/</span><span class="identifier">tools</span></code>. Then you build the docs with either:
|
it, or by copying the <code class="computeroutput"><span class="keyword">auto</span><span class="special">-</span><span class="identifier">index</span><span class="special">.</span><span class="identifier">jam</span></code>
|
||||||
|
file into <code class="computeroutput"><span class="identifier">boost</span><span class="special">-</span><span class="identifier">root</span><span class="special">/</span><span class="identifier">tools</span><span class="special">/</span><span class="identifier">build</span><span class="special">/</span><span class="identifier">v2</span><span class="special">/</span><span class="identifier">tools</span></code>.
|
||||||
</p>
|
</p>
|
||||||
<pre class="programlisting"><span class="identifier">bjam</span> <span class="identifier">release</span>
|
<p>
|
||||||
|
Then you build the docs with either:
|
||||||
|
</p>
|
||||||
|
<pre class="programlisting"><span class="identifier">bjam</span> <span class="identifier">release</span> <span class="special">></span> <span class="identifier">mylibrary_html</span><span class="special">.</span><span class="identifier">log</span>
|
||||||
</pre>
|
</pre>
|
||||||
<p>
|
<p>
|
||||||
To build the html docs or:
|
To build the html docs or:
|
||||||
</p>
|
</p>
|
||||||
<pre class="programlisting"><span class="identifier">bjam</span> <span class="identifier">pdf</span> <span class="identifier">release</span>
|
<pre class="programlisting"><span class="identifier">bjam</span> <span class="identifier">pdf</span> <span class="identifier">release</span> <span class="special">></span> <span class="identifier">mylibrary_pdf</span><span class="special">.</span><span class="identifier">log</span>
|
||||||
</pre>
|
</pre>
|
||||||
<p>
|
<p>
|
||||||
To build the pdf.
|
To build the pdf.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
During the build process you should see AutoIndex emit a message such as:
|
During the build process you should see AutoIndex emit a message in the log
|
||||||
|
file such as:
|
||||||
</p>
|
</p>
|
||||||
<pre class="programlisting">Indexing 990 terms... </pre>
|
<pre class="programlisting">Indexing 990 terms... </pre>
|
||||||
<p>
|
<p>
|
||||||
@ -543,9 +726,15 @@ boostbook standalone
|
|||||||
<p>
|
<p>
|
||||||
Again if you see that 0 entries were created then something is wrong!
|
Again if you see that 0 entries were created then something is wrong!
|
||||||
</p>
|
</p>
|
||||||
<a name="autoindex.tut.step_7__iterate"></a><h5>
|
<p>
|
||||||
<a name="id1016314"></a>
|
Examine the log file, and if the cause is not obvious, make sure that you have
|
||||||
<a class="link" href="tut.html#autoindex.tut.step_7__iterate">Step 7: Iterate</a>
|
<code class="literal"><auto-index-verbose>on</code> and that <code class="literal">!debug regular-expression
|
||||||
|
directive</code> is at the head of the script file.
|
||||||
|
</p>
|
||||||
|
<a name="autoindex.tut.step_7__iterate___to_refine_your_index"></a><h5>
|
||||||
|
<a name="id869166"></a>
|
||||||
|
<a class="link" href="tut.html#autoindex.tut.step_7__iterate___to_refine_your_index">Step 7:
|
||||||
|
Iterate - to refine your index</a>
|
||||||
</h5>
|
</h5>
|
||||||
<p>
|
<p>
|
||||||
Creating a good index is an iterative process, often the first step is just
|
Creating a good index is an iterative process, often the first step is just
|
||||||
@ -573,15 +762,15 @@ boostbook standalone
|
|||||||
<th align="left">Tip</th>
|
<th align="left">Tip</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td align="left" valign="top"><p>
|
<tr><td align="left" valign="top"><p>
|
||||||
If you don't understand why a particular term is present in the index, try
|
If you don't understand why a particular term is (or is not) present in the
|
||||||
adding a <span class="emphasis"><em>!debug regular-expression</em></span> directive to the
|
index, try adding a <span class="emphasis"><em>!debug regular-expression</em></span> directive
|
||||||
<a class="link" href="script_ref.html" title="Script File Reference">script file</a>.
|
to the <a class="link" href="script_ref.html" title="Script File Reference">script file</a>.
|
||||||
</p></td></tr>
|
</p></td></tr>
|
||||||
</table></div>
|
</table></div>
|
||||||
</div>
|
</div>
|
||||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||||
<td align="left"></td>
|
<td align="left"></td>
|
||||||
<td align="right"><div class="copyright-footer">Copyright © 2008 John Maddock<p>
|
<td align="right"><div class="copyright-footer">Copyright © 2008 , 2011 John Maddock<p>
|
||||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||||
</p>
|
</p>
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
<a name="autoindex.xml"></a><a class="link" href="xml.html" title="XML Handling">XML Handling</a>
|
<a name="autoindex.xml"></a><a class="link" href="xml.html" title="XML Handling">XML Handling</a>
|
||||||
</h2></div></div></div>
|
</h2></div></div></div>
|
||||||
<p>
|
<p>
|
||||||
Auto-index is rather simplistic in it's handling of XML:
|
Auto-index is rather simplistic in its handling of XML:
|
||||||
</p>
|
</p>
|
||||||
<div class="itemizedlist"><ul type="disc">
|
<div class="itemizedlist"><ul type="disc">
|
||||||
<li>
|
<li>
|
||||||
@ -44,7 +44,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||||
<td align="left"></td>
|
<td align="left"></td>
|
||||||
<td align="right"><div class="copyright-footer">Copyright © 2008 John Maddock<p>
|
<td align="right"><div class="copyright-footer">Copyright © 2008 , 2011 John Maddock<p>
|
||||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||||
</p>
|
</p>
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
<div><div class="authorgroup"><div class="author"><h3 class="author">
|
<div><div class="authorgroup"><div class="author"><h3 class="author">
|
||||||
<span class="firstname">John</span> <span class="surname">Maddock</span>
|
<span class="firstname">John</span> <span class="surname">Maddock</span>
|
||||||
</h3></div></div></div>
|
</h3></div></div></div>
|
||||||
<div><p class="copyright">Copyright © 2008 John Maddock</p></div>
|
<div><p class="copyright">Copyright © 2008 , 2011 John Maddock</p></div>
|
||||||
<div><div class="legalnotice">
|
<div><div class="legalnotice">
|
||||||
<a name="id1010583"></a><p>
|
<a name="id857440"></a><p>
|
||||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||||
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
|
||||||
</p>
|
</p>
|
||||||
@ -41,7 +41,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||||
<td align="left"><p><small>Last revised: January 26, 2011 at 18:45:43 GMT</small></p></td>
|
<td align="left"><p><small>Last revised: January 28, 2011 at 15:01:40 GMT</small></p></td>
|
||||||
<td align="right"><div class="copyright-footer"></div></td>
|
<td align="right"><div class="copyright-footer"></div></td>
|
||||||
</tr></table>
|
</tr></table>
|
||||||
<hr>
|
<hr>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user