/samples/sample.xhtmls

http://txt2tags.googlecode.com/ · Unknown · 461 lines · 407 code · 54 blank · 0 comment · 0 complexity · 9f78b2486a67552483f85c3b7c51dc37 MD5 · raw file

  1. <?xml version="1.0"
  2. encoding="UTF-8"
  3. ?>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  5. <html xmlns="http://www.w3.org/1999/xhtml">
  6. <head>
  7. <title>TXT2TAGS SAMPLE</title>
  8. <meta name="generator" content="http://txt2tags.org" />
  9. <style type="text/css">body {background-color:#FFFFFF ; color:#000000}</style>
  10. </head>
  11. <body>
  12. <div style="text-align:center">
  13. <h1>TXT2TAGS SAMPLE</h1>
  14. <h2>Aurelio Jargas</h2>
  15. <h3>04/08/2012</h3>
  16. </div>
  17. <p>
  18. This text is before the introduction.
  19. </p>
  20. <p>
  21. But it's OK.
  22. </p>
  23. <h1>Introduction</h1>
  24. <p>
  25. Welcome to the txt2tags sample file.
  26. </p>
  27. <p>
  28. Here you have examples and a brief explanation of all
  29. marks.
  30. </p>
  31. <p>
  32. The first 3 lines of the this file are used as headers,
  33. on the following format:
  34. </p>
  35. <pre>
  36. line1: document title
  37. line2: author name, email
  38. line3: date, version
  39. </pre>
  40. <p>
  41. Lines with balanced equal signs = around are titles.
  42. </p>
  43. <h1>Fonts and Beautifiers</h1>
  44. <p>
  45. We have two sets of fonts:
  46. </p>
  47. <p>
  48. The NORMAL type that can be improved with beautifiers.
  49. </p>
  50. <p>
  51. The TYPEWRITER type that uses monospaced font for
  52. pre-formatted text.
  53. </p>
  54. <p>
  55. We will now enter on a subtitle...
  56. </p>
  57. <h2>Beautifiers</h2>
  58. <p>
  59. The text marks for beautifiers are simple, just as you
  60. type on a plain text email message.
  61. </p>
  62. <p>
  63. We use double *, /, - and _ to represent <strong>bold</strong>,
  64. <em>italic</em>, <span style="text-decoration:line-through">strike</span> and <span style="text-decoration:underline">underline</span>.
  65. </p>
  66. <p>
  67. The <strong><em>bold italic</em></strong> style is also supported as a
  68. combination.
  69. </p>
  70. <h2>Pre-Formatted Text</h2>
  71. <p>
  72. We can put a code sample or other pre-formatted text:
  73. </p>
  74. <pre>
  75. here is pre-formatted
  76. //marks// are **not** ``interpreted``
  77. </pre>
  78. <p>
  79. And also, it's easy to put a one line pre-formatted
  80. text:
  81. </p>
  82. <pre>
  83. prompt$ ls /etc
  84. </pre>
  85. <p>
  86. Or use <code>pre-formatted</code> inside sentences.
  87. </p>
  88. <h2>More Cosmetics</h2>
  89. <p>
  90. Special entities like email (<a href="mailto:duh@somewhere.com">duh@somewhere.com</a>) and
  91. URL (<a href="http://www.duh.com">http://www.duh.com</a>) are detected automagically,
  92. as long as the horizontal line:
  93. </p>
  94. <hr class="light" />
  95. <p>
  96. ^ thin or large v
  97. </p>
  98. <hr class="heavy" />
  99. <p>
  100. You can also specify an <a href="http://duh.org">explicit link</a>
  101. or an <a href="mailto:duh@somewhere.com">explicit email</a> with label.
  102. </p>
  103. <p>
  104. And remember,
  105. </p>
  106. <blockquote>
  107. A TAB in front of the line does a quotation.
  108. <blockquote>
  109. More TABs, more depth (if allowed).
  110. </blockquote>
  111. </blockquote>
  112. <p>
  113. Nice.
  114. </p>
  115. <h1>Lists</h1>
  116. <p>
  117. A list of items is natural, just putting a <strong>dash</strong> or
  118. a <strong>plus</strong> at the beginning of the line.
  119. </p>
  120. <h2>Plain List</h2>
  121. <p>
  122. The dash is the default list identifier. For sublists,
  123. just add <strong>spaces</strong> at the beginning of the line. More
  124. spaces, more sublists.
  125. </p>
  126. <ul>
  127. <li>Earth
  128. <ul>
  129. <li>America
  130. <ul>
  131. <li>South America
  132. <ul>
  133. <li>Brazil
  134. <ul>
  135. <li>How deep can I go?
  136. </li>
  137. </ul>
  138. </li>
  139. </ul>
  140. </li>
  141. </ul>
  142. </li>
  143. <li>Europe
  144. <ul>
  145. <li>Lots of countries
  146. </li>
  147. </ul>
  148. </li>
  149. </ul>
  150. </li>
  151. <li>Mars
  152. <ul>
  153. <li>Who knows?
  154. </li>
  155. </ul>
  156. </li>
  157. </ul>
  158. <p>
  159. The list ends with <strong>two</strong> consecutive blank lines.
  160. </p>
  161. <h2>Numbered List</h2>
  162. <p>
  163. The same rules as the plain list, just a different
  164. identifier (plus).
  165. </p>
  166. <ol>
  167. <li>one
  168. </li>
  169. <li>two
  170. </li>
  171. <li>three
  172. <ul>
  173. <li>mixed lists!
  174. </li>
  175. <li>what a mess
  176. <ol>
  177. <li>counting again
  178. </li>
  179. <li>...
  180. </li>
  181. </ol>
  182. </li>
  183. </ul>
  184. </li>
  185. <li>four
  186. </li>
  187. </ol>
  188. <h2>Definition List</h2>
  189. <p>
  190. The definition list identifier is a colon, followed by
  191. the term. The term contents is placed on the next line.
  192. </p>
  193. <dl>
  194. <dt>orange</dt><dd>
  195. a yellow fruit
  196. </dd>
  197. <dt>apple</dt><dd>
  198. a green or red fruit
  199. </dd>
  200. <dt>other fruits</dt><dd>
  201. <ul>
  202. <li>wee!
  203. </li>
  204. <li>mixing lists
  205. <ol>
  206. <li>again!
  207. </li>
  208. <li>and again!
  209. </li>
  210. </ol>
  211. </li>
  212. </ul>
  213. </dd>
  214. </dl>
  215. <h1>Tables</h1>
  216. <p>
  217. Use pipes to compose table rows and cells.
  218. Double pipe at the line beginning starts a heading row.
  219. Natural spaces specify each cell alignment.
  220. </p>
  221. <table style="text-align:center" border="1" cellpadding="4">
  222. <tr>
  223. <td>cell 1.1</td>
  224. <td style="text-align:center">cell 1.2</td>
  225. <td style="text-align:right">cell 1.3</td>
  226. </tr>
  227. <tr>
  228. <td>cell 2.1</td>
  229. <td style="text-align:center">cell 2.2</td>
  230. <td style="text-align:right">cell 2.3</td>
  231. </tr>
  232. <tr>
  233. <td>cell 3.1</td>
  234. <td style="text-align:center">cell 3.2</td>
  235. <td style="text-align:right">cell 3.3</td>
  236. </tr>
  237. </table>
  238. <table border="1" cellpadding="4">
  239. <tr>
  240. <th>heading 1</th>
  241. <th>heading 2</th>
  242. <th>heading 3</th>
  243. </tr>
  244. <tr>
  245. <td>cell 1.1</td>
  246. <td style="text-align:center">cell 1.2</td>
  247. <td style="text-align:right">cell 1.3</td>
  248. </tr>
  249. <tr>
  250. <td>cell 2.1</td>
  251. <td style="text-align:center">cell 2.2</td>
  252. <td style="text-align:right">cell 2.3</td>
  253. </tr>
  254. </table>
  255. <table style="text-align:center" border="1" cellpadding="4">
  256. <tr>
  257. <th>heading 1</th>
  258. <td style="text-align:center">cell 1.1</td>
  259. <td style="text-align:right">cell 1.2</td>
  260. </tr>
  261. <tr>
  262. <th>heading 2</th>
  263. <td style="text-align:center">cell 2.1</td>
  264. <td style="text-align:right">cell 2.2</td>
  265. </tr>
  266. <tr>
  267. <th>heading 3</th>
  268. <td style="text-align:center">cell 3.1</td>
  269. <td style="text-align:right">cell 3.2</td>
  270. </tr>
  271. </table>
  272. <table border="1" cellpadding="4">
  273. <tr>
  274. <th>heading</th>
  275. <th>heading 1</th>
  276. <th>heading 2</th>
  277. </tr>
  278. <tr>
  279. <th>heading 1</th>
  280. <td style="text-align:center">cell 1.1</td>
  281. <td style="text-align:right">cell 1.2</td>
  282. </tr>
  283. <tr>
  284. <th>heading 2</th>
  285. <td style="text-align:center">cell 2.1</td>
  286. <td style="text-align:right">cell 2.2</td>
  287. </tr>
  288. </table>
  289. <p>
  290. Without the last pipe, no border:
  291. </p>
  292. <table style="text-align:center" cellpadding="4">
  293. <tr>
  294. <td>cell 1.1</td>
  295. <td style="text-align:center">cell 1.2</td>
  296. <td style="text-align:right">cell 1.3</td>
  297. </tr>
  298. <tr>
  299. <td>cell 2.1</td>
  300. <td style="text-align:center">cell 2.2</td>
  301. <td style="text-align:right">cell 2.3</td>
  302. </tr>
  303. <tr>
  304. <td>cell 3.1</td>
  305. <td style="text-align:center">cell 3.2</td>
  306. <td style="text-align:right">cell 3.3</td>
  307. </tr>
  308. </table>
  309. <table cellpadding="4">
  310. <tr>
  311. <th>heading 1</th>
  312. <th>heading 2</th>
  313. <th>heading 3</th>
  314. </tr>
  315. <tr>
  316. <td>cell 1.1</td>
  317. <td style="text-align:center">cell 1.2</td>
  318. <td style="text-align:right">cell 1.3</td>
  319. </tr>
  320. <tr>
  321. <td>cell 2.1</td>
  322. <td style="text-align:center">cell 2.2</td>
  323. <td style="text-align:right">cell 2.3</td>
  324. </tr>
  325. </table>
  326. <table style="text-align:center" cellpadding="4">
  327. <tr>
  328. <th>heading 1</th>
  329. <td style="text-align:center">cell 1.1</td>
  330. <td style="text-align:right">cell 1.2</td>
  331. </tr>
  332. <tr>
  333. <th>heading 2</th>
  334. <td style="text-align:center">cell 2.1</td>
  335. <td style="text-align:right">cell 2.2</td>
  336. </tr>
  337. <tr>
  338. <th>heading 3</th>
  339. <td style="text-align:center">cell 3.1</td>
  340. <td style="text-align:right">cell 3.2</td>
  341. </tr>
  342. </table>
  343. <table cellpadding="4">
  344. <tr>
  345. <th>heading</th>
  346. <th>heading 1</th>
  347. <th>heading 2</th>
  348. </tr>
  349. <tr>
  350. <th>heading 1</th>
  351. <td style="text-align:center">cell 1.1</td>
  352. <td style="text-align:right">cell 1.2</td>
  353. </tr>
  354. <tr>
  355. <th>heading 2</th>
  356. <td style="text-align:center">cell 2.1</td>
  357. <td style="text-align:right">cell 2.2</td>
  358. </tr>
  359. </table>
  360. <h1>Special Entities</h1>
  361. <p>
  362. Because things were too simple.
  363. </p>
  364. <h2>Images</h2>
  365. <p>
  366. The image mark is as simple as it can be: <code>[filename]</code>.
  367. </p>
  368. <p>
  369. <img style="text-align:center" src="img/photo.jpg" alt=""/>
  370. </p>
  371. <p>
  372. And with some targets the image is linkable :
  373. </p>
  374. <p>
  375. <a href="http://www.txt2tags.org"><img style="text-align:center" src="img/photo.jpg" alt=""/></a>
  376. </p>
  377. <ul>
  378. <li>The filename must end in PNG, JPG, GIF, or similar.
  379. </li>
  380. <li>No spaces inside the brackets!
  381. </li>
  382. </ul>
  383. <h2>Other</h2>
  384. <p>
  385. When the target needs, special chars like &lt;, &gt; and &amp;
  386. are escaped.
  387. </p>
  388. <p>
  389. The handy <code>%%date</code> macro expands to the current date.
  390. </p>
  391. <p>
  392. So today is 20120408 on the ISO <code>YYYYMMDD</code> format.
  393. </p>
  394. <p>
  395. You can also specify the date format with the %? flags,
  396. as <code>%%date(%m-%d-%Y)</code> which gives: 04-08-2012.
  397. </p>
  398. <p>
  399. That's all for now.
  400. </p>
  401. <hr class="light" />
  402. <p>
  403. <img style="text-align:left" src="img/t2tpowered.png" alt=""/> (<a href="sample.t2t">sample.t2t</a>)
  404. </p>
  405. <!-- xhtmls code generated by txt2tags 2.6.880 (http://txt2tags.org) -->
  406. <!-- cmdline: txt2tags -t xhtmls sample.t2t -->
  407. </body></html>