PageRenderTime 19ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/test/art/toc-macro.t2t

http://txt2tags.googlecode.com/
Unknown | 182 lines | 117 code | 65 blank | 0 comment | 0 complexity | bd1d77baf61cc9ff8479f9ae0a653674 MD5 | raw file
Possible License(s): GPL-2.0, GPL-3.0, WTFPL
  1. TXT2TAGS SAMPLE for Ascii Art Text
  2. Aurelio Jargas
  3. 2010-10-10
  4. %!encoding: utf-8
  5. = My Own TOC =
  6. %%TOC
  7. = Introduction =
  8. Welcome to the txt2tags sample file.
  9. Here you have examples and a brief explanation of all
  10. marks.
  11. The first 3 lines of the this file are used as headers,
  12. on the following format:
  13. ```
  14. line1: document title
  15. line2: author name, email
  16. line3: date, version
  17. ```
  18. Lines with balanced equal signs = around are titles.
  19. % a secret comment!
  20. %TODO link to program site http://txt2tags.org
  21. = Fonts and Beautifiers =
  22. We have two sets of fonts:
  23. The NORMAL type that can be improved with beautifiers.
  24. The TYPEWRITER type that uses monospaced font for
  25. pre-formatted text.
  26. We will now enter on a subtitle...
  27. == Beautifiers ==
  28. The text marks for beautifiers are simple, just as you
  29. type on a plain text email message.
  30. We use double *, /, - and _ to represent **bold**,
  31. //italic//, --strike-- and __underline__.
  32. The **//bold italic//** style is also supported as a
  33. combination.
  34. == Pre-Formatted Text ==
  35. We can put a code sample or other pre-formatted text:
  36. ```
  37. here is pre-formatted
  38. //marks// are **not** ``interpreted``
  39. ```
  40. And also, it's easy to put a one line pre-formatted
  41. text:
  42. ``` prompt$ ls /etc
  43. Or use ``pre-formatted`` inside sentences.
  44. == More Cosmetics ==
  45. Special entities like email (duh@somewhere.com) and
  46. URL (http://www.duh.com) are detected automagically,
  47. as long as the horizontal line:
  48. --------------------------------------------------------
  49. ^ thin or large v
  50. ========================================================
  51. You can also specify an [explicit link http://duh.org]
  52. with label.
  53. And remember,
  54. A TAB in front of the line does a quotation.
  55. More TABs, more depth (if allowed).
  56. Nice.
  57. = Lists =
  58. A list of items is natural, just putting a **dash** or
  59. a **plus** at the beginning of the line.
  60. == Plain List ==
  61. The dash is the default list identifier. For sublists,
  62. just add **spaces** at the beginning of the line. More
  63. spaces, more sublists.
  64. - earth
  65. - america
  66. - south america
  67. - brazil
  68. - how deep can i go?
  69. - europe
  70. - lots of countries
  71. - mars
  72. - who knows?
  73. The list ends with **two** consecutive blank lines.
  74. == Numbered List ==
  75. The same rules as the plain list, just a different
  76. identifier (plus).
  77. + one
  78. + two
  79. + three
  80. - mixed lists!
  81. - what a mess
  82. + counting again
  83. + ...
  84. + four
  85. == Definition List ==
  86. The definition list identifier is a colon, followed by
  87. the term. The term contents is placed on the next line.
  88. : orange
  89. a yellow fruit
  90. : apple
  91. a green or red fruit
  92. : other fruits
  93. - wee!
  94. - mixing lists
  95. + again!
  96. + and again!
  97. = Tables =
  98. Use pipes to compose table rows and cells.
  99. Double pipe at the line beginning starts a heading row.
  100. Natural spaces specify each cell alignment.
  101. || heading 1 | heading 2 | heading 3 |
  102. | cell 1.1 | cell 1.2 | cell 1.3 |
  103. | cell 2.1 | cell 2.2 | cell 2.3 |
  104. Without the last pipe, no border:
  105. || heading 1 | heading 2 | heading 3
  106. | cell 1.1 | cell 1.2 | cell 1.3
  107. | cell 2.1 | cell 2.2 | cell 2.3
  108. = Special Entities =
  109. Because things were too simple.
  110. == Images ==
  111. The image mark is as simple as it can be: ``[filename]``.
  112. [img/photo.jpg]
  113. - The filename must end in PNG, JPG, GIF, or similar.
  114. - No spaces inside the brackets!
  115. == Other ==
  116. The handy ``%%date`` macro expands to the current date.
  117. That's all for now.