/samples/sample.red

http://txt2tags.googlecode.com/ · Unknown · 182 lines · 119 code · 63 blank · 0 comment · 0 complexity · 11919bab6f7e5c5bd2b1aa9df1b8de79 MD5 · raw file

  1. h1. TXT2TAGS SAMPLE
  2. Author: Aurelio Jargas
  3. Date: 02/28/2011
  4. h1. 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. <pre>
  11. line1: document title
  12. line2: author name, email
  13. line3: date, version
  14. </pre>
  15. Lines with balanced equal signs = around are titles.
  16. h1. 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. h2. 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. h2. Pre-Formatted Text
  30. We can put a code sample or other pre-formatted text:
  31. <pre>
  32. here is pre-formatted
  33. //marks// are **not** ``interpreted``
  34. </pre>
  35. And also, it's easy to put a one line pre-formatted
  36. text:
  37. <pre>
  38. prompt$ ls /etc
  39. </pre>
  40. Or use @pre-formatted@ inside sentences.
  41. h2. More Cosmetics
  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. bq. A TAB in front of the line does a quotation.
  52. bq. More TABs, more depth (if allowed).
  53. Nice.
  54. h1. Lists
  55. A list of items is natural, just putting a *dash* or
  56. a *plus* at the beginning of the line.
  57. h2. Plain List
  58. The dash is the default list identifier. For sublists,
  59. just add *spaces* at the beginning of the line. More
  60. spaces, more sublists.
  61. * Earth
  62. ** America
  63. *** South America
  64. **** Brazil
  65. ***** How deep can I go?
  66. ** Europe
  67. *** Lots of countries
  68. * Mars
  69. ** Who knows?
  70. The list ends with *two* consecutive blank lines.
  71. h2. Numbered List
  72. The same rules as the plain list, just a different
  73. identifier (plus).
  74. # one
  75. # two
  76. # three
  77. ** mixed lists!
  78. ** what a mess
  79. ### counting again
  80. ### ...
  81. # four
  82. h2. Definition List
  83. The definition list identifier is a colon, followed by
  84. the term. The term contents is placed on the next line.
  85. * orange
  86. a yellow fruit
  87. * apple
  88. a green or red fruit
  89. * other fruits
  90. ** wee!
  91. ** mixing lists
  92. ### again!
  93. ### and again!
  94. h1. Tables
  95. Use pipes to compose table rows and cells.
  96. Double pipe at the line beginning starts a heading row.
  97. Natural spaces specify each cell alignment.
  98. |_.heading 1|_.heading 2|_.heading 3|
  99. |. cell 1.1|. cell 1.2|. cell 1.3|
  100. |. cell 2.1|. cell 2.2|. cell 2.3|
  101. Without the last pipe, no border:
  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. h1. Special Entities
  106. Because things were too simple.
  107. h2. Images
  108. The image mark is as simple as it can be: @[filename]@.
  109. !=img/photo.jpg!
  110. * The filename must end in PNG, JPG, GIF, or similar.
  111. * No spaces inside the brackets!
  112. h2. Other
  113. The handy @%%date@ macro expands to the current date.
  114. So today is 20110602 on the ISO @YYYYMMDD@ format.
  115. You can also specify the date format with the %? flags,
  116. as @%%date(%m-%d-%Y)@ which gives: 06-02-2011.
  117. That's all for now.
  118. ---
  119. !img/t2tpowered.png! ("sample.t2t":sample.t2t)