|
Lines 32-57
Link Here
|
| 32 |
--> |
32 |
--> |
| 33 |
|
33 |
|
| 34 |
<appendix id="examples"> |
34 |
<appendix id="examples"> |
| 35 |
<title>Examples</title> |
35 |
<title>½d¨Ò</title> |
| 36 |
|
36 |
|
| 37 |
<para>This appendix contains example SGML files and command lines you can |
37 |
<para>¥»ªþ¿ý¦¬¿ý¤@¨Ç SGML Àɽd¨Ò¡A¥H¤Î¥Î¨ÓÂà´«®æ¦¡ªº¬ÛÃö«ü¥O¡C |
| 38 |
use to convert them from one output format to another. If you have |
38 |
Y¤w¦¨¥\¦w¸Ë¤å¥ópµe¤u¨ã¥]ªº¸Ü¡A¨º»ò´N¥i¥Hª½±µ·Ó¤U±½d¨Ò¨Ó¨Ï¥Î¡C</para> |
| 39 |
successfully installed the Documentation Project tools then you should |
39 |
|
| 40 |
be able to use these examples directly.</para> |
40 |
<para>³o¨Ç¨Ò¤l¨Ã¤£¬O«Ü¸Ô²Ó — ¨Ã¥¼¥]¬A§A¥i¯à·Q¥Îªº¤¸¥ó¡A |
| 41 |
|
41 |
¤×¨ä¹³¬O§A¤å¥óªº«e¶(¥¿¤å«eªº®Ñ¶¡A¥]¬A´v¶¡B§Ç¨¥¡B¥Ø¿ýµ¥) |
| 42 |
<para>These examples are not exhaustive—they do not contain all the |
42 |
Y»Ý°Ñ¦Ò§ó¦h DocBook ¼Ð°O»y¨¥¤å¥óªº¸Ü¡A¨º»ò¥i¥H³z¹L <application>CSup</application>¡B<application>CVSup</application> |
| 43 |
elements you might want to use, particularly in your document's front |
43 |
µ{¦¡¨Ó§ì <literal>doc</literal> tree ³¡¤À¡A¥H¹î¬Ý¥»¤å¥ó©Î¨ä¥L¤å¥óªº SGML ì½Z¡C |
| 44 |
matter. For more examples of DocBook markup you should examine the SGML |
44 |
©ÎªÌ¡A¤]¥i¥H½u¤WÂsÄý |
| 45 |
source for this and other documents, available in the |
45 |
<ulink url="http://www.FreeBSD.org/cgi/cvsweb.cgi/doc/"></ulink>¡C</para> |
| 46 |
<application>CVSup</application> <literal>doc</literal> collection, or |
46 |
|
| 47 |
available online starting at |
47 |
<para>¬°¤FÁ×§K¤£¥²nªº§xÂZ¡A³o¨Ç¨Ò¤l±Ä¥Î¼Ð·Çªº DocBook 4.1 DTD ¦Ó«D FreeBSD ÃB¥~ªº DTD¡C |
| 48 |
<ulink url="http://www.FreeBSD.org/cgi/cvsweb.cgi/doc/"></ulink>.</para> |
48 |
¦P®É¨Ã±Ä¥Î Norm Walsh ¤óªº¼Ë¦¡ªí(stylesheets)¡A¦Ó«D FreeBSD ¤å¥óp¹º¦³¦Û¦æ§ï¹Lªº¼Ë¦¡ªí¡C |
| 49 |
|
49 |
¦b¤@¯ë¨Ï¥Î DocBook ªº¨Ò¤l¡A³o¼Ë¤l·|¤ñ¸û²¤ÆÀô¹Ò¡A¦Ó¤£·|³y¦¨ÃB¥~§xÂZ¡C</para> |
| 50 |
<para>To avoid confusion, these examples use the standard DocBook 4.1 DTD |
|
|
| 51 |
rather than the FreeBSD extension. They also use the stock stylesheets |
| 52 |
distributed by Norm Walsh, rather than any customizations made to those |
| 53 |
stylesheets by the FreeBSD Documentation Project. This makes them more |
| 54 |
useful as generic DocBook examples.</para> |
| 55 |
|
50 |
|
| 56 |
<sect1 id="examples-docbook-book"> |
51 |
<sect1 id="examples-docbook-book"> |
| 57 |
<title>DocBook <sgmltag>book</sgmltag></title> |
52 |
<title>DocBook <sgmltag>book</sgmltag></title> |
|
Lines 63-73
Link Here
|
| 63 |
|
58 |
|
| 64 |
<book> |
59 |
<book> |
| 65 |
<bookinfo> |
60 |
<bookinfo> |
| 66 |
<title>An Example Book</title> |
61 |
<title>¼Ë¥»®Ñªº¨Ò¤l</title> |
| 67 |
|
62 |
|
| 68 |
<author> |
63 |
<author> |
| 69 |
<firstname>Your first name</firstname> |
64 |
<firstname>¦W(first name)</firstname> |
| 70 |
<surname>Your surname</surname> |
65 |
<surname>©m(surname)</surname> |
| 71 |
<affiliation> |
66 |
<affiliation> |
| 72 |
<address><email>foo@example.com</email></address> |
67 |
<address><email>foo@example.com</email></address> |
| 73 |
</affiliation> |
68 |
</affiliation> |
|
Lines 75-104
Link Here
|
| 75 |
|
70 |
|
| 76 |
<copyright> |
71 |
<copyright> |
| 77 |
<year>2000</year> |
72 |
<year>2000</year> |
| 78 |
<holder>Copyright string here</holder> |
73 |
<holder>¬ÛÃöª©Åv¦r¼Ë</holder> |
| 79 |
</copyright> |
74 |
</copyright> |
| 80 |
|
75 |
|
| 81 |
<abstract> |
76 |
<abstract> |
| 82 |
<para>If your book has an abstract then it should go here.</para> |
77 |
<para>¸Ó®ÑY¦³ºKn¡A´N¼g¦b³oÃä¡C</para> |
| 83 |
</abstract> |
78 |
</abstract> |
| 84 |
</bookinfo> |
79 |
</bookinfo> |
| 85 |
|
80 |
|
| 86 |
<preface> |
81 |
<preface> |
| 87 |
<title>Preface</title> |
82 |
<title>§Ç¨¥</title> |
| 88 |
|
83 |
|
| 89 |
<para>Your book may have a preface, in which case it should be placed |
84 |
<para>¸Ó®ÑY¦³§Ç¨¥¡A´N©ñ¦b³oÃä¡C</para> |
| 90 |
here.</para> |
|
|
| 91 |
</preface> |
85 |
</preface> |
| 92 |
|
86 |
|
| 93 |
<chapter> |
87 |
<chapter> |
| 94 |
<title>My first chapter</title> |
88 |
<title>²Ä¤@³¹</title> |
| 95 |
|
89 |
|
| 96 |
<para>This is the first chapter in my book.</para> |
90 |
<para>³o¬O³o¥»®Ñªº²Ä¤@³¹¡C</para> |
| 97 |
|
91 |
|
| 98 |
<sect1> |
92 |
<sect1> |
| 99 |
<title>My first section</title> |
93 |
<title>²Ä¤@¸`</title> |
| 100 |
|
94 |
|
| 101 |
<para>This is the first section in my book.</para> |
95 |
<para>³o¥»®Ñªº²Ä¤@¸`¡C</para> |
| 102 |
</sect1> |
96 |
</sect1> |
| 103 |
</chapter> |
97 |
</chapter> |
| 104 |
</book>]]></programlisting> |
98 |
</book>]]></programlisting> |
|
Lines 115-125
Link Here
|
| 115 |
|
109 |
|
| 116 |
<article> |
110 |
<article> |
| 117 |
<articleinfo> |
111 |
<articleinfo> |
| 118 |
<title>An example article</title> |
112 |
<title>¤å³¹¼Ë¥»</title> |
| 119 |
|
113 |
|
| 120 |
<author> |
114 |
<author> |
| 121 |
<firstname>Your first name</firstname> |
115 |
<firstname>¦W(first name)</firstname> |
| 122 |
<surname>Your surname</surname> |
116 |
<surname>©m(surname)</surname> |
| 123 |
<affiliation> |
117 |
<affiliation> |
| 124 |
<address><email>foo@example.com</email></address> |
118 |
<address><email>foo@example.com</email></address> |
| 125 |
</affiliation> |
119 |
</affiliation> |
|
Lines 127-149
Link Here
|
| 127 |
|
121 |
|
| 128 |
<copyright> |
122 |
<copyright> |
| 129 |
<year>2000</year> |
123 |
<year>2000</year> |
| 130 |
<holder>Copyright string here</holder> |
124 |
<holder>¬ÛÃöª©Åv¦r¼Ë</holder> |
| 131 |
</copyright> |
125 |
</copyright> |
| 132 |
|
126 |
|
| 133 |
<abstract> |
127 |
<abstract> |
| 134 |
<para>If your article has an abstract then it should go here.</para> |
128 |
<para>¸Ó¤å³¹Y¦³ºKn¡A´N¼g¦b³oÃä¡C</para> |
| 135 |
</abstract> |
129 |
</abstract> |
| 136 |
</articleinfo> |
130 |
</articleinfo> |
| 137 |
|
131 |
|
| 138 |
<sect1> |
132 |
<sect1> |
| 139 |
<title>My first section</title> |
133 |
<title>²Ä¤@¸`</title> |
| 140 |
|
134 |
|
| 141 |
<para>This is the first section in my article.</para> |
135 |
<para>¸Ó¤å³¹ªº²Ä¤@¸`¡C</para> |
| 142 |
|
136 |
|
| 143 |
<sect2> |
137 |
<sect2> |
| 144 |
<title>My first sub-section</title> |
138 |
<title>²Ä¤@¤p¸`(sub-section)</title> |
| 145 |
|
139 |
|
| 146 |
<para>This is the first sub-section in my article.</para> |
140 |
<para>¸Ó¤å³¹ªº²Ä¤@¤p¸`(sub-section)</para> |
| 147 |
</sect2> |
141 |
</sect2> |
| 148 |
</sect1> |
142 |
</sect1> |
| 149 |
</article>]]></programlisting> |
143 |
</article>]]></programlisting> |
|
Lines 153-171
Link Here
|
| 153 |
<sect1 id="examples-formatted"> |
147 |
<sect1 id="examples-formatted"> |
| 154 |
<title>Producing formatted output</title> |
148 |
<title>Producing formatted output</title> |
| 155 |
|
149 |
|
| 156 |
<para>This section assumes that you have installed the software listed in |
150 |
<para>¥»¸`¦³¨Ç«e´£¡A°²³]¡G¤w¸g¦³¸Ë <filename role="package">textproc/docproj</filename> |
| 157 |
the <filename role="package">textproc/docproj</filename> port, either by hand, or by |
151 |
¤W±©Ò¦w¸Ë¦U³nÅé¡AµL½×¥¦Ì¬O¥Î port ¤è¦¡¦w¸Ë©Î¬O¤â°Ê¦w¸Ë¡C |
| 158 |
using the port. Further, it is assumed that your software is installed |
152 |
¦¹¥~¡A°²³]©Ò¸Ëªº³nÅé³£©ñ¦b <filename>/usr/local/</filename> ¤Uªº¤l¥Ø¿ý¡A |
| 159 |
in subdirectories under <filename>/usr/local/</filename>, and the |
153 |
¨Ã¥B©Ò¦w¸Ëªº¬ÛÃö°õ¦æÀÉ¡A³£¦³¸Ë¦b§Aªº <envar>PATH</envar> Àô¹ÒÅܼƤºªº¥Ø¿ý¡C |
| 160 |
directory where binaries have been installed is in your |
154 |
¦p¦³¥²nªº¸Ü¡A½Ð¨Ì§Aªº¨t²ÎÀô¹Ò¦Ó½Õ¾ã¬ÛÃö¸ô®|¡C</para> |
| 161 |
<envar>PATH</envar>. Adjust the paths as necessary for your |
|
|
| 162 |
system.</para> |
| 163 |
|
155 |
|
| 164 |
<sect2> |
156 |
<sect2> |
| 165 |
<title>Using Jade</title> |
157 |
<title>¨Ï¥Î Jade</title> |
| 166 |
|
158 |
|
| 167 |
<example> |
159 |
<example> |
| 168 |
<title>Converting DocBook to HTML (one large file)</title> |
160 |
<title>Âà´« DocBook ¬° HTML (§¹¾ã¼Ò¦¡)</title> |
| 169 |
|
161 |
|
| 170 |
<screen>&prompt.user; <userinput>jade -V nochunks \ <co id="examples-co-jade-1-nochunks"> |
162 |
<screen>&prompt.user; <userinput>jade -V nochunks \ <co id="examples-co-jade-1-nochunks"> |
| 171 |
-c /usr/local/share/sgml/docbook/dsssl/modular/catalog \ <co id="examples-co-jade-1-catalog"> |
163 |
-c /usr/local/share/sgml/docbook/dsssl/modular/catalog \ <co id="examples-co-jade-1-catalog"> |
|
Lines 209-215
Link Here
|
| 209 |
</example> |
201 |
</example> |
| 210 |
|
202 |
|
| 211 |
<example> |
203 |
<example> |
| 212 |
<title>Converting DocBook to HTML (several small files)</title> |
204 |
<title>Âà´« DocBook ¬° HTML (³¹¸`¼Ò¦¡)</title> |
| 213 |
|
205 |
|
| 214 |
<screen>&prompt.user; <userinput>jade \ |
206 |
<screen>&prompt.user; <userinput>jade \ |
| 215 |
-c /usr/local/share/sgml/docbook/dsssl/modular/catalog \ <co id="examples-co-jade-2-catalog"> |
207 |
-c /usr/local/share/sgml/docbook/dsssl/modular/catalog \ <co id="examples-co-jade-2-catalog"> |
|
Lines 253-259
Link Here
|
| 253 |
</example> |
245 |
</example> |
| 254 |
|
246 |
|
| 255 |
<example id="examples-docbook-postscript"> |
247 |
<example id="examples-docbook-postscript"> |
| 256 |
<title>Converting DocBook to Postscript</title> |
248 |
<title>Âà´« DocBook ¬° Postscript(PS) ®æ¦¡</title> |
| 257 |
|
249 |
|
| 258 |
<para>The source SGML file must be converted to a &tex; file.</para> |
250 |
<para>The source SGML file must be converted to a &tex; file.</para> |
| 259 |
|
251 |
|
|
Lines 321-327
Link Here
|
| 321 |
</example> |
313 |
</example> |
| 322 |
|
314 |
|
| 323 |
<example> |
315 |
<example> |
| 324 |
<title>Converting DocBook to PDF</title> |
316 |
<title>Âà´« DocBook ¬° PDF ®æ¦¡</title> |
| 325 |
|
317 |
|
| 326 |
<para>The first part of this process is identical to that when |
318 |
<para>The first part of this process is identical to that when |
| 327 |
converting DocBook to Postscript, using the same |
319 |
converting DocBook to Postscript, using the same |