-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtypography.tex
243 lines (197 loc) · 8.06 KB
/
typography.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
\chapter{Typography}
\section{Punctuation}
\begin{Rule}
Use opening (`) and closing (') quotation marks correctly.
\end{Rule}
In \LaTeX, the closing quotation mark is typed like a normal
apostrophe, while the opening quotation mark is typed using the French
\emph{accent grave} on your keyboard (the \emph{accent grave} is the
one going down, as in \emph{frère}).
Note that any punctuation that \emph{semantically} follows quoted
speech goes inside the quotes in American English, but outside in
Britain. Also, Americans use double quotes first. Oppose
\begin{quote}
``Using `lasers,' we punch a hole in \ldots\ the Ozone Layer,''
Dr.\ Evil said.
\end{quote}
to
\begin{quote}
`Using ``lasers'', we punch a hole in \ldots\ the Ozone Layer',
Dr.\ Evil said.
\end{quote}
\begin{Rule}
Use hyphens (-), en-dashes (--) and em-dashes (---) correctly.
\end{Rule}
A hyphen is only used in words like `well-known', `$3$-colorable'
etc., or to separate words that continue in the next line (which is
known as hyphenation). It is entered as a single ASCII hyphen
character (\texttt{-}).
To denote ranges of numbers, chapters, etc., use an en-dash (entered
as two ASCII hyphens \texttt{--}) with no spaces on either side. For
example, using Equations (1)--(3), we see\ldots
As the equivalent of the German \emph{Gedankenstrich}, use an en-dash
with spaces on both sides -- in the title of Section \ref{sec:list},
it would be wrong to use a hyphen instead of the dash. (Some English
authors use the even longer emdash (---) instead, which is typed as
three subsequent hyphens in \LaTeX. This emdash is used without spaces
around it---like so.)
\section{Spacing}
\begin{Rule}
\label{rule:no-manual-spacing}
Do not add spacing manually.
\end{Rule}
You should never use the commands \lstinline-\\- (except within
tabulars and arrays), \lstinline[showspaces=true]-\ - (except to
prevent a sentence-ending space after Dr.\ and such),
\lstinline-\vspace-, \lstinline-\hspace-, etc. The choices programmed
into \LaTeX{} and this style should cover almost all cases. Doing it
manually quickly leads to inconsistent spacing, which looks terrible.
Note that this list of commands is by no means conclusive.
\begin{Rule}
Judiciously insert spacing in maths where it helps.
\end{Rule}
This directly contradicts Rule~\ref{rule:no-manual-spacing}, but in
some cases \TeX{} fails to correctly decide how much spacing is
required. For example, consider
\begin{displaymath}
f(a,b) = f(a+b, a-b).
\end{displaymath}
In such cases, inserting a thin math space \lstinline-\,- greatly
increases readability:
\begin{displaymath}
f(a,b) = f(a+b,\, a-b).
\end{displaymath}
Along similar lines, there are variations of some symbols with
different spacing. For example, Lagrange's Theorem states that
\(\abs{G}=[G:H]\abs{H}\), but the proof uses a bijection \(f\colon
aH\to bH\). (Note how the first colon is symmetrically spaced, but
the second is not.)
\begin{Rule}
Learn when to use \lstinline[showspaces=true]-\ - and
\lstinline-\@-.
\end{Rule}
Unless you use `french spacing', the space at the end of a sentence is
slightly larger than the normal interword space.
The rule used by \TeX{} is that any space following a period,
exclamation mark or question mark is sentence-ending, except for
periods preceded by an upper-case letter. Inserting \lstinline-\-
before a space turns it into an interword space, and inserting
\lstinline-\@- before a period makes it sentence-ending. This means
you should write
\begin{lstlisting}
Prof.\ Dr.\ A. Steger is a member of CADMO\@.
If you want to write a thesis with her, you
should use this template.
\end{lstlisting}
which turns into
\begin{quote}
Prof.\ Dr.\ A. Steger is a member of CADMO\@. If you want to write
a thesis with her, you should use this template.
\end{quote}
The effect becomes more dramatic in lines that are stretched slightly
during justification:
\begin{quote}
\parbox{\linewidth}{\hbox to \linewidth{%
Prof.\ Dr.\ A. Steger is a member of CADMO\@. If you}}
\end{quote}
\begin{Rule}
Place a non-breaking space (\lstinline-~-) right before references.
\end{Rule}
This is actually a slight simplification of the real rule, which
should invoke common sense. Place non-breaking spaces where a line
break would look `funny' because it occurs right in the middle of a
construction, especially between a reference type (Chapter) and its
number.
\section{Choice of `fonts'}
Professional typography distinguishes many font attributes, such as
family, size, shape, and weight. The choice for sectional divisions
and layout elements has been made, but you will still occasionally
want to switch to something else to get the reader's attention. The
most important rule is very simple.
\begin{Rule}
When emphasising a short bit of text, use \lstinline-\emph-.
\end{Rule}
In particular, \emph{never} use bold text (\lstinline-\textbf-).
Italics (or Roman type if used within italics) avoids distracting the
eye with the huge blobs of ink in the middle of the text that bold
text so quickly introduces.
Occasionally you will need more notation, for example, a consistent
typeface used to identify algorithms.
\begin{Rule}
Vary one attribute at a time.
\end{Rule}
For example, for \textsc{WeirdSort} we only changed the shape to small
caps. Changing two attributes, say, to bold small caps would be
excessive (\LaTeX{} does not even have this particular variation).
The same holds for mathematical notation: the reader can easily
distinguish \(g_n\), \(G(x)\), \(\mathcal{G}\) and \(\mathsf{G}\).
\begin{Rule}
Never underline or uppercase.
\end{Rule}
No exceptions to this one, unless you are writing your thesis on a
typewriter. Manually. Uphill both ways. In a blizzard.
\section{Displayed equations}
\begin{Rule}
Insert paragraph breaks \emph{after} displays only where they
belong. Never insert paragraph breaks \emph{before} displays.
\end{Rule}
\LaTeX{} translates sequences of more than one linebreak (i.e., what
looks like an empty line in the source code) into a paragraph break in
almost all contexts. This also happens before and after displays,
where extra spacing is inserted to give a visual indication of the
structure. Adding a blank line in these places may look nice in the
sources, but compare the resulting display
\begin{displaymath}
a = b
\end{displaymath}
to the following:
\begin{displaymath}
a = b
\end{displaymath}
The first display is surrounded by blank lines, but the second is not.
It is bad style to start a paragraph with a display (you should always
tell the reader what the display means first), so the rule follows.
\begin{Rule}
Never use \lstinline-eqnarray-.
\end{Rule}
It is at the root of most ill-spaced multiline displays. The
\package{amsmath} package provides better alternatives, such as the
\lstinline-align- family
\begin{align*}
f(x) &= \sin x, \\
g(x) &= \cos x,
\end{align*}
and \lstinline-multline- which copes with excessively long equations:
\begin{multline*}
\def\P{\mathrm P}
\P\bigl[X_{t_0} \in (z_0, z_0+dz_0],\ldots, X_{t_n}\in(z_n,z_n+dz_n]\bigr]
\\= \nu(dz_0) K_{t_1}(z_0,dz_1) K_{t_2-t_1}(z_1,dz_2)\cdots
K_{t_n-t_{n-1}}(z_{n-1},dz_n).
\end{multline*}
\section{Floats}
By default this style provides floating environments for tables and
figures. The general structure should be as follows:
\begin{lstlisting}
\begin{figure}
\centering
% content goes here
\caption{A short caption}
\label{some-short-label}
\end{figure}
\end{lstlisting}
Note that the label must follow the caption, otherwise the label will
refer to the surrounding section instead. Also note that figures
should be captioned at the bottom, and tables at the top.
The whole point of floats is that they, well, \emph{float} to a place
where they fit without interrupting the text body. This is a frequent
source of confusion and changes; please leave it as is.
\begin{Rule}
Do not restrict float movement to only `here'
\textnormal{(\lstinline-h-)}.
\end{Rule}
If you are still tempted, you should avoid the float altogether and
just show the figure or table inline, similar to a displayed equation.
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "thesis"
%%% End: