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