#!/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
aurélio, aurelio@verde666.org

%font "mono", size 7, center
 20021220

%font "normal", size 5

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

%font "normal", size 5

	Introduction
	Fonts and Beautifiers
		Beautifiers
		Pre-Formatted Text
		More Cosmetics
	Lists
		Plain List
		Numbered List
		Definition List
	Tables
	Special Entities
		Images
		Other

%font "normal", size 5

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

%font "normal", size 5

%page

Introduction

Welcome to the 
%cont, font "mono"
txt2tags
%cont, font "normal"
 sample file.

Here you have examples and a brief explanation of all tags.

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"

Lines with balanced equal signs = around are titles.

%page

Fonts and Beautifiers

We have two sets of fonts:

	
%cont, font "normal-b"
the normal type
%cont, font "normal"
:
  can be improved with beautifiers to bold, italic, underline or combinations between them.
%font "normal", size 5

	
%cont, font "normal-b"
the typewriter type
%cont, font "normal"
:
  uses monospaced font for preformatted text.

We will now enter on a subtitle...

%page

Beautifiers

The text tags for beautifiers are simple, just as you type on a plain text email message.

We use double *, / and _ to represent 
%cont, font "normal-b"
bold
%cont, font "normal"
, 
%cont, font "normal-i"
italic
%cont, font "normal"
 and 
%cont, fore "cyan"
underline
%cont, fore "white"
.

The 
%cont, font "normal-bi"
bold italic
%cont, font "normal"
 style is also supported.

%page

Pre-Formatted Text

We can put a code sample or other preformatted text:

%font "mono"
  here    is     preformatted
//tags// are  **not**  `interpreted`
%font "normal"

And also, it's easy to put a one line preformatted text:

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

Or use 
%cont, font "mono"
preformatted
%cont, font "normal"
 inside sentences.

%page

More Cosmetics

Special entities like an email (
%cont, fore "cyan"
duh@somewhere.com
%cont, fore "white"
) or an URL (
%cont, fore "cyan"
http://www.duh.com
%cont, fore "white"
) are recognized automagically, as long as the horizontal line:

%bar "white" 5
^ thin or large v
%pause

You can also specify an explicit link 
%cont, fore "cyan"
http://duh.org#anchor
%cont, fore "white"
 with label.

And remember,
%prefix "       "
A TAB in front of the line does a quotation.
%prefix "       "
More TABs increase the quote depth (if allowed).
%prefix "  "
%prefix "  "
Nice.

%page

Lists

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 begining of the line.

%page

Plain List

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?

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

%page

Numbered List

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

The list identifier is an equal sign, and the colon separate the definition
term to the definition definition.

	
%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

Tables are supported for the HTML, Sgml and Moin targets.
On the others they're treated as preformatted text.

Just use pipes to compose table rows and cells.
Double pipe at the line begining identify a table title row.


%font "mono"
|| title   | other title | another  |
| cell 1.1 | cell 1.2    | cell 1.3 |
| cell 2.1 | cell 2.2    | cell 2.3 |
%font "normal"

Without the last pipe, no border:


%font "mono"
|| title   | other title | another
| cell 1.1 | cell 1.2    | cell 1.3
| cell 2.1 | cell 2.2    | cell 2.3
%font "normal"

%page

Special Entities

Because things were too simple.

%page

Images

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

%center
%newimage "photo.jpg", left

	filename must end in PNG, JPG, GIF, or similar.
	no spaces on the brackets! (on the filename ok)

%page

Other

And as a gift, a special 
%cont, font "mono"
 %%date
%cont, font "normal"
 handy tag that tell us the current date.

So today is 20021220 on the ISO 
%cont, font "mono"
yyyymmdd
%cont, font "normal"
 format.

You can also specify the date format with the %? flags,
as 
%cont, font "mono"
 %%date(%m-%d-%Y)
%cont, font "normal"
 wich gives: 12-20-2002.

That's all.

%center
%newimage "pwrbytxt2tags-2.png", left


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