-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcdsty.sty
132 lines (96 loc) · 4.31 KB
/
cdsty.sty
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
%%% A modification of fpstd.sty appropriate for this book.
%%% Modifications are noted with %-cd
%%% Modifications for article
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Environment and Miscellaneous
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\let\um=\"
\newcommand{\horizline}{{\rule{\textwidth}{0.4pt}}}
\newenvironment{dfigure*}{\begin{figure*}[tb]\horizline}{\par\vskip-\parskip
\horizline\end{figure*}}
\newenvironment{symbolfootnotes}{\def\thefootnote{\fnsymbol{footnote}}}{}
% \def\endproofbox{\vbox{\hrule\hbox{\vrule
% \hbox to 6pt{\hfil\vbox to 6pt{\vfil}}\vrule}\hrule}}
\def\endproofbox{$\Box$}
% Refined proof environment
\def\deflabel#1{{\rm (}{\em #1\/}{\rm )}}
%\newtheorem{@exercise}{Exercise}[section]
%\newenvironment{exercise}{\begin{@exercise}\rm}{\end{@exercise}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Editorials
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\long\def\ednote#1{\footnote{[{\it #1\/}]}\message{ednote!}}
% \long\def\note#1{\begin{quote}[{\it #1\/}]\end{quote}\message{note!}}
\newenvironment{metanote}{\begin{quote}\message{note!}[\begingroup\it}%
{\endgroup]\end{quote}}
\long\def\ignore#1{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Typesetting Deductions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newbox\tempa
\newbox\tempb
\newdimen\tempc
\newbox\tempd
\def\mud#1{\hfil $\displaystyle{#1}$\hfil}
\def\rig#1{\hfil $\displaystyle{#1}$}
\def\inruleanhelp#1#2#3{\setbox\tempa=\hbox{$\displaystyle{\mathstrut #2}$}%
\setbox\tempd=\hbox{$\; #3$}%
\setbox\tempb=\vbox{\halign{##\cr
\mud{#1}\cr
\noalign{\vskip\the\lineskip}%
\noalign{\hrule height 0pt}%
\rig{\vbox to 0pt{\vss\hbox to 0pt{\copy\tempd \hss}\vss}}\cr
\noalign{\hrule}%
\noalign{\vskip\the\lineskip}%
\mud{\copy\tempa}\cr}}%
\tempc=\wd\tempb
\advance\tempc by \wd\tempa
\divide\tempc by 2 }
\def\inrulean#1#2#3{{\inruleanhelp{#1}{#2}{#3}%
\hbox to \wd\tempa{\hss \box\tempb \hss}}}
\def\inrulebn#1#2#3#4{\inrulean{#1\quad\qquad #2}{#3}{#4}}
\def\ian#1#2#3{{\lineskip 4pt\inrulean{#1}{#2}{#3}}}
\def\ibn#1#2#3#4{{\lineskip 4pt\inrulebn{#1}{#2}{#3}{#4}}}
\def\lowerhalf#1{\hbox{\raise -0.8\baselineskip\hbox{#1}}}
\def\ianc#1#2#3{{\lineskip 4pt\lowerhalf{\inruleanhelp{#1}{#2}{#3}%
\box\tempb\hskip\wd\tempd}}}
\def\ibnc#1#2#3#4{{\lineskip 4pt\ianc{#1\quad\qquad #2}{#3}{#4}}}
\def\icnc#1#2#3#4#5{{\lineskip 4pt\ibnc{#1\quad\qquad #2}{#3}{#4}{#5}}}
\def\rulespacing{\renewcommand{\arraystretch}{3} \arraycolsep 5em}
\def\rulestretch{\renewcommand{\arraystretch}{3}}
\def\above#1#2{\begin{array}[b]{c}\relax #1\\ \relax #2\end{array}}
\def\abovec#1#2{\begin{array}{c}\relax #1\\ \relax #2\end{array}}
\def\cian#1#2#3{\ctr{\ianc{#1}{#2}{#3}}}
\def\cibn#1#2#3#4{\ctr{\ibnc{#1}{#2}{#3}{#4}}}
\def\hypo#1#2{\begin{array}[b]{c}\relax #1\\ \vdots \\ \relax #2\end{array}}
\def\hypoc#1#2{\begin{array}{c}\relax #1\\ \vdots \\ \relax #2\end{array}}
\def\hypol#1#2#3{\begin{array}[b]{c}\relax #1\\ #2 \\ \relax #3\end{array}}
\def\hypolc#1#2#3{\begin{array}{c}\relax #1\\ #2 \\ \relax #3\end{array}}
\def\ctr#1{\begin{array}{c} #1\end{array}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Common abbreviations
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\bnfas{\mathrel{::=}}
\def\bnfalt{\mid}
\def\lam{\lambda}
\def\Lam{\Lambda}
\def\arrow{\rightarrow}
\def\oftp{\mathord{:}}
\def\hastype{\mathrel{:}}
\def\ldot{\mathord{.}\;}
\def\ldott{\mathrel{.}}
\def\oftpp{\mathrel{:}}
\def\dot{\cdot}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Judgments
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\vd{\null\mathrel{\vdash}}
\def\gvd{\Gamma \vd}
\def\th{\null\mathrel{\vdash\!\!\!\vdash}}
\def\gth{\Gamma \th}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Code
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\ttuscore{{\tt\char`\_}}
\def\ttlbrace{{\tt\char`\{}}
\def\ttrbrace{{\tt\char`\}}}