...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
How one links to another element in BoostBook depends
greatly on the nature of the element linked and how the link
should appear. There are three general linking elements:
The id
attribute and a title. The actual link text is
composed from title and type of the element referenced. To link to
a particular ID, create an linkend
attribute set to the ID of the intended
target. For instance, this section's ID is
boostbook.linking
, so we create a reference it to
with
, which
will look like this in the text: the section called “Linking in BoostBook”.
The element references an ID in the same way as
like this
. This
markup will result in a link to this chapter that looks like this.
The url
attribute contains
the URL to link to, and the element data provides the link
text.For instance, we can link to the the Boost web site with
which
appears in the document like this: Boost.
In BoostBook, url
attribute to boost:
followed by the file's path. For example, we can link to the
flyweight library with
,
which will appear like this: Boost.Flyweight.
This schema is only supported for BoostBook
The
,
which results in the following:
Function. In cases where the displayed
text is different from the actual name, the alt
attribute can be specified. For instance, the following XML
element references the boost::function
class template but displays the text function
:
.