]> gitweb.michael.orlitzky.com - mjotex.git/blob - mjo-algorithm.tex
Wrap all mjotex files in conditionals to prevent double-loading.
[mjotex.git] / mjo-algorithm.tex
1 %
2 % Good looking algorithm environments.
3 %
4 \ifx\havemjoalgorithm\undefined
5 \def\havemjoalgorithm{1}
6
7
8 % algorithmicx, for the, uh, algorithms.
9 \usepackage{algpseudocode}
10
11 % Rename ``require'' and ``ensure'' to ``input'' and ``output''
12 % respectively.
13 \renewcommand{\algorithmicrequire}{\textbf{Input:}}
14 \renewcommand{\algorithmicensure}{\textbf{Output:}}
15
16 % This just gives us the floating ``algorithm'' environment.
17 \usepackage{algorithm}
18
19 \algrenewcommand{\algorithmiccomment}[1]{/\!/ {#1}}
20
21
22 \fi