OLD | NEW |
(Empty) | |
| 1 %%% Cascaded items for math mode |
| 2 %% start with \begin{cascade} |
| 3 %% new line at previous indentation with \cascline |
| 4 %% new line with greater indentation with \cascitem |
| 5 %% end with \end{cascade} |
| 6 %% default indentation is 2em, adjust with \cascadeindent |
| 7 \newdimen\cascadeindent |
| 8 \cascadeindent=1em\newdimen\cascdimen |
| 9 \newcommand{\cascindent}{\global\advance\cascdimen by\cascadeindent \hspace{\cas
cdimen}} |
| 10 \newcommand{\cascitem}{\\ \global\advance\cascdimen by\cascadeindent \hspace{\ca
scdimen}} |
| 11 \newcommand{\cascback}[1]{\\ \global\advance\cascdimen by-#1.0\cascadeindent \hs
pace{\cascdimen}} |
| 12 \newcommand{\cascline}{\\ \hspace{\cascdimen}} |
| 13 \newenvironment{cascade}{\begin{array}[t]{@{}l@{}} \global\cascdimen=0em}{\end{a
rray}} |
| 14 |
| 15 |
| 16 %%% Binding colon stuff |
| 17 \mathchardef\col="003A % \col for binding colon (mathcode ordinary: less space) |
| 18 \mathchardef\semi="603B % \semi for (regular) semicolon |
| 19 %% use \semicolonforbindingcolon to redefine ; to stand for binding colon |
| 20 \newcommand{\semicolonforbindingcolon}{\mathcode`;="003A} |
| 21 |
| 22 %%% Angle bracket stuff |
| 23 \mathchardef\lt="313C % \lt for < |
| 24 \mathchardef\gt="313E % \gt for > |
| 25 %% use \ltgtforanglebrackets to redefine <,> to stand for \langle, \rangle |
| 26 \newcommand{\ltgtforanglebrackets}{\mathcode`<="4268 \mathcode`>="5269} |
| 27 |
| 28 \newcommand{\kwop}[1]{\ensuremath{\mathop{\mathbf{#1}}}} |
| 29 \newcommand{\kwbin}[1]{\ensuremath{\mathbin{\mathbf{#1}}}} |
| 30 \newcommand{\kw}[1]{\ensuremath{\mathord{\mathbf{#1}}}} |
| 31 |
| 32 \newcommand{\comment}[1]{\hfill \fbox{\Large{#1}}} |
| 33 |
| 34 %\newcommand{\qed}{\rule{5pt}{8pt}} |
| 35 \newcommand{\thmbox} |
| 36 {{\ \hfill\hbox{% |
| 37 \vrule width1.0ex height1.0ex |
| 38 }\parfillskip 0pt}} |
| 39 |
| 40 \newenvironment{proof}{{\textbf{Proof:} }}{\thmbox} |
| 41 \newenvironment{proofsketch}{{\textbf{Proof (Sketch):} }}{\thmbox} |
| 42 |
| 43 \newcommand{\thmstep}[2]{ |
| 44 \noindent\begin{tabular}{@{}l@{}l} |
| 45 \lefteqn{\mbox{#1}} &\\ |
| 46 \mbox{ } & $\begin{array}{l}#2\end{array}$ |
| 47 \end{tabular} |
| 48 } |
| 49 |
| 50 \newcommand{\thmstepp}[2]{ |
| 51 \noindent\begin{tabular}{lll} |
| 52 \lefteqn{\mbox{#1}} &\\ |
| 53 \mbox{ } & #2 |
| 54 \end{tabular} |
| 55 } |
| 56 |
| 57 \newcommand{\ifthenthm}[2]{ |
| 58 \noindent\begin{tabular}[t]{@{}l@{}l} |
| 59 If & \\ |
| 60 & $\begin{array}[t]{l}#1\end{array}$ \\ |
| 61 then & \\ |
| 62 & $\begin{array}[t]{l}#2\end{array}$ |
| 63 \end{tabular} |
| 64 } |
OLD | NEW |