aboutsummaryrefslogtreecommitdiff
path: root/demo/demo.tr
blob: 2a3621a0aeee7a0d7e192e58b479bd37ce3418be (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
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
.\" Neatroff Tutorial #1
.\"
.\" The demo subdirectory of neatroff_make contains a few examples of
.\" using Neatroff; they help particularly those users who have good
.\" experience in using Troff.  What follows demonstrates the basics of
.\" using Neatroff, assuming that the reader has never used Troff before.
.\" Nevertheless, this section would probably help any new user of
.\" Neatroff.
.\"
.\" ===================
.\" SETTING UP NEATROFF
.\" ===================
.\"
.\" You can set up Neatroff as follows.
.\"
.\" $ git clone https://github.com/aligrudi/neatroff_make.git
.\" $ cd neatroff_make
.\" $ make init		# Downloads the required programs and some fonts
.\" $ make neat		# Compiles the programs
.\"
.\" For rendering this file, you can perform the following steps.
.\"
.\" + Create a directory to store your Neatroff documents.
.\" + Copy the Makefile in neatroff_make/demo to this directory.
.\" + Edit the value of BASE in the Makefile to point to neatroff_make.
.\" + Edit the line beginning with "all:"; remove the names of files
.\"   that appear after it in this line.
.\" + Create a file name demo.tr with the contents of this file.
.\" + Add demo.pdf after "all:" in the Makefile.
.\"
.\" ============
.\" TROFF BASICS
.\" ============
.\"
.\" As you have already guessed, lines starting with .\" are comments.
Hello Neatroff.
.\" Blank lines cause a line break and some vertical spacing (unless
.\" using blm request).

Basic requests:
.\" The br request causes a line break as well.
.br
.\" Requests can start with a dot or quote in a separate line, or
.\" combined with the text after a backslash.
Words \s[16]can\s0 be \s+[5]Larger\s0 or \s-[5]Smaller\s0.
.\" You can also insert vertical space using sp request.
.sp 3
.\" You can also use ps request to change font size, and vs to change
.\" the vertical space between lines.
.ps 14
.vs 14
.\" Defaults fonts: R (Roman), B (bold), I (italic); P is the previous
.\" font.
Fonts can be \fBchanged\fP.
.\" You can also use ft request.
.ft I
This is \m[cyan]cyan\m[]; \m[#382]colour\m[] does help
.\" The colour can be also changed using cl request
.cl #244
sometimes.
.\" Without argument, requests like cl, ft, and ps change font face,
.\" colour, and size respectively to its previous value.
.cl
.ft
.sp
.\" ===============
.\" DEFINING MACROS
.\" ===============
.\"
.\" A multi-line macro can be defined as follows; the definition ends
.\" at a line containing "..".
.de mac1
.	ft B
.	cl #824
\\$1
.	ft P
.	cl
..
.\" This is a single-line macro.
.ds mac2 "\m[\\$2]\\$1\m[] (\\$2)
.\" They can be invoked as follows (\\$N is replaced by argument N).
.mac1 Macros
in \*[mac2 colour red].
.sp
.\" Numbers and strings can be saved in registers.
.nr count 20
.ds name "Page
There are \n[count] of \*[name]s.
.sp
.\" ===============
.\" TEXT ADJUSTMENT
.\" ===============
.ce
Centred line
.sp
.\" Without paragraph formatting, line breaks are respected.
.nf
With no paragraph
formatting.
.sp
.\" With paragraph formatting, words are collected and lines
.\" are filled.
.fi
Enable paragraph
formatting.
.sp
.\" Paragraph adjustment type (lp, rp, and bp enable whole paragraph
.\" formatting algorithm):
.\" + l, lp: Left
.\" + r, rp: Right
.\" + b, bp: Adjust both margins
.ad r
Right adjusted text.
.sp
.ad b
.\" You can specify identation with in, temporary indentation
.\" with ti, and line length with ll.
.in 1c
.ll 15c
.ti 2c
Text indentation is applied to the all lines (its current value is \n[.i]),
whereas temporary indentation is applied only on the next line.
.in 0
.sp
.\" =============
.\" OTHER REQUSTS
.\" =============
.\" Scale indicators:
.\" + i: Inch
.\" + c: Centimeters
.\" + m: Em (current size points)
.\" + n: En (Em / 2)
.\" + p: Points (1/72 inch)
.\" + u: Basic unit
.\" + v: Vertical space
.\" + none: Default (depends on the request)
.ad l
.nf
Horizontal \h'1c'movement and vertical \v'1m'movement.
Width of \(lqabc\(rq is \w'abc' in basic units.
.sp
.\" Drawing commands:
Lines: horizontal \l'1m' and vertical \L'-1m'
Lines: \D'l 1m -1n'
Circles: \D'c 1n'
Polygons: \D'p 1n 0 0 -1n -1n 1n'
Filled polygons: \D'P 1n 0 0 -1n -1n 1n'
.sp
.\" Fonts can be mounted using fp; the second argument is font
.\" short name and the third argument is font name (the name of
.\" the font descriptor file).
.fp - AB CB
.fp - MYFONT URWGothic-Book
Fonts: \f[AB]number 1\fP and \f[MYFONT]number 2\fP.
.\" You can also replace standard fonts
.fp - R CB
This is the new Roman font.
.\" ==========
.\" NEXT STEPS
.\" ==========
.\"
.\" + Read "Troff User's Manual," "Neatroff Introduction," and
.\"   "UNIX Text Processing".
.\" + Use macro packages.
.\" + Read available macro packages like those in neatroff_make/tmac.
.\" + Write your own macro package.