%
%  Bibliography and Footnote hacks
%
%  Andrew Marc Greene
%
\newcount\Source \Source=0
%
\def\newsource#1#2#3{%  \newsource{code}{short_form}{long_form}
\global\advance\Source by 1
\expandafter\xdef\csname NUM.#1\endcsname{\the\Source}
\expandafter\gdef\csname SHORT.#1\endcsname{#2}%
\expandafter\gdef\csname LONG.#1\endcsname{#3}%
\expandafter\gdef\csname #1\endcsname{\cite{#1}}}
%
\def\CITELAST{0}
%
\def\cite#1{%  does a footnote citation
\xdef\CITETEST{\csname NUM.#1\endcsname}%
\ifnum\CITELAST=\CITETEST%
{\it Ibid.}\else%
\xdef\CITELAST{\csname NUM.#1\endcsname}%
\csname LONG.#1\endcsname%
\expandafter\gdef\csname LONG.#1\endcsname{\csname SHORT.#1\endcsname}\fi}
