PageRenderTime 117ms CodeModel.GetById 108ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

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