/samples/sample.dbk

http://txt2tags.googlecode.com/ · Unknown · 322 lines · 317 code · 5 blank · 0 comment · 0 complexity · 4fb3e51daaf0cd6df66523f6f62474a3 MD5 · raw file

  1. <?xml version="1.0"
  2. encoding="UTF-8"
  3. ?>
  4. <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "docbook/dtd/xml/4.5/docbookx.dtd">
  5. <article lang="en">
  6. <articleinfo>
  7. <title>TXT2TAGS SAMPLE</title>
  8. <authorgroup>
  9. <author><othername>Aurelio Jargas</othername></author>
  10. </authorgroup>
  11. <date>06/13/2012</date>
  12. </articleinfo>
  13. <para>
  14. This text is before the introduction.
  15. </para>
  16. <para>
  17. But it's OK.
  18. </para>
  19. <sect1><title>Introduction</title>
  20. <para>
  21. Welcome to the txt2tags sample file.
  22. </para>
  23. <para>
  24. Here you have examples and a brief explanation of all
  25. marks.
  26. </para>
  27. <para>
  28. The first 3 lines of the this file are used as headers,
  29. on the following format:
  30. </para>
  31. <programlisting>
  32. line1: document title
  33. line2: author name, email
  34. line3: date, version
  35. </programlisting>
  36. <para>
  37. Lines with balanced equal signs = around are titles.
  38. </para>
  39. </sect1>
  40. <sect1><title>Fonts and Beautifiers</title>
  41. <para>
  42. We have two sets of fonts:
  43. </para>
  44. <para>
  45. The NORMAL type that can be improved with beautifiers.
  46. </para>
  47. <para>
  48. The TYPEWRITER type that uses monospaced font for
  49. pre-formatted text.
  50. </para>
  51. <para>
  52. We will now enter on a subtitle...
  53. </para>
  54. <sect2><title>Beautifiers</title>
  55. <para>
  56. The text marks for beautifiers are simple, just as you
  57. type on a plain text email message.
  58. </para>
  59. <para>
  60. We use double *, /, - and _ to represent <emphasis role="bold">bold</emphasis>,
  61. <emphasis>italic</emphasis>, strike and <emphasis role="underline">underline</emphasis>.
  62. </para>
  63. <para>
  64. The <emphasis role="bold"><emphasis>bold italic</emphasis></emphasis> style is also supported as a
  65. combination.
  66. </para>
  67. </sect2>
  68. <sect2><title>Pre-Formatted Text</title>
  69. <para>
  70. We can put a code sample or other pre-formatted text:
  71. </para>
  72. <programlisting>
  73. here is pre-formatted
  74. //marks// are **not** ``interpreted``
  75. </programlisting>
  76. <para>
  77. And also, it's easy to put a one line pre-formatted
  78. text:
  79. </para>
  80. <programlisting>
  81. prompt$ ls /etc
  82. </programlisting>
  83. <para>
  84. Or use <code>pre-formatted</code> inside sentences.
  85. </para>
  86. </sect2>
  87. <sect2><title>More Cosmetics</title>
  88. <para>
  89. Special entities like email (<email>duh@somewhere.com</email>) and
  90. URL (<ulink url="http://www.duh.com">http://www.duh.com</ulink>) are detected automagically,
  91. as long as the horizontal line:
  92. </para>
  93. <para>
  94. ^ thin or large v
  95. </para>
  96. <para>
  97. You can also specify an <ulink url="http://duh.org">explicit link</ulink>
  98. or an <email>duh@somewhere.com</email> with label.
  99. </para>
  100. <para>
  101. And remember,
  102. </para>
  103. <blockquote><para>
  104. A TAB in front of the line does a quotation.
  105. <blockquote><para>
  106. More TABs, more depth (if allowed).
  107. </para></blockquote>
  108. </para></blockquote>
  109. <para>
  110. Nice.
  111. </para>
  112. </sect2>
  113. </sect1>
  114. <sect1><title>Lists</title>
  115. <para>
  116. A list of items is natural, just putting a <emphasis role="bold">dash</emphasis> or
  117. a <emphasis role="bold">plus</emphasis> at the beginning of the line.
  118. </para>
  119. <sect2><title>Plain List</title>
  120. <para>
  121. The dash is the default list identifier. For sublists,
  122. just add <emphasis role="bold">spaces</emphasis> at the beginning of the line. More
  123. spaces, more sublists.
  124. </para>
  125. <itemizedlist>
  126. <listitem><para>Earth
  127. <itemizedlist>
  128. <listitem><para>America
  129. <itemizedlist>
  130. <listitem><para>South America
  131. <itemizedlist>
  132. <listitem><para>Brazil
  133. <itemizedlist>
  134. <listitem><para>How deep can I go?
  135. </para></listitem>
  136. </itemizedlist>
  137. </para></listitem>
  138. </itemizedlist>
  139. </para></listitem>
  140. </itemizedlist>
  141. </para></listitem>
  142. <listitem><para>Europe
  143. <itemizedlist>
  144. <listitem><para>Lots of countries
  145. </para></listitem>
  146. </itemizedlist>
  147. </para></listitem>
  148. </itemizedlist>
  149. </para></listitem>
  150. <listitem><para>Mars
  151. <itemizedlist>
  152. <listitem><para>Who knows?
  153. </para></listitem>
  154. </itemizedlist>
  155. </para></listitem>
  156. </itemizedlist>
  157. <para>
  158. The list ends with <emphasis role="bold">two</emphasis> consecutive blank lines.
  159. </para>
  160. </sect2>
  161. <sect2><title>Numbered List</title>
  162. <para>
  163. The same rules as the plain list, just a different
  164. identifier (plus).
  165. </para>
  166. <orderedlist numeration="arabic">
  167. <listitem><para>one
  168. </para></listitem>
  169. <listitem><para>two
  170. </para></listitem>
  171. <listitem><para>three
  172. <itemizedlist>
  173. <listitem><para>mixed lists!
  174. </para></listitem>
  175. <listitem><para>what a mess
  176. <orderedlist numeration="arabic">
  177. <listitem><para>counting again
  178. </para></listitem>
  179. <listitem><para>...
  180. </para></listitem>
  181. </orderedlist>
  182. </para></listitem>
  183. </itemizedlist>
  184. </para></listitem>
  185. <listitem><para>four
  186. </para></listitem>
  187. </orderedlist>
  188. </sect2>
  189. <sect2><title>Definition List</title>
  190. <para>
  191. The definition list identifier is a colon, followed by
  192. the term. The term contents is placed on the next line.
  193. </para>
  194. <variablelist>
  195. <varlistentry><term>orange</term><listitem><para>
  196. a yellow fruit
  197. </para></listitem></varlistentry>
  198. <varlistentry><term>apple</term><listitem><para>
  199. a green or red fruit
  200. </para></listitem></varlistentry>
  201. <varlistentry><term>other fruits</term><listitem><para>
  202. <itemizedlist>
  203. <listitem><para>wee!
  204. </para></listitem>
  205. <listitem><para>mixing lists
  206. <orderedlist numeration="arabic">
  207. <listitem><para>again!
  208. </para></listitem>
  209. <listitem><para>and again!
  210. </para></listitem>
  211. </orderedlist>
  212. </para></listitem>
  213. </itemizedlist>
  214. </para></listitem></varlistentry>
  215. </variablelist>
  216. </sect2>
  217. </sect1>
  218. <sect1><title>Tables</title>
  219. <para>
  220. Use pipes to compose table rows and cells.
  221. Double pipe at the line beginning starts a heading row.
  222. Natural spaces specify each cell alignment.
  223. </para>
  224. <informaltable><tgroup cols="3"><tbody>
  225. <row><entry>cell 1.1 </entry><entry> cell 1.2 </entry><entry> cell 1.3</entry></row>
  226. <row><entry>cell 2.1 </entry><entry> cell 2.2 </entry><entry> cell 2.3</entry></row>
  227. <row><entry>cell 3.1 </entry><entry> cell 3.2 </entry><entry> cell 3.3</entry></row>
  228. </tbody></tgroup></informaltable>
  229. <informaltable><tgroup cols="3"><tbody>
  230. <thead><entry>heading 1</entry><entry> heading 2 </entry><entry> heading 3</entry></thead>
  231. <row><entry>cell 1.1 </entry><entry> cell 1.2 </entry><entry> cell 1.3</entry></row>
  232. <row><entry>cell 2.1 </entry><entry> cell 2.2 </entry><entry> cell 2.3</entry></row>
  233. </tbody></tgroup></informaltable>
  234. <informaltable><tgroup cols="3"><tbody>
  235. <row>heading 1<entry> cell 1.1 </entry><entry> cell 1.2</entry></row>
  236. <row>heading 2<entry> cell 2.1 </entry><entry> cell 2.2</entry></row>
  237. <row>heading 3<entry> cell 3.1 </entry><entry> cell 3.2</entry></row>
  238. </tbody></tgroup></informaltable>
  239. <informaltable><tgroup cols="3"><tbody>
  240. <thead>heading <entry> heading 1 </entry><entry> heading 2</entry></thead>
  241. <row>heading 1<entry> cell 1.1 </entry><entry> cell 1.2</entry></row>
  242. <row>heading 2<entry> cell 2.1 </entry><entry> cell 2.2</entry></row>
  243. </tbody></tgroup></informaltable>
  244. <para>
  245. Without the last pipe, no border:
  246. </para>
  247. <informaltable><tgroup cols="3"><tbody>
  248. <row><entry>cell 1.1 </entry><entry> cell 1.2 </entry><entry> cell 1.3</entry></row>
  249. <row><entry>cell 2.1 </entry><entry> cell 2.2 </entry><entry> cell 2.3</entry></row>
  250. <row><entry>cell 3.1 </entry><entry> cell 3.2 </entry><entry> cell 3.3</entry></row>
  251. </tbody></tgroup></informaltable>
  252. <informaltable><tgroup cols="3"><tbody>
  253. <thead><entry>heading 1</entry><entry> heading 2 </entry><entry> heading 3</entry></thead>
  254. <row><entry>cell 1.1 </entry><entry> cell 1.2 </entry><entry> cell 1.3</entry></row>
  255. <row><entry>cell 2.1 </entry><entry> cell 2.2 </entry><entry> cell 2.3</entry></row>
  256. </tbody></tgroup></informaltable>
  257. <informaltable><tgroup cols="3"><tbody>
  258. <row>heading 1<entry> cell 1.1 </entry><entry> cell 1.2</entry></row>
  259. <row>heading 2<entry> cell 2.1 </entry><entry> cell 2.2</entry></row>
  260. <row>heading 3<entry> cell 3.1 </entry><entry> cell 3.2</entry></row>
  261. </tbody></tgroup></informaltable>
  262. <informaltable><tgroup cols="3"><tbody>
  263. <thead>heading <entry> heading 1 </entry><entry> heading 2</entry></thead>
  264. <row>heading 1<entry> cell 1.1 </entry><entry> cell 1.2</entry></row>
  265. <row>heading 2<entry> cell 2.1 </entry><entry> cell 2.2</entry></row>
  266. </tbody></tgroup></informaltable>
  267. </sect1>
  268. <sect1><title>Special Entities</title>
  269. <para>
  270. Because things were too simple.
  271. </para>
  272. <sect2><title>Images</title>
  273. <para>
  274. The image mark is as simple as it can be: <code>[filename]</code>.
  275. </para>
  276. <para>
  277. <mediaobject><imageobject><imagedata fileref="img/photo.jpg"/></imageobject></mediaobject>
  278. </para>
  279. <para>
  280. And with some targets the image is linkable :
  281. </para>
  282. <para>
  283. <ulink url="http://www.txt2tags.org"><mediaobject><imageobject><imagedata fileref="img/photo.jpg"/></imageobject></mediaobject></ulink>
  284. </para>
  285. <itemizedlist>
  286. <listitem><para>The filename must end in PNG, JPG, GIF, or similar.
  287. </para></listitem>
  288. <listitem><para>No spaces inside the brackets!
  289. </para></listitem>
  290. </itemizedlist>
  291. </sect2>
  292. <sect2><title>Other</title>
  293. <para>
  294. When the target needs, special chars like &lt;, &gt; and &amp;
  295. are escaped.
  296. </para>
  297. <para>
  298. The handy <code>%%date</code> macro expands to the current date.
  299. </para>
  300. <para>
  301. So today is 20120613 on the ISO <code>YYYYMMDD</code> format.
  302. </para>
  303. <para>
  304. You can also specify the date format with the %? flags,
  305. as <code>%%date(%m-%d-%Y)</code> which gives: 06-13-2012.
  306. </para>
  307. <para>
  308. That's all for now.
  309. </para>
  310. <para>
  311. <mediaobject><imageobject><imagedata fileref="img/t2tpowered.png"/></imageobject></mediaobject> (<ulink url="sample.t2t">sample.t2t</ulink>)
  312. </para>
  313. </sect2>
  314. </sect1>
  315. <!-- dbk code generated by txt2tags 2.6.958 (http://txt2tags.org) -->
  316. <!-- cmdline: txt2tags -t dbk sample.t2t -->
  317. </article>