Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/doc/html/boostbook/documenting/s02.html @ 12

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

added boost

File size: 6.2 KB
Line 
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
4<title>From HTML to BoostBook</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="../documenting.html" title="Chapter 18. Documenting libraries">
9<link rel="prev" href="../documenting.html" title="Chapter 18. Documenting libraries">
10<link rel="next" href="../sectioning.html" title="Sectioning in BoostBook">
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="../documenting.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../documenting.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="../sectioning.html"><img src="../../images/next.png" alt="Next"></a>
24</div>
25<div class="section" lang="en">
26<div class="titlepage"><div><div><h2 class="title" style="clear: both">
27<a name="id2843215"></a>From HTML to BoostBook</h2></div></div></div>
28<p>Most library authors are comfortable with writing HTML
29    documentation. Writing <a href="http://www.docbook.org" target="_top">DocBook</a> documentation (and,
30    by extension, BoostBook documentation) is quite similar to writing
31    HTML, except that BoostBook uses different element names from HTML
32    (see <a href="s02.html#html.to.boostbook" title="Table 18.1. Converting HTML elements to BoostBook">Table 18.1, &#8220;Converting HTML elements to BoostBook&#8221;</a>) and BoostBook XML is a
33    much more rigid format than HTML.</p>
34<p>One of the easiest ways to convert HTML documentation into
35    BoostBook documentation is to use <a href="http://tidy.sourceforge.net/" target="_top">HTML Tidy</a> to transform
36    your HTML into valid XHTML, which will make sure that all elements
37    are properly closed, then apply the transformations in <a href="s02.html#html.to.boostbook" title="Table 18.1. Converting HTML elements to BoostBook">Table 18.1, &#8220;Converting HTML elements to BoostBook&#8221;</a> to the body of the XHTML
38    document. The following command uses HTML Tidy to transform HTML
39    into valid XHTML:</p>
40<pre class="programlisting">
41  tidy -asxhtml input.html &gt; output.xhtml</pre>
42<p>When converting documentation from HTML to BoostBook, note
43    that some redundant information that has to be manually maintained
44    in HTML is automatically generated in BoostBook: for instance, the
45    library categorizations, purpose, and author list described in
46    <a href="../documenting.html#boostbook.defining" title="Defining a BoostBook library">the section called &#8220;Defining a BoostBook library&#8221;</a> are used both in the
47    documentation for the library and to build alphabetical and
48    categorized lists of known libraries; similarly, tables of
49    contents are built automatically from the titles of sections in
50    the BoostBook document.</p>
51<div class="table">
52<a name="html.to.boostbook"></a><p class="title"><b>Table 18.1. Converting HTML elements to BoostBook</b></p>
53<table class="table" summary="Converting HTML elements to BoostBook">
54<colgroup>
55<col>
56<col>
57</colgroup>
58<thead><tr>
59<th align="left">HTML</th>
60<th align="left">BoostBook</th>
61</tr></thead>
62<tbody>
63<tr>
64<td align="left"><p>&lt;h1&gt;, &lt;h2&gt;, etc.</p></td>
65<td align="left"><p>&lt;section&gt;, &lt;title&gt;; See <a href="../sectioning.html" title="Sectioning in BoostBook">the section called &#8220;Sectioning in BoostBook&#8221;</a></p></td>
66</tr>
67<tr>
68<td align="left"><p>&lt;i&gt;, &lt;em&gt;</p></td>
69<td align="left"><p>&lt;emphasis&gt;</p></td>
70</tr>
71<tr>
72<td align="left"><p>&lt;b&gt;</p></td>
73<td align="left"><p>&lt;emphasis role="bold"&gt;</p></td>
74</tr>
75<tr>
76<td align="left"><p>&lt;ol&gt;</p></td>
77<td align="left"><p>&lt;orderedlist&gt;</p></td>
78</tr>
79<tr>
80<td align="left"><p>&lt;ul&gt;</p></td>
81<td align="left"><p>&lt;itemizedlist&gt;</p></td>
82</tr>
83<tr>
84<td align="left"><p>&lt;li&gt;</p></td>
85<td align="left"><p>&lt;listitem&gt;</p></td>
86</tr>
87<tr>
88<td align="left"><p>&lt;pre&gt;</p></td>
89<td align="left"><p>&lt;programlisting&gt;</p></td>
90</tr>
91<tr>
92<td align="left"><p>&lt;code&gt;</p></td>
93<td align="left"><p>&lt;computeroutput&gt;,&lt;code&gt;</p></td>
94</tr>
95<tr>
96<td align="left"><p>&lt;p&gt;</p></td>
97<td align="left"><p>&lt;para&gt;, &lt;simpara&gt;</p></td>
98</tr>
99<tr>
100<td align="left"><p>&lt;a&gt;</p></td>
101<td align="left"><p>&lt;xref&gt;, &lt;link&gt;, &lt;ulink&gt;;, See <a href="../together.html#boostbook.linking" title="Linking in BoostBook">the section called &#8220;Linking in BoostBook&#8221;</a></p></td>
102</tr>
103<tr>
104<td align="left"><p>&lt;table&gt;, &lt;tr&gt;, &lt;th&gt;, &lt;td&gt;</p></td>
105<td align="left"><p>&lt;table&gt;, &lt;informaltable&gt;, &lt;tgroup&gt;, &lt;thead&gt;, &lt;tfoot&gt;, &lt;tbody&gt;, &lt;row&gt;, &lt;entry&gt;, &lt;entrytbl&gt;; BoostBook tables are equivalent to DocBook tables, for which there is a good <a href="http://opensource.bureau-cornavin.com/crash-course/tables.html" target="_top">tutorial here</a></p></td>
106</tr>
107</tbody>
108</table>
109</div>
110</div>
111<table width="100%"><tr>
112<td align="left"></td>
113<td align="right"><small>Copyright © 2003-2005 Douglas Gregor</small></td>
114</tr></table>
115<hr>
116<div class="spirit-nav">
117<a accesskey="p" href="../documenting.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../documenting.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="../sectioning.html"><img src="../../images/next.png" alt="Next"></a>
118</div>
119</body>
120</html>
Note: See TracBrowser for help on using the repository browser.