/samples/sample.spip

http://txt2tags.googlecode.com/ · Unknown · 190 lines · 123 code · 67 blank · 0 comment · 0 complexity · be8dc9b5801d54dc9e002e5044f8f76e MD5 · raw file

  1. {{{TXT2TAGS SAMPLE}}}
  2. {{Aurelio Jargas}}
  3. {02/28/2011}
  4. {{{ Introduction }}}
  5. Welcome to the txt2tags sample file.
  6. Here you have examples and a brief explanation of all
  7. marks.
  8. The first 3 lines of the this file are used as headers,
  9. on the following format:
  10. <cadre>
  11. line1: document title
  12. line2: author name, email
  13. line3: date, version
  14. </cadre>
  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. <h4>Beautifiers</h4>
  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}, <del>strike</del> and <u>underline</u>.
  27. The {{{bold italic}}} style is also supported as a
  28. combination.
  29. <h4>Pre-Formatted Text</h4>
  30. We can put a code sample or other pre-formatted text:
  31. <cadre>
  32. here is pre-formatted
  33. //marks// are **not** ``interpreted``
  34. </cadre>
  35. And also, it's easy to put a one line pre-formatted
  36. text:
  37. <cadre>
  38. prompt$ ls /etc
  39. </cadre>
  40. Or use <code>pre-formatted</code> inside sentences.
  41. <h4>More Cosmetics</h4>
  42. Special entities like email ([->duh@somewhere.com]) and
  43. URL ([->http://www.duh.com]) are detected automagically,
  44. as long as the horizontal line:
  45. ----
  46. ^ thin or large v
  47. ----
  48. You can also specify an [explicit link->http://duh.org]
  49. or an [explicit email->duh@somewhere.com] with label.
  50. And remember,
  51. <quote>
  52. A TAB in front of the line does a quotation.
  53. <quote>
  54. More TABs, more depth (if allowed).
  55. </quote>
  56. </quote>
  57. Nice.
  58. {{{ Lists }}}
  59. A list of items is natural, just putting a {{dash}} or
  60. a {{plus}} at the beginning of the line.
  61. <h4>Plain List</h4>
  62. The dash is the default list identifier. For sublists,
  63. just add {{spaces}} at the beginning of the line. More
  64. spaces, more sublists.
  65. -* Earth
  66. -** America
  67. -*** South America
  68. -**** Brazil
  69. -***** How deep can I go?
  70. -** Europe
  71. -*** Lots of countries
  72. -* Mars
  73. -** Who knows?
  74. The list ends with {{two}} consecutive blank lines.
  75. <h4>Numbered List</h4>
  76. The same rules as the plain list, just a different
  77. identifier (plus).
  78. -#one
  79. -#two
  80. -#three
  81. -** mixed lists!
  82. -** what a mess
  83. -###counting again
  84. -###...
  85. -#four
  86. <h4>Definition List</h4>
  87. The definition list identifier is a colon, followed by
  88. the term. The term contents is placed on the next line.
  89. orange
  90. a yellow fruit
  91. apple
  92. a green or red fruit
  93. other fruits
  94. -** wee!
  95. -** mixing lists
  96. -###again!
  97. -###and again!
  98. {{{ Tables }}}
  99. Use pipes to compose table rows and cells.
  100. Double pipe at the line beginning starts a heading row.
  101. Natural spaces specify each cell alignment.
  102. | {{heading 1}} | {{heading 2}} | {{heading 3}} |
  103. | cell 1.1 | cell 1.2 | cell 1.3 |
  104. | cell 2.1 | cell 2.2 | cell 2.3 |
  105. Without the last pipe, no border:
  106. | {{heading 1}} | {{heading 2}} | {{heading 3}} |
  107. | cell 1.1 | cell 1.2 | cell 1.3 |
  108. | cell 2.1 | cell 2.2 | cell 2.3 |
  109. {{{ Special Entities }}}
  110. Because things were too simple.
  111. <h4>Images</h4>
  112. The image mark is as simple as it can be: <code>[filename]</code>.
  113. <img src="img/photo.jpg" align="center" />
  114. -* The filename must end in PNG, JPG, GIF, or similar.
  115. -* No spaces inside the brackets!
  116. <h4>Other</h4>
  117. The handy <code>%%date</code> macro expands to the current date.
  118. So today is 20110602 on the ISO <code>YYYYMMDD</code> format.
  119. You can also specify the date format with the %? flags,
  120. as <code>%%date(%m-%d-%Y)</code> which gives: 06-02-2011.
  121. That's all for now.
  122. ----
  123. <img src="img/t2tpowered.png" align="left" /> ([sample.t2t->sample.t2t])