PageRenderTime 31ms CodeModel.GetById 1ms app.highlight 25ms RepoModel.GetById 1ms app.codeStats 0ms

/samples/sample.md

http://txt2tags.googlecode.com/
Markdown | 214 lines | 141 code | 73 blank | 0 comment | 0 complexity | 10dc8c0fa4a7670f2e4456c230fa4872 MD5 | raw file
  1TXT2TAGS SAMPLE
  2Aurelio Jargas
  303/19/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 this file are used as headers,
 18on the following format:
 19
 20    line1: document title
 21    line2: author name, email
 22    line3: date, version
 23
 24Lines with balanced equal signs = around are titles.
 25
 26# Fonts and Beautifiers 
 27
 28We have two sets of fonts:
 29
 30The NORMAL type that can be improved with beautifiers.
 31
 32The TYPEWRITER type that uses monospaced font for
 33pre-formatted text.
 34
 35We will now enter on a subtitle...
 36
 37## Beautifiers 
 38
 39The text marks for beautifiers are simple, just as you
 40type on a plain text email message.
 41
 42We use double *, /, - and _ to represent **bold**,
 43*italic*, ~~strike~~ and underline.
 44
 45The ***bold italic*** style is also supported as a
 46combination.
 47
 48## Pre-Formatted Text 
 49
 50We can put a code sample or other pre-formatted text:
 51
 52      here    is     pre-formatted
 53    //marks// are  **not**  ``interpreted``
 54
 55And also, it's easy to put a one line pre-formatted
 56text:
 57
 58    prompt$ ls /etc
 59
 60Or use `pre-formatted` inside sentences.
 61
 62## More Cosmetics 
 63
 64Special entities like email (duh@somewhere.com) and
 65URL (http://www.duh.com) are detected automagically,
 66as long as the horizontal line:
 67
 68---
 69
 70^ thin or large v
 71
 72---
 73
 74You can also specify an [explicit link](http://duh.org)
 75or an  with label.
 76
 77And remember,
 78
 79> A TAB in front of the line does a quotation.
 80> > More TABs, more depth (if allowed).
 81
 82Nice.
 83
 84# Lists 
 85
 86A list of items is natural, just putting a **dash** or
 87a **plus** at the beginning of the line.
 88
 89## Plain List 
 90
 91The dash is the default list identifier. For sublists,
 92just add **spaces** at the beginning of the line. More
 93spaces, more sublists.
 94
 95 * Earth
 96  * America
 97   * South America
 98    * Brazil
 99     * How deep can I go?
100  * Europe
101   * Lots of countries
102 * Mars
103  * Who knows?
104
105The list ends with **two** consecutive blank lines.
106
107## Numbered List 
108
109The same rules as the plain list, just a different
110identifier (plus).
111
1121. one
1131. two
1141. three
115  * mixed lists!
116  * what a mess
1171. counting again
1181. ...
1191. four
120
121## Definition List 
122
123The definition list identifier is a colon, followed by
124the term. The term contents is placed on the next line.
125
126: orange
127a yellow fruit
128: apple
129a green or red fruit
130: other fruits
131  * wee!
132  * mixing lists
1331. again!
1341. and again!
135
136# Tables 
137
138Use pipes to compose table rows and cells.
139Double pipe at the line beginning starts a heading row.
140Natural spaces specify each cell alignment.
141
142|cell 1.1 |cell 1.2 |cell 1.3|
143|cell 2.1 |cell 2.2 |cell 2.3|
144|cell 3.1 |cell 3.2 |cell 3.3|
145
146| heading 1 |heading 2 |heading 3|
147|---------------|
148|cell 1.1 |cell 1.2 |cell 1.3|
149|cell 2.1 |cell 2.2 |cell 2.3|
150
151|heading 1 |cell 1.1 |cell 1.2|
152|heading 2 |cell 2.1 |cell 2.2|
153|heading 3 |cell 3.1 |cell 3.2|
154
155| heading |heading 1 |heading 2|
156|---------------|
157|heading 1 |cell 1.1 |cell 1.2|
158|heading 2 |cell 2.1 |cell 2.2|
159
160Without the last pipe, no border:
161
162|cell 1.1 |cell 1.2 |cell 1.3|
163|cell 2.1 |cell 2.2 |cell 2.3|
164|cell 3.1 |cell 3.2 |cell 3.3|
165
166| heading 1 |heading 2 |heading 3|
167|---------------|
168|cell 1.1 |cell 1.2 |cell 1.3|
169|cell 2.1 |cell 2.2 |cell 2.3|
170
171|heading 1 |cell 1.1 |cell 1.2|
172|heading 2 |cell 2.1 |cell 2.2|
173|heading 3 |cell 3.1 |cell 3.2|
174
175| heading |heading 1 |heading 2|
176|---------------|
177|heading 1 |cell 1.1 |cell 1.2|
178|heading 2 |cell 2.1 |cell 2.2|
179
180# Special Entities 
181
182Because things were too simple.
183
184## Images 
185
186The image mark is as simple as it can be: `[filename]`.
187
188                      ![](img/photo.jpg)  
189
190And with some targets the image is linkable :
191
192                      [![](img/photo.jpg)](http://www.txt2tags.org)  
193
194 * The filename must end in PNG, JPG, GIF, or similar.
195 * No spaces inside the brackets!
196
197## Other 
198
199When the target needs, special chars like <, > and &
200are escaped.
201
202The handy `%%date` macro expands to the current date.
203
204So today is 20140819 on the ISO `YYYYMMDD` format.
205
206You can also specify the date format with the %? flags,
207as `%%date(%m-%d-%Y)` which gives: 08-19-2014.
208
209That's all for now.
210
211---
212
213![](img/t2tpowered.png) ([sample.t2t](sample.t2t))
214