PageRenderTime 19ms CodeModel.GetById 13ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

/samples/sample.red

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