blob: bc901a359a69479b264ad421ce3df6a90e338816 (
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
|
%****************************************************************
%* *
%* GENERALLY USEFUL MACROS *
%* *
%****************************************************************
%****************************************************************
%* *
%* Some standard abbreviations *
%* *
%****************************************************************
% Haskell name
\newcommand{\Haskell}[1]{Haskell}
% \ba \ea: Abbreviations for begin and end array
%
\newcommand{\ba}{\begin{array}}
\newcommand{\ea}{\end{array}}
%****************************************************************
%* *
%* Keeping text together *
%* *
%****************************************************************
% Use \begin{together} (or \bt)
% \end{together} (or \et)
%
% to keep a paragraph together on a single page.
\newenvironment{together}%
{\begin{flushleft}\begin{minipage}{\textwidth}}%
{\end{minipage}\end{flushleft}}
\newcommand{\bt}{\begin{together}}
\newcommand{\et}{\end{together}}
%****************************************************************
%* *
%* ToDo macro (cf showtodo.sty) *
%* *
%****************************************************************
\newcommand{\ToDo}[1]{}
%****************************************************************
%* *
%* Making boxes round things *
%* *
%****************************************************************
% \outline{text} typesets text in a centred framed box of the width
% of the page.
%
\newcommand{\outline}[1]{
\begin{center}
\fbox{
\begin{minipage}{\linewidth}
#1
\end{minipage}
}
\end{center}
}
%****************************************************************
%* *
%* Math codes *
%* *
%****************************************************************
% The mathcodes for the letters A, ..., Z, a, ..., z are changed to
% generate text italic rather than math italic by default. This makes
% multi-letter identifiers look better. The mathcode for character c
% is set to "7000 (variable family) + "400 (text italic) + c.
%
% Old Latex
%
%\def\@setmcodes#1#2#3{{\count0=#1 \count1=#3
% \loop \global\mathcode\count0=\count1 \ifnum \count0<#2
% \advance\count0 by1 \advance\count1 by1 \repeat}}
%
%\@setmcodes{`A}{`Z}{"7441}
%\@setmcodes{`a}{`z}{"7461}
% Should work with Latex 3.0
%
%{\catcode`\= 11
% \gdef\mathrm{\use@mathgroup \=cmr \z@}
% %\gdef\mit{\use@mathgroup \=cmm \@ne}
% \gdef\mit{\use@mathgroup \=cmt \@ne}
% \gdef\cal{\use@mathgroup \=cmsy \tw@}
% }
\@ifundefined{selectfont}
{}
{\newmathalphabet{\textit}
\addtoversion{normal}{\textit}{cmr}{m}{it}
\addtoversion{bold}{\textit}{cmr}{bx}{it}
\everymath{\textit}
\everydisplay{\textit}
}
%****************************************************************
%* *
%* Definitions for macros used in figures *
%* These are produced by fig2dev, so we need defns for them *
%* *
%****************************************************************
% These ones work for 11-pt typesetting
\@ifundefined{selectfont} %DL is MS scheme present?
{}{
\def\fiverm{\rm\tiny} % Five pt
\def\sevrm{\rm\scriptsize} % Seven pt
\def\nintt{\tt\footnotesize}
\def\ninrm{\rm\footnotesize}
\def\tenrm{\rm\small} % Ten pt
\def\tentt{\tt\small} % Ten pt
\def\elvrm{\rm\normalsize} % Eleven pt
\def\elvit{\em\normalsize}
\def\twlbf{\bf\large} % Twelve pt
\def\twlit{\em\large}
\def\twltt{\tt\large}
\def\twlrm{\rm\large}
\def\twfvtt{\tt\large}
\def\frtnrm{\rm\Large} % Fourteen pt
\def\frtnbf{\bf\Large}
\def\frtnit{\em\Large}
\def\frtntt{\tt\Large}
\def\svtnsf{\sf\huge} % Seventeen pt
% cant remember why I need these
\def\egt{\size{8}{9} }
\def\elv{\size{11}{12} }
\def\five{\size{5}{7} }
\def\fiv{\size{5}{6} }
\def\frtn{\size{14}{15} }
\def\nin{\size{9}{10} }
\def\sev{\size{7}{8} }
\def\six{\size{6}{7} }
\def\svtn{\size{17}{18} }
\def\ten{\size{10}{11} }
\def\twfv{\size{25}{27} }
\def\twl{\size{12}{14} }
\def\twty{\size{20}{22} }
}
%****************************************************************
%* *
%* Useful symbols *
%* *
%****************************************************************
% Semantic brackets
%
% \leftsembrac [[ left semantic bracket
% \rightsembrac ]] right semantic bracket
% \sembrac{x} [[x]] enclose arg in semantic brackets
% \semfun{E}{x} E[[x]] make E curly
%
\newcommand{\leftsembrac}{[\![}
\newcommand{\rightsembrac}{]\!]}
\newcommand{\sembrac}[1]{\leftsembracb#1\rightsembrac}
\newcommand{\semfun}[2]{{\cal #1}\db{#2}\,}
% \plusplus ++ run together
%
\def\plusplus{\mathrel{+\!\!\!+}}
|