/samples/sample.md

http://txt2tags.googlecode.com/ · Markdown · 214 lines · 141 code · 73 blank · 0 comment · 0 complexity · 10dc8c0fa4a7670f2e4456c230fa4872 MD5 · raw file

  1. TXT2TAGS SAMPLE
  2. Aurelio Jargas
  3. 03/19/2013
  4. This text is before the introduction.
  5. But it's OK.
  6. # Introduction
  7. Welcome to the txt2tags sample file.
  8. Here you have examples and a brief explanation of all
  9. marks.
  10. The first 3 lines of this file are used as headers,
  11. on the following format:
  12. line1: document title
  13. line2: author name, email
  14. line3: date, version
  15. Lines with balanced equal signs = around are titles.
  16. # Fonts and Beautifiers
  17. We have two sets of fonts:
  18. The NORMAL type that can be improved with beautifiers.
  19. The TYPEWRITER type that uses monospaced font for
  20. pre-formatted text.
  21. We will now enter on a subtitle...
  22. ## Beautifiers
  23. The text marks for beautifiers are simple, just as you
  24. type on a plain text email message.
  25. We use double *, /, - and _ to represent **bold**,
  26. *italic*, ~~strike~~ and underline.
  27. The ***bold italic*** style is also supported as a
  28. combination.
  29. ## Pre-Formatted Text
  30. We can put a code sample or other pre-formatted text:
  31. here is pre-formatted
  32. //marks// are **not** ``interpreted``
  33. And also, it's easy to put a one line pre-formatted
  34. text:
  35. prompt$ ls /etc
  36. Or use `pre-formatted` inside sentences.
  37. ## More Cosmetics
  38. Special entities like email (duh@somewhere.com) and
  39. URL (http://www.duh.com) are detected automagically,
  40. as long as the horizontal line:
  41. ---
  42. ^ thin or large v
  43. ---
  44. You can also specify an [explicit link](http://duh.org)
  45. or an with label.
  46. And remember,
  47. > A TAB in front of the line does a quotation.
  48. > > More TABs, more depth (if allowed).
  49. Nice.
  50. # Lists
  51. A list of items is natural, just putting a **dash** or
  52. a **plus** at the beginning of the line.
  53. ## Plain List
  54. The dash is the default list identifier. For sublists,
  55. just add **spaces** at the beginning of the line. More
  56. spaces, more sublists.
  57. * Earth
  58. * America
  59. * South America
  60. * Brazil
  61. * How deep can I go?
  62. * Europe
  63. * Lots of countries
  64. * Mars
  65. * Who knows?
  66. The list ends with **two** consecutive blank lines.
  67. ## Numbered List
  68. The same rules as the plain list, just a different
  69. identifier (plus).
  70. 1. one
  71. 1. two
  72. 1. three
  73. * mixed lists!
  74. * what a mess
  75. 1. counting again
  76. 1. ...
  77. 1. four
  78. ## Definition List
  79. The definition list identifier is a colon, followed by
  80. the term. The term contents is placed on the next line.
  81. : orange
  82. a yellow fruit
  83. : apple
  84. a green or red fruit
  85. : other fruits
  86. * wee!
  87. * mixing lists
  88. 1. again!
  89. 1. and again!
  90. # Tables
  91. Use pipes to compose table rows and cells.
  92. Double pipe at the line beginning starts a heading row.
  93. Natural spaces specify each cell alignment.
  94. |cell 1.1 |cell 1.2 |cell 1.3|
  95. |cell 2.1 |cell 2.2 |cell 2.3|
  96. |cell 3.1 |cell 3.2 |cell 3.3|
  97. | heading 1 |heading 2 |heading 3|
  98. |---------------|
  99. |cell 1.1 |cell 1.2 |cell 1.3|
  100. |cell 2.1 |cell 2.2 |cell 2.3|
  101. |heading 1 |cell 1.1 |cell 1.2|
  102. |heading 2 |cell 2.1 |cell 2.2|
  103. |heading 3 |cell 3.1 |cell 3.2|
  104. | heading |heading 1 |heading 2|
  105. |---------------|
  106. |heading 1 |cell 1.1 |cell 1.2|
  107. |heading 2 |cell 2.1 |cell 2.2|
  108. Without the last pipe, no border:
  109. |cell 1.1 |cell 1.2 |cell 1.3|
  110. |cell 2.1 |cell 2.2 |cell 2.3|
  111. |cell 3.1 |cell 3.2 |cell 3.3|
  112. | heading 1 |heading 2 |heading 3|
  113. |---------------|
  114. |cell 1.1 |cell 1.2 |cell 1.3|
  115. |cell 2.1 |cell 2.2 |cell 2.3|
  116. |heading 1 |cell 1.1 |cell 1.2|
  117. |heading 2 |cell 2.1 |cell 2.2|
  118. |heading 3 |cell 3.1 |cell 3.2|
  119. | heading |heading 1 |heading 2|
  120. |---------------|
  121. |heading 1 |cell 1.1 |cell 1.2|
  122. |heading 2 |cell 2.1 |cell 2.2|
  123. # Special Entities
  124. Because things were too simple.
  125. ## Images
  126. The image mark is as simple as it can be: `[filename]`.
  127. ![](img/photo.jpg)
  128. And with some targets the image is linkable :
  129. [![](img/photo.jpg)](http://www.txt2tags.org)
  130. * The filename must end in PNG, JPG, GIF, or similar.
  131. * No spaces inside the brackets!
  132. ## Other
  133. When the target needs, special chars like <, > and &
  134. are escaped.
  135. The handy `%%date` macro expands to the current date.
  136. So today is 20140819 on the ISO `YYYYMMDD` format.
  137. You can also specify the date format with the %? flags,
  138. as `%%date(%m-%d-%Y)` which gives: 08-19-2014.
  139. That's all for now.
  140. ---
  141. ![](img/t2tpowered.png) ([sample.t2t](sample.t2t))