summaryrefslogtreecommitdiff
path: root/macros/inrstex/inrsdoc/thspac.tex
blob: 47e524eab47bad365a12320fe9f32c58e7404d54 (plain)
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
%-*-tex-*-
\ifundefined{writestatus} \input status \relax \fi %
\chcode{spac}

\def\cqu{\cquote{It is a very sad thing that nowadays there is so little useless
information.}{Oscar~Wilde (1854-1900)}}

\chapterhead{spac}{SPACING}
This chapter discusses the various mechanisms in \tex\ for creating and
controlling spaces in a document. All spacing involves the insertion of glue
that may or may not have stretch or shrink. This chapter also includes a
description of |\beginttverbatim...\endttverbatim| that allows text to be
inserted in a typewriter font with the original spacing. It is useful for
such things as computer listings. 

{\bf You should never need to use |\vskip| or  |\hskip| or its relatives
while using \intex\ \dots\ except perhaps when trying to place boxes on a
page.} \intex\ has easily modified parameters for all spacing. If you don't
like the spacing before or after an |\shead|, check first that there is no
underfull box and then modify |\prsheadskipsize| and |\posheadskipsize| as
necessary. 

\shead{spacomlist}{Command List}
\begintwocolumn
\ext|\beginttverbatim|
\pla|\bigskip|
\ext|\endttverbatim|
\pla|\enskip|
\pri|\hskip|
\pri|\kern|
\pla|\medskip|
\pri|\mkern|
\pri|\mskip|
\pla|\quad|
\pla|\qquad|
\pla|\smallskip|
\ext|\spacing|
\pri|\vglue|
\pri|\vskip|
\endtwocolumn

\shead{basicspac}{Basic Spacing Mechanisms}
The basic spacing commands in \tex\ are |\hskip|, |\vskip|, and |\mskip| that
are used in horizontal, vertical and mathematics mode respectively. All of
these take |<glue>| in the standard form of 
|[+ -] <dimen> [plus <dimen>] [minus <dimen>]| except |\mskip| which
must have |<mudimen>| or units of |mu|. The stretch and shrink
parameters are optional but the first |<dimen>| is not. In general \tex\ allows
for line or page breaks to occur after glue in a list. If spacing is desired
without the possibility of breaks or glue disposal, then the commands
|\kern| and |\mkern| are 
used. These are the ones used for placing accents. 

When \tex\ breaks a page or a line, the glue at the beginning of the line or
page is discarded, unless it is put there via a |\kern|. This means that a
special command is needed to force glue at the top of a page. This command is
|\vglue|. It is like |\vskip| but works at the top of the page. 


Special preset skips in vertical mode are |\smallskip|, |\medskip|,
|\bigskip| and for horizontal mode |\quad|, |\qquad|, and |\enspace|. The
latter three are font size dependent and also will work in math mode.

Finally |\spacing| is an \intex\ command that allows for a changing of the
spacing between the lines of a document. For instance |\spacing{1.5}| will
produce 1.5 line spacing. |\spacing| modifies the vertical skip that \tex\
puts between adjacent lines. {\bf However, lists, 
the various types of section heads, figure and table captions, and footnotes
are all forced to be single spacing.} All those forms that have an
|\every...| may be modified. For example 
|\everylist = {\spacing{1.5}}|
will force every list to have 1.5 spacing. If |\everysublist| and 
|\everysubsublist| have not been modified, sublists and subsublists will also
be spacing 1.5.


\shead{verbatim}{Verbatim or ``No Fill'' Forms}
\intex\ supplies, as an external command list, a method of producing a
listing with the same spacing that exists in the original form. This is only
supplied for typewriter |\tt| fonts as these are the only monospaced fonts
available. For a monospaced font, all characters are the same width so that
it is possible to ensure that spacing will be identical to that seen on a
normal typewriter or terminal screen. All characters except the backslash
``~|\|~'' are allowed. 
For example 
\begingroup \catcode`\^=7
\beginttverbatim
This is
     an example
        where the 
              first word of each
                    line starts below the
                         second one of 
                                the previous line. 
\endttverbatim 
\catcode`\^^M=13 \global\let^^M=\par\endgroup
It was given by the following code 
\begintt
\beginttverbatim
This is
     an example
        where the 
              first word of each
                    line starts below the
                         second one of 
                                the previous line. 
\endtt
|\endttverbatim|

\shead{spaccomforms}{Command Forms}
\beginblockmode
\ext\@|\beginttverbatim|
\nbr 
Begins a section of ``verbatim'' or ``no fill'' mode in typewriter font. All
characters except the backslash ``~|\|~'' are allowed. This form must
terminate with an |\endttverbatim|. At the cost of a one character offset,
the |\def\@{\char'134}| will drop a |\| in using |\@|. 


\mbr
\pla\@|\bigskip|
\nbr
Vertical skip of size \quad\vbox{\hrule width .25in\bigskip\hrule}.

\mbr
\ext\@|\endttverbatim|
\nbr 
Ends a section of ``verbatim'' or ``no fill'' mode in typewriter font. All
characters except the backslash ``~|\|~'' are allowed. This form must
begin with a |\beginttverbatim|. 

\mbr
\pla\@|\enskip|
\nbr
Horizontal skip of \hbox{\strut\vrule\enspace\vrule} -- one |\enspace| or
.5em.

\mbr
\pri\@|\hskip [+ -] <dimen> [plus <dimen>] [minus <dimen>]|
\nbr
This is the basic positive and negative skip in horizontal mode.


\mbr
\pri\@|\kern [+ -] <dimen>|
\nbr
This produces an unbreakable space vertically, in vertical mode, and
horizontally, in horizontal mode.

\mbr
\pri\@|\mkern [+ -] <decimal number>mu|
\nbr
This is the basic unbreakable space in math mode. It is always in |mu| units.
Note that there are 18 |mu| to an |em|. For instance |$]\mkern -1mu[$| gives
$]\mkern -1mu[$. 

\mbr
\pri\@|\mskip [+ -] <mudimen> [plus <mudimen>] [minus <mudimen>]|
\nbr
A |<mudimen>| is |<decimal number>mu|. This is the basic horizontal 
math |mu| skip with glue. It is valid only in math mode.

\mbr
\pla\@|\medskip|
\nbr
This is a vertical skip of the size \quad\vbox{\hrule width .25in\medskip\hrule}.



\mbr
\pla\@|\quad \qquad|
\nbr
These are horizontal skips of 1em and 2em respectively. They correspond in
this font to \hbox{\strut\vrule\quad\vrule} and 
\hbox{\strut\vrule\qquad\vrule} respectively.

\mbr
\pla\@|\smallskip|
\nbr
This is a vertical skip of the size \quad \vbox{\hrule width .25in\smallskip\hrule}.

\mbr
\ext\@|\spacing {<decimal number>}|
\nbr
The spacing becomes |<decimal number>| times the normal spacing. The normal
spacing is usually referred to as {\it single} spacing.



\mbr
\pri\@|\vglue [=] [+ -] <dimen> [plus <dimen>] [minus <dimen>]|
\nbr
This puts nondiscardable glue into a vertical list. It is usually used to
put a vertical skip at the top of a page.

\mbr
\pri\@|\vskip [=] [+ -] <dimen> [plus <dimen>] [minus <dimen>]|
\nbr
This is the standard vertical skip command. If used in horizontal mode, it
automatically causes a switch to vertical mode.

\endblockmode
\ejectpage
\done