Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/doc/html/boostbook/together.html @ 25

Last change on this file since 25 was 12, checked in by landauf, 17 years ago

added boost

File size: 5.9 KB
Line 
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
4<title>Chapter 19. Bringing Together a BoostBook Document</title>
5<link rel="stylesheet" href="../boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
7<link rel="start" href="../index.html" title="The Boost C++ Libraries">
8<link rel="up" href="../boostbook.html" title="Part II. The BoostBook Documentation Format">
9<link rel="prev" href="sectioning.html" title="Sectioning in BoostBook">
10<link rel="next" href="../reference.html" title="Chapter 20. Reference">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%">
14<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../boost.png"></td>
15<td align="center"><a href="../../../index.htm">Home</a></td>
16<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="../../../people/people.htm">People</a></td>
18<td align="center"><a href="../../../more/faq.htm">FAQ</a></td>
19<td align="center"><a href="../../../more/index.htm">More</a></td>
20</table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="sectioning.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../boostbook.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../reference.html"><img src="../images/next.png" alt="Next"></a>
24</div>
25<div class="chapter" lang="en">
26<div class="titlepage"><div><div><h2 class="title">
27<a name="boostbook.together"></a>Chapter 19. Bringing Together a BoostBook Document</h2></div></div></div>
28<div class="toc">
29<p><b>Table of Contents</b></p>
30<dl><dt><span class="section"><a href="together.html#boostbook.linking">Linking in BoostBook</a></span></dt></dl>
31</div>
32<div class="section" lang="en">
33<div class="titlepage"><div><div><h2 class="title" style="clear: both">
34<a name="boostbook.linking"></a>Linking in BoostBook</h2></div></div></div>
35<p>How one links to another element in BoostBook depends
36    greatly on the nature of the element linked and how the link
37    should appear. There are three general linking elements:
38    &lt;xref&gt;, &lt;link&gt;, and &lt;ulink&gt;. Additionally, there
39    are linking elements for referencing specific types of entities,
40    such as classes (&lt;classname&gt;), functions
41    (&lt;functionname&gt;), or libraries (&lt;libraryname&gt;).</p>
42<p>The &lt;xref&gt; element references elements that have an
43    <code class="computeroutput">id</code> attribute and a title. The actual link text is
44    composed from title and type of the element referenced. To link to
45    a particular ID, create an &lt;xref&gt; element with the
46    <code class="computeroutput">linkend</code> attribute set to the ID of the intended
47    target. For instance, this section's ID is
48    <code class="computeroutput">boostbook.linking</code>, so we create a reference it to
49    with <code class="computeroutput">&lt;xref linkend="boostbook.linking"/&gt;</code>, which
50    will look like this in the text: <a href="together.html#boostbook.linking" title="Linking in BoostBook">the section called &#8220;Linking in BoostBook&#8221;</a>.</p>
51<p>The &lt;link&gt; element references an ID in the same way as
52    &lt;xref&gt;, except that &lt;link&gt; does not generate any text
53    for the link, so text must be supplied within the element. For
54    instance, we can again link to this chapter but this time specify
55    our own text with <code class="computeroutput">&lt;link
56    linkend="boostbook.linking"&gt;like this&lt;/link&gt;</code>. This
57    markup will result in a link to this chapter that looks <a href="together.html#boostbook.linking" title="Linking in BoostBook">like this</a>.</p>
58<p>The &lt;ulink&gt; element references a URL that is outside
59    of the DocBook document. The <code class="computeroutput">url</code> attribute contains
60    the URL to link to, and the element data provides the link
61    text.For instance, we can link to the the Boost web site with
62    <code class="computeroutput">&lt;ulink
63    url="http://www.boost.org"&gt;Boost&lt;/ulink&gt;,</code> which
64    appears in the document like this: <a href="http://www.boost.org" target="_top">Boost</a>.</p>
65<p>The &lt;classname&gt;, &lt;functionname&gt;,
66    &lt;methodname&gt;, and &lt;libraryname&gt; link to classes,
67    functions, methods, and libraries, respectively. The text of each
68    element gives both the name of the element to link to and the link
69    text. For instance, we can link to the Function library with
70    <code class="computeroutput">&lt;libraryname&gt;Function&lt;/libraryname&gt;</code>,
71    which results in the following:
72    <a href="../function.html" title="Chapter 4. Boost.Function">Function</a>. In cases where the displayed
73    text is different from the actual name, the <code class="computeroutput">alt</code>
74    attribute can be specified. For instance, the following XML
75    element references the <code class="computeroutput"><a href="../boost/function.html" title="Class template function">boost::function</a></code>
76    class template but displays the text <code class="computeroutput"><a href="../boost/function.html" title="Class template function">function</a></code>: <code class="computeroutput">&lt;classname
77    alt="boost::function"&gt;function&lt;/classname&gt;</code>.</p>
78</div>
79</div>
80<table width="100%"><tr>
81<td align="left"></td>
82<td align="right"><small>Copyright © 2003-2005 Douglas Gregor</small></td>
83</tr></table>
84<hr>
85<div class="spirit-nav">
86<a accesskey="p" href="sectioning.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../boostbook.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../reference.html"><img src="../images/next.png" alt="Next"></a>
87</div>
88</body>
89</html>
Note: See TracBrowser for help on using the repository browser.