aboutsummaryrefslogtreecommitdiffstats
path: root/doc/user/typ_plai
blob: a880ccb85b395604ceea77dc2c08d5862c71108c (plain) (blame)
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
@Section
   @Title { Plain text documents }
   @Tag { plain }
@Begin
@PP
Occasionally you may need to produce an output file containing plain text
plain.text. @Index { plain text documents }
rather than PostScript, for example for an online manual entry or to send
as electronic mail.  Any document that can be produced by Lout in
PostScript can be produced in plain text as well, by adding a @Code "-p"
flag to the Unix command line:
@ID @Code "lout -p simple"
No other changes are required.  Here we are sending the output directly to
the screen, but it can be redirected to a file, or piped through the
@Code more command for viewing one page at a time, etc.
@PP
Of course, plain text is an extremely limited medium of communication
compared with PostScript, and this forces Lout to make some rather
drastic compromises:
@BulletList gap { @ParaGap }
@LI { Symbols like {@Code "@Bullet"}, which stand for unusual characters,
produce printable characters which approximate the PostScript ones.  For
example, {@Code "@Bullet"} produces {@Code "o"}.  However, the @Code "@Char"
and @Code "@Sym" symbols often produce unprintable characters, and are best
avoided; }
@LI { All font and size changes are ignored, since plain text has only
one font and size.  Every character is taken to be @Eq { 1 frac 10 } inch
wide and @Eq { 1 frac 6 } inch high; }
@LI { No underlines are printed; }
@LI { No margin notes are printed; }
@LI { Scaled objects are not printed unless the scale factor happens to be 1; }
@LI { Rotated objects are not printed unless the angle happens to be zero
degrees.  This means that page orientations (Section {@NumberOf pagesize})
other than @Code Portrait do not work; }
@LI { Ruled lines are not printed, and paint and colour options are
ignored.  This spoils the graphics and graphs of Chapters
{@NumberOf graphics}, {@NumberOf diagrams}, and {@NumberOf graphs}. }
@EndList
Despite the problems, many things work surprisingly well.  Tables, for example,
look very good.  It does no harm to try things and see if they work out.
@PP
The worst problem with plain text is that characters cannot be placed at
arbitrary points on the page.  A superscript, for example, is impossible to
place correctly, so Lout uses a different layout for footnote labels (and
makes a mess of equations, which are best avoided).  Because of this problem
it's best to make all horizontal lengths multiples of @Eq {1 frac 10} inch
(conveniently expressed as {@Code 1s}), and all vertical lengths multiples
of @Eq { 1 frac 6 } inch (conveniently expressed as {@Code 1f}).  To help
you do this, the setup files contain many entries that look like this
example:
@ID @Code "# @InitialBreak { {adjust 1.2fx hyphen} @OrIfPlain {ragged 1fx nohyphen} }"
The meaning is that the value of @Code "@InitialBreak" will be
@Code "adjust 1.2fx hyphen" usually, but will switch to
{@Code "ragged 1fx nohyphen"}, which is better suited to plain text,
if the @Code "-p" command line flag is used.  These setup file values
allow you to switch from PostScript to plain text and back again without
changing anything at all except the @Code "-p" command line flag.
@PP
If you use @Code "lout -P" instead of {@Code "lout -p"}, the plain text
output will contain a form-feed character (control-L) after each page
form.feed @Index { form-feed in plain text }
except the last.  This character causes most printing devices to start
a new page, which is very useful when your page height is not exactly
right.
@PP
The @Code "@Document" symbol (Section {@NumberOf ordinary}) has an
unpaginated. @Index @Code "@Unpaginated"
@Code "@Unpaginated" option which, when set to {@Code "Yes"}, causes
the plain text output to appear unpaginated, that is, in one long
continous stream with no page breaks.  Its value is ignored if plain text
output is not in effect, so it can be safely set to @Code "Yes" in
documents intended for formatting both ways.  The usual margins apply;
footnotes appear at the end; figures and tables do not work.  Lout
stupidly reads the entire document before producing any output when
this option is used, so if the document is long you might run out of memory.
@End @Section