blob: 90d74d4d0046faf09f4a253fdf3746e63cf282f4 (
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
|
%% BEGIN tvz-hax.sty
%% 93/03/03
%% These are some lousy hacks for typesetting the code
%% and User's Guide in the Seminar and PSTricks packages.
%%
%% Tim Van Zandt tvz@Princeton.EDU
\def\ds@a4{\def\paperwidth{210mm}\def\paperheight{297mm}}
\input article.sty
\input fancybox.sty % Version 0.93 or later.
\def\arraystretch{1.2}
\hfuzz 1pt
\def\twosideclearpage{%
\clearpage
\if@twoside
\ifodd\c@page\else
\thispagestyle{empty}%
\null\leavevmode
\clearpage
\fi
\fi}
% Just in case I'm using AmS-LaTeX.
\def\makeatother{\catcode`\@=12\relax}
%%%%%%%%%%%%%%%%% LOGOS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
\def\AmS{{\protect\the\textfont\tw@
A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}}
\def\b@LaTeX{%
\begingroup
\csname reset@font\endcsname
\rm\bf
L\kern-.32em
\raise.36ex\hbox{%
\ifx\@currsize\Huge\LARGE\else
\ifx\@currsize\huge\Large\else
\ifx\@currsize\LARGE\large\else
\ifx\@currsize\Large\normalsize\else
\ifx\@currsize\large\small\else
\ifx\@currsize\normalsize\footnotesize\else
\ifx\@currsize\small\scriptsize\else
\ifx\@currsize\footnotesize\scriptscriptsize
\fi\fi\fi\fi\fi\fi\fi\fi
\bf A}%
\kern-.15em
T\kern-.1667em
\lower.7ex\hbox{E}\kern-.125em
X%
\endgroup}
\def\bLaTeX{\b@LaTeX}
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%% PAGE STYLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Headings:
\def\ps@docheadings{%
\let\@mkboth\markboth
\def\@oddhead{}%
\let\@evenhead\@oddhead%
\def\@oddfoot{%
\small\sf
\rightmark
\hfil
\thepage}%
\def\@evenfoot{%
\small\sf
\thepage
\hfil
\theheadertitle}%
\def\sectionmark##1{\markright {##1}}}%
\pagestyle{docheadings}
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%% Table of Contents %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Tight up spacing in TOC:
%%
\newskip\tempskip
\def\TOCshrink{.5}
\def\TableOfContents{%
\begin{quote}
\begin{center} \Large\bf Contents \end{center}
\def\numberline##1{\hbox to 0pt{\hss##1\hskip 1em}}%
\let\oldaddvspace\addvspace
\def\addvspace##1{%
\tempskip##1\relax
\oldaddvspace{\TOCshrink\tempskip}}
\@starttoc{toc}%
\end{quote}}
\def\tableofcontents{%
\clearpage
\markright{Table of contents}%
\TableOfContents
\clearpage}
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%% dates %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% This expands the date, as defined in \filedate.
%%
\def\expanddate#1/#2/#3/{%
\number#3{}
\month=#2
\ifcase\month\or
January \or February \or March \or April \or May \or June \or
July \or August \or September \or October \or November \or December
\fi
19#1}
\def\thefiledate{\expandafter\expanddate\filedate/}
\date{\thefiledate}
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%% code and examples %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% This is an environment for putting samples of code. It is like
%% a variant of \begin{quote}\tt ... \end{quote}. It is NOT verbatim.
%%
\def\NotNested{\def\begin##1{%
\@latexerr{Bad nesting of environments.
Perhaps missing \end{\@currenvir}}\@eha
\end{\@currenvir}%
\begin{##1}}}
\def\endEx{\endlist}
\def\Ex{%
\NotNested
\list{}{}\item[]%
\if@minipage\else\vskip\parskip\fi
\leftskip\@totalleftmargin
\rightskip\z@
\parindent\z@
\parskip\z@
\parfillskip\@flushglue
\hfuzz 1pt
\@@par
\global\@inlabelfalse}
\def\endEx{\endlist}
%%
%% Various things to make it easier to write code and examples:
%%
\begingroup
\catcode`\{=12 \catcode`\}=12
\catcode`\(=1 \catcode`\)=2
\catcode`\+=0 \catcode`\\=12
+gdef+|(\) % \| = character \
+gdef+{({) % \{ = character {
+gdef+}(}) % \} = character }
+endgroup
\def\Backslash{\protect\|}
%%
%% Define some functional font commands:
%%
\def\MainFont{\tt} % For macro definitions.
\def\UsageFont{\tt} % For in-line macro names.
\def\InlineFont{\tt} % For other in-line snipets of code.
\def\DisplayFont{\tt} % For displayed code.
\def\MetaFont{\sl} % For meta arguments.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\endinput
%% END tvz-hax.sty
|