File: sample.mgp

package info (click to toggle)
txt2tags 2.5-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 2,264 kB
  • ctags: 471
  • sloc: python: 2,461; lisp: 414; ruby: 347; xml: 96; php: 95; sh: 83; makefile: 26
file content (365 lines) | stat: -rw-r--r-- 6,478 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
#!/usr/X11R6/bin/mgp -t 90
%deffont "normal"    xfont  "utopia-medium-r", charset "iso8859-1"
%deffont "normal-i"  xfont  "utopia-medium-i", charset "iso8859-1"
%deffont "normal-b"  xfont  "utopia-bold-r"  , charset "iso8859-1"
%deffont "normal-bi" xfont  "utopia-bold-i"  , charset "iso8859-1"
%deffont "mono"      xfont "courier-medium-r", charset "iso8859-1"
%default 1 size 5
%default 2 size 8, fore "yellow", font "normal-b", center
%default 3 size 5, fore "white",  font "normal", left, prefix "  "
%tab 1 size 4, vgap 30, prefix "     ", icon arc "red" 40, leftfill
%tab 2 prefix "            ", icon arc "orange" 40, leftfill
%tab 3 prefix "                   ", icon arc "brown" 40, leftfill
%tab 4 prefix "                          ", icon arc "darkmagenta" 40, leftfill
%tab 5 prefix "                                ", icon arc "magenta" 40, leftfill
%%------------------------- end of headers -----------------------------
%page





%size 10, center, fore "yellow"
TXT2TAGS SAMPLE

%font "normal-i", size 6, fore "white", center
Aurelio Jargas

%font "mono", size 7, center
07/26/2008

%page

Introduction

%font "normal", size 5
Welcome to the txt2tags sample file.

%font "normal", size 5
Here you have examples and a brief explanation of all
marks.

%font "normal", size 5
The first 3 lines of the this file are used as headers,
on the following format:

%font "mono"
line1: document title
line2: author name, email
line3: date, version
%font "normal"

%font "normal", size 5
Lines with balanced equal signs = around are titles.

%page

Fonts and Beautifiers

%font "normal", size 5
We have two sets of fonts:

%font "normal", size 5
The NORMAL type that can be improved with beautifiers.

%font "normal", size 5
The TYPEWRITER type that uses monospaced font for
pre-formatted text.

%font "normal", size 5
We will now enter on a subtitle...

%page

Beautifiers

%font "normal", size 5
The text marks for beautifiers are simple, just as you
type on a plain text email message.

%font "normal", size 5
We use double *, /, - and _ to represent 
%cont, font "normal-b"
bold
%cont, font "normal"
,

%cont, font "normal-i"
italic
%cont, font "normal"
, strike and 
%cont, fore "cyan"
underline
%cont, fore "white"
.

%font "normal", size 5
The 
%cont, font "normal-b"

%cont, font "normal-i"
bold italic
%cont, font "normal"

%cont, font "normal"
 style is also supported as a
combination.

%page

Pre-Formatted Text

%font "normal", size 5
We can put a code sample or other pre-formatted text:

%font "mono"
  here    is     pre-formatted
//marks// are  **not**  ``interpreted``
%font "normal"

%font "normal", size 5
And also, it's easy to put a one line pre-formatted
text:

%font "mono"
prompt$ ls /etc
%font "normal"

%font "normal", size 5
Or use 
%cont, font "mono"
pre-formatted
%cont, font "normal"
 inside sentences.

%page

More Cosmetics

%font "normal", size 5
Special entities like email (
%cont, fore "cyan"
duh@somewhere.com
%cont, fore "white"
) and
URL (
%cont, fore "cyan"
http://www.duh.com
%cont, fore "white"
) are detected automagically,
as long as the horizontal line:

%bar "white" 5
%font "normal", size 5
^ thin or large v

%pause

%font "normal", size 5
You can also specify an explicit link 
%cont, fore "cyan"
http://duh.org
%cont, fore "white"

with label.

%font "normal", size 5
And remember,

%prefix "       "
A TAB in front of the line does a quotation.
%prefix "       "
More TABs, more depth (if allowed).
%prefix "  "
%prefix "  "
%font "normal", size 5
Nice.

%page

Lists

%font "normal", size 5
A list of items is natural, just putting a 
%cont, font "normal-b"
dash
%cont, font "normal"
 or
a 
%cont, font "normal-b"
plus
%cont, font "normal"
 at the beginning of the line.

%page

Plain List

%font "normal", size 5
The dash is the default list identifier. For sublists,
just add 
%cont, font "normal-b"
spaces
%cont, font "normal"
 at the beginning of the line. More
spaces, more sublists.

	earth
		america
			south america
				brazil
					how deep can i go?
		europe
			lots of countries
	mars
		who knows?

%font "normal", size 5
The list ends with 
%cont, font "normal-b"
two
%cont, font "normal"
 consecutive blank lines.

%page

Numbered List

%font "normal", size 5
The same rules as the plain list, just a different
identifier (plus).

	1. one
	2. two
	3. three
		mixed lists!
		what a mess
			1. counting again
			2. ...
	4. four

%page

Definition List

%font "normal", size 5
The definition list identifier is a colon, followed by
the term. The term contents is placed on the next line.

	
%cont, font "normal-b"
orange
%cont, font "normal"

a yellow fruit
	
%cont, font "normal-b"
apple
%cont, font "normal"

a green or red fruit
	
%cont, font "normal-b"
other fruits
%cont, font "normal"

		wee!
		mixing lists
			1. again!
			2. and again!

%page

Tables

%font "normal", size 5
Use pipes to compose table rows and cells.
Double pipe at the line beginning starts a heading row.
Natural spaces specify each cell alignment.

%font "mono"
 || heading 1 |  heading 2  |  heading 3 |
  | cell 1.1  |  cell 1.2   |   cell 1.3 |
  | cell 2.1  |  cell 2.2   |   cell 2.3 |
%font "normal"
%font "normal", size 5
Without the last pipe, no border:

%font "mono"
 || heading 1 |  heading 2  |  heading 3
  | cell 1.1  |  cell 1.2   |   cell 1.3
  | cell 2.1  |  cell 2.2   |   cell 2.3
%font "normal"
%page

Special Entities

%font "normal", size 5
Because things were too simple.

%page

Images

%font "normal", size 5
The image mark is as simple as it can be: 
%cont, font "mono"
[filename]
%cont, font "normal"
.

%font "normal", size 5
                      
%center
%newimage "img/photo.jpg"
%left
  

	The filename must end in PNG, JPG, GIF, or similar.
	No spaces inside the brackets!

%page

Other

%font "normal", size 5
The handy 
%cont, font "mono"
 %%date
%cont, font "normal"
 macro expands to the current date.

%font "normal", size 5
So today is 20080726 on the ISO 
%cont, font "mono"
YYYYMMDD
%cont, font "normal"
 format.

%font "normal", size 5
You can also specify the date format with the %? flags,
as 
%cont, font "mono"
 %%date(%m-%d-%Y)
%cont, font "normal"
 which gives: 07-26-2008.

%font "normal", size 5
That's all for now.

%bar "white" 5
%font "normal", size 5

%left
%newimage "img/t2tpowered.png"
%left
 (sample.t2t 
%cont, fore "cyan"
sample.t2t
%cont, fore "white"
)


%% mgp code generated by txt2tags 2.5 (http://txt2tags.sf.net)
%% cmdline: txt2tags -t mgp samples/sample.t2t
%%EOD