forked from CTeX-org/tex-by-topic-cn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchapter26.tex
280 lines (250 loc) · 9.99 KB
/
chapter26.tex
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
% -*- coding: utf-8 -*-
\documentclass{book}
\input{preamble}
\setcounter{chapter}{25}
\begin{document}
%\chapter{Page Shape}\label{page:shape}
\chapter{Page Shape}\label{page:shape}
%This chapter treats some of the parameters that
%determine the size of the page and how it appears on paper.
This chapter treats some of the parameters that
determine the size of the page and how it appears on paper.
%\label{cschap:topskip}\label{cschap:hoffset}\label{cschap:voffset}\label{cschap:vsize2}\label{cschap:maxdepth}\label{cschap:splitmaxdepth2}
%\begin{inventory}
%\item [\cs{topskip}]
% Minimum distance between the top of the page box
% and the baseline of the first box on the page.
% Plain \TeX\ default:~\n{10pt}
\label{cschap:topskip}\label{cschap:hoffset}\label{cschap:voffset}\label{cschap:vsize2}\label{cschap:maxdepth}\label{cschap:splitmaxdepth2}
\begin{inventory}
\item [\cs{topskip}]
Minimum distance between the top of the page box
and the baseline of the first box on the page.
Plain \TeX\ default:~\n{10pt}
%\item [\cs{hoffset \cs{voffset}}]
%\mdqon
% Distance by which the page is shifted right/""down
%\mdqoff
% with respect to the reference point.
\item [\cs{hoffset \cs{voffset}}]
\mdqon
Distance by which the page is shifted right/""down
\mdqoff
with respect to the reference point.
%\item [\cs{vsize}]
% Height of the page box.
% Plain \TeX\ default:~\n{8.9in}
\item [\cs{vsize}]
Height of the page box.
Plain \TeX\ default:~\n{8.9in}
%\item [\cs{maxdepth}]
% Maximum depth of the page box.
% Plain \TeX\ default:~\n{4pt}
\item [\cs{maxdepth}]
Maximum depth of the page box.
Plain \TeX\ default:~\n{4pt}
%\item [\cs{splitmaxdepth}]
% Maximum depth of a box split off by a \cs{vsplit} operation.
% Plain \TeX\ default: \cs{maxdimen}
\item [\cs{splitmaxdepth}]
Maximum depth of a box split off by a \cs{vsplit} operation.
Plain \TeX\ default: \cs{maxdimen}
%\end{inventory}
\end{inventory}
%%\point The reference point for global positioning
%\section{The reference point for global positioning}
%\point The reference point for global positioning
\section{The reference point for global positioning}
%The \indexterm{page positioning} on the paper is governed by
%a \TeX\ convention, to which output device drivers
%must adhere, that the top left point of the page is
%one inch from the page edges. Unfortunately this
%may lead to lots of trouble, for instance if a printer
%(or the page description language it uses)
%takes, say, the {\em lower\/} left corner as the
%reference point, and is factory set to US paper sizes,
%but is used with European standard A4 paper.
The \indexterm{page positioning} on the paper is governed by
a \TeX\ convention, to which output device drivers
must adhere, that the top left point of the page is
one inch from the page edges. Unfortunately this
may lead to lots of trouble, for instance if a printer
(or the page description language it uses)
takes, say, the {\em lower\/} left corner as the
reference point, and is factory set to US paper sizes,
but is used with European standard A4 paper.
%The page is shifted on the paper if one assigns non-zero
%values to \csidx{hoffset} or \csidx{voffset}: positive values
%shift to the right and down respectively.
The page is shifted on the paper if one assigns non-zero
values to \csidx{hoffset} or \csidx{voffset}: positive values
shift to the right and down respectively.
%%\point \cs{topskip}
%\section{\protect\cs{topskip}}
%\point \cs{topskip}
\section{\protect\cs{topskip}}
%The \csidx{topskip} ensures to a certain point
%that the first baseline of a page
%will be at the same location from page to page,
%even if font sizes
%are switched between pages or if the first line has
%no ascenders.
The \csidx{topskip} ensures to a certain point
that the first baseline of a page
will be at the same location from page to page,
even if font sizes
are switched between pages or if the first line has
no ascenders.
%Before the first box on each page some glue is inserted.
%This glue has the same stretch and shrink as \cs{topskip}, but
%the natural size is the natural size of \cs{topskip}
%minus the height of the first box, or zero if this
%would be negative.
Before the first box on each page some glue is inserted.
This glue has the same stretch and shrink as \cs{topskip}, but
the natural size is the natural size of \cs{topskip}
minus the height of the first box, or zero if this
would be negative.
%Plain \TeX\ sets \cs{topskip} to {\tt 10pt}.
%Thus the top lines of pages will have their baselines
%at the same place if
%the top portion of the characters is ten point or less.
%For the Computer Modern fonts this condition is satisfied
%if the font size is less than (about) 13~points;
%for larger fonts
%the baseline of the top line will drop.
Plain \TeX\ sets \cs{topskip} to {\tt 10pt}.
Thus the top lines of pages will have their baselines
at the same place if
the top portion of the characters is ten point or less.
For the Computer Modern fonts this condition is satisfied
if the font size is less than (about) 13~points;
for larger fonts
the baseline of the top line will drop.
%The height of the page box for a page containing only
%text (and assuming a zero \cs{parskip})
%will be the \cs{topskip} plus a number of times
%the \cs{baselineskip}. Thus one can define a macro
%to compute the \cs{vsize} from the number of lines
%on a page:
%\howto Specify page height in lines\par
%\begin{verbatim}
%\def\HeightInLines#1{\count@=#1\relax
% \advance\count@ by -1\relax
% \vsize=\baselineskip
% \multiply\vsize by \count@
% \advance\vsize by \topskip}
%\end{verbatim}
%Calculating the \cs{vsize} this way will prevent
%underfull boxes for text-only pages.
The height of the page box for a page containing only
text (and assuming a zero \cs{parskip})
will be the \cs{topskip} plus a number of times
the \cs{baselineskip}. Thus one can define a macro
to compute the \cs{vsize} from the number of lines
on a page:
\howto Specify page height in lines\par
\begin{verbatim}
\def\HeightInLines#1{\count@=#1\relax
\advance\count@ by -1\relax
\vsize=\baselineskip
\multiply\vsize by \count@
\advance\vsize by \topskip}
\end{verbatim}
Calculating the \cs{vsize} this way will prevent
underfull boxes for text-only pages.
%In cases where the page does not start with a line of text
%(for instance a rule), the topskip may give unwanted effects.
%To prevent these, start the page with
%\begin{verbatim}
%\hbox{}\kern-\topskip
%\end{verbatim}
%followed by what you wanted on top.
In cases where the page does not start with a line of text
(for instance a rule), the topskip may give unwanted effects.
To prevent these, start the page with
\begin{verbatim}
\hbox{}\kern-\topskip
\end{verbatim}
followed by what you wanted on top.
%Analogous to the \cs{topskip}, there is a \cs{splittopskip}
%for pages generated by a \cs{vsplit} operation; see
%the next chapter.
Analogous to the \cs{topskip}, there is a \cs{splittopskip}
for pages generated by a \cs{vsplit} operation; see
the next chapter.
%%\point Page height and depth
%\section{Page height and depth}
%\point Page height and depth
\section{Page height and depth}
%\index{page!height|(}
%\index{page!depth|(}
\index{page!height|(}
\index{page!depth|(}
%\TeX\ tries to build pages as a \cs{vbox} of height \csidx{vsize};
%\alt
%see also \cs{pagegoal} in the next chapter.
\TeX\ tries to build pages as a \cs{vbox} of height \csidx{vsize};
\alt
see also \cs{pagegoal} in the next chapter.
%If the last item on a page has an excessive depth,
%that page would be noticeably longer than other pages.
%To prevent this phenomenon \TeX\ uses \csidx{maxdepth} as
%the maximum depth of the page box. If adding an item to the
%page would make the depth exceed this quantity, then the
%reference point of the page is moved down to make the depth
%exactly \cs{maxdepth}.
If the last item on a page has an excessive depth,
that page would be noticeably longer than other pages.
To prevent this phenomenon \TeX\ uses \csidx{maxdepth} as
the maximum depth of the page box. If adding an item to the
page would make the depth exceed this quantity, then the
reference point of the page is moved down to make the depth
exactly \cs{maxdepth}.
%The `raggedbottom' effect is obtained in plain \TeX\
%\cstoidx raggedbottom\par
%by giving the \cs{topskip} some finite stretchability:
%\hbox{\n{10pt plus 60pt}}.
%Thus the natural height of box~255 can vary when it reaches
%the output routine.
%Pages are then shipped out (more or less) as
%\begin{verbatim}
%\dimen0=\dp255 \unvbox255
%\ifraggedbottom \kern-\dimen0 \vfil \fi
%\end{verbatim}
%The \cs{vfil} causes the topskip to be set at natural
%width, so the effect is one of a fixed top line and a
%variable bottom line of the page.
The `raggedbottom' effect is obtained in plain \TeX\
\cstoidx raggedbottom\par
by giving the \cs{topskip} some finite stretchability:
\hbox{\n{10pt plus 60pt}}.
Thus the natural height of box~255 can vary when it reaches
the output routine.
Pages are then shipped out (more or less) as
\begin{verbatim}
\dimen0=\dp255 \unvbox255
\ifraggedbottom \kern-\dimen0 \vfil \fi
\end{verbatim}
The \cs{vfil} causes the topskip to be set at natural
width, so the effect is one of a fixed top line and a
variable bottom line of the page.
%Before \cs{box255} is unboxed in the plain \TeX\ output routine,
%\cs{boxmaxdepth} is set to \cs{maxdepth}
%so that this box will made under the same assumptions
%that the page builder used when putting together \cs{box255}.
Before \cs{box255} is unboxed in the plain \TeX\ output routine,
\cs{boxmaxdepth} is set to \cs{maxdepth}
so that this box will made under the same assumptions
that the page builder used when putting together \cs{box255}.
%The depth of box split off by a \cs{vsplit} operation
%is controlled by the \cs{splitmaxdepth} parameter.
The depth of box split off by a \cs{vsplit} operation
is controlled by the \cs{splitmaxdepth} parameter.
%\index{page!height|)}
%\index{page!depth|)}
\index{page!height|)}
\index{page!depth|)}
%\endofchapter
\endofchapter
\end{document}