PageRenderTime 22ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/samples/sample.pmw

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