PageRenderTime 5ms CodeModel.GetById 2ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/samples/sample.adoc

http://txt2tags.googlecode.com/
AsciiDoc | 232 lines | 156 code | 76 blank | 0 comment | 0 complexity | 5098d59a125f23c66070483369a7c2d3 MD5 | raw file
  1= TXT2TAGS SAMPLE
  2Aurelio Jargas
  302/12/2013
  4
  5
  6This text is before the introduction.
  7
  8But it's OK.
  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
 20----
 21line1: document title
 22line2: author name, email
 23line3: date, version
 24----
 25
 26Lines with balanced equal signs = around are titles.
 27
 28== Fonts and Beautifiers
 29
 30We have two sets of fonts:
 31
 32The NORMAL type that can be improved with beautifiers.
 33
 34The TYPEWRITER type that uses monospaced font for
 35pre-formatted text.
 36
 37We will now enter on a subtitle...
 38
 39=== Beautifiers
 40
 41The text marks for beautifiers are simple, just as you
 42type on a plain text email message.
 43
 44We use double *, /, - and _ to represent *bold*,
 45_italic_, strike and underline.
 46
 47The *_bold italic_* style is also supported as a
 48combination.
 49
 50=== Pre-Formatted Text
 51
 52We can put a code sample or other pre-formatted text:
 53
 54----
 55  here    is     pre-formatted
 56//marks// are  **not**  ``interpreted``
 57----
 58
 59And also, it's easy to put a one line pre-formatted
 60text:
 61
 62----
 63prompt$ ls /etc
 64----
 65
 66Or use +pre-formatted+ inside sentences.
 67
 68=== More Cosmetics
 69
 70Special entities like email (mailto:duh@somewhere.com) and
 71URL (http://www.duh.com) are detected automagically,
 72as long as the horizontal line:
 73
 74
 75
 76^ thin or large v
 77
 78
 79
 80You can also specify an http://duh.org[explicit link]
 81or an mailto:duh@somewhere.com[explicit email] with label.
 82
 83And remember,
 84
 85A TAB in front of the line does a quotation.
 86More TABs, more depth (if allowed).
 87
 88Nice.
 89
 90== Lists
 91
 92A list of items is natural, just putting a *dash* or
 93a *plus* at the beginning of the line.
 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
111The list ends with *two* consecutive blank lines.
112
113=== Numbered List
114
115The same rules as the plain list, just a different
116identifier (plus).
117
1181. one
1191. two
1201. three
121** mixed lists!
122** what a mess
1231. counting again
1241. ...
1251. four
126
127=== Definition List
128
129The definition list identifier is a colon, followed by
130the term. The term contents is placed on the next line.
131
132orange::	
133	a yellow fruit
134apple::	
135	a green or red fruit
136other fruits::	
137** wee!
138** mixing lists
1391. again!
1401. and again!
141
142== Tables
143
144Use pipes to compose table rows and cells.
145Double pipe at the line beginning starts a heading row.
146Natural spaces specify each cell alignment.
147
148----
149  | cell 1.1  |  cell 1.2   |   cell 1.3 |
150  | cell 2.1  |  cell 2.2   |   cell 2.3 |
151  | cell 3.1  |  cell 3.2   |   cell 3.3 |
152----
153
154----
155|| heading 1 |  heading 2  |  heading 3 |
156 | cell 1.1  |  cell 1.2   |   cell 1.3 |
157 | cell 2.1  |  cell 2.2   |   cell 2.3 |
158----
159
160----
161 |_ heading 1 |  cell 1.1   |   cell 1.2 |
162  | heading 2 |  cell 2.1   |   cell 2.2 |
163  | heading 3 |  cell 3.1   |   cell 3.2 |
164----
165
166----
167|/ heading   |  heading 1  |  heading 2 |
168 | heading 1 |  cell 1.1   |   cell 1.2 |
169 | heading 2 |  cell 2.1   |   cell 2.2 |
170----
171
172Without the last pipe, no border:
173
174----
175  | cell 1.1  |  cell 1.2   |   cell 1.3
176  | cell 2.1  |  cell 2.2   |   cell 2.3
177  | cell 3.1  |  cell 3.2   |   cell 3.3
178----
179
180----
181|| heading 1 |  heading 2  |  heading 3
182 | cell 1.1  |  cell 1.2   |   cell 1.3
183 | cell 2.1  |  cell 2.2   |   cell 2.3
184----
185
186----
187 |_ heading 1 |  cell 1.1   |   cell 1.2
188  | heading 2 |  cell 2.1   |   cell 2.2
189  | heading 3 |  cell 3.1   |   cell 3.2
190----
191
192----
193|/ heading   |  heading 1  |  heading 2
194 | heading 1 |  cell 1.1   |   cell 1.2
195 | heading 2 |  cell 2.1   |   cell 2.2
196----
197
198== Special Entities
199
200Because things were too simple.
201
202=== Images
203
204The image mark is as simple as it can be: +[filename]+.
205
206                      image::img/photo.jpg[]  
207
208And with some targets the image is linkable :
209
210                      http://www.txt2tags.org[(img/photo.jpg)]  
211
212* The filename must end in PNG, JPG, GIF, or similar.
213* No spaces inside the brackets!
214
215=== Other
216
217When the target needs, special chars like <, > and &
218are escaped.
219
220The handy +%%date+ macro expands to the current date.
221
222So today is 20130213 on the ISO +YYYYMMDD+ format.
223
224You can also specify the date format with the %? flags,
225as +%%date(%m-%d-%Y)+ which gives: 02-13-2013.
226
227That's all for now.
228
229
230
231image::img/t2tpowered.png[] (sample.t2t[sample.t2t])
232