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, “Converting HTML elements to BoostBook”</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, “Converting HTML elements to BoostBook”</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 > 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 “Defining a BoostBook library”</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><h1>, <h2>, etc.</p></td> |
---|
65 | <td align="left"><p><section>, <title>; See <a href="../sectioning.html" title="Sectioning in BoostBook">the section called “Sectioning in BoostBook”</a></p></td> |
---|
66 | </tr> |
---|
67 | <tr> |
---|
68 | <td align="left"><p><i>, <em></p></td> |
---|
69 | <td align="left"><p><emphasis></p></td> |
---|
70 | </tr> |
---|
71 | <tr> |
---|
72 | <td align="left"><p><b></p></td> |
---|
73 | <td align="left"><p><emphasis role="bold"></p></td> |
---|
74 | </tr> |
---|
75 | <tr> |
---|
76 | <td align="left"><p><ol></p></td> |
---|
77 | <td align="left"><p><orderedlist></p></td> |
---|
78 | </tr> |
---|
79 | <tr> |
---|
80 | <td align="left"><p><ul></p></td> |
---|
81 | <td align="left"><p><itemizedlist></p></td> |
---|
82 | </tr> |
---|
83 | <tr> |
---|
84 | <td align="left"><p><li></p></td> |
---|
85 | <td align="left"><p><listitem></p></td> |
---|
86 | </tr> |
---|
87 | <tr> |
---|
88 | <td align="left"><p><pre></p></td> |
---|
89 | <td align="left"><p><programlisting></p></td> |
---|
90 | </tr> |
---|
91 | <tr> |
---|
92 | <td align="left"><p><code></p></td> |
---|
93 | <td align="left"><p><computeroutput>,<code></p></td> |
---|
94 | </tr> |
---|
95 | <tr> |
---|
96 | <td align="left"><p><p></p></td> |
---|
97 | <td align="left"><p><para>, <simpara></p></td> |
---|
98 | </tr> |
---|
99 | <tr> |
---|
100 | <td align="left"><p><a></p></td> |
---|
101 | <td align="left"><p><xref>, <link>, <ulink>;, See <a href="../together.html#boostbook.linking" title="Linking in BoostBook">the section called “Linking in BoostBook”</a></p></td> |
---|
102 | </tr> |
---|
103 | <tr> |
---|
104 | <td align="left"><p><table>, <tr>, <th>, <td></p></td> |
---|
105 | <td align="left"><p><table>, <informaltable>, <tgroup>, <thead>, <tfoot>, <tbody>, <row>, <entry>, <entrytbl>; 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> |
---|