% cabiossubmit.sty:   Put all figures at the end with an arrow in the
% margin. Use doublespacing, make a separate captions list, &tc.
%
\input doublespace.sty
%\input endnotes.sty
%\let\footnote=\endnote
%\let\footnotetext=\endnotetext
\input figatend.sty
\let\@@rphnorm=\@normalsize
\def\@normalsize{\@@rphnorm%
\abovedisplayskip \z@ plus2pt minus5pt\belowdisplayskip \abovedisplayskip
\abovedisplayshortskip \z@ plus3pt\belowdisplayshortskip 6pt plus3pt
minus3pt}
% Must be 6mm between lines, minimum
\renewcommand{\baselinestretch}{1.8}
\let\oend=\enddocument
\newbox\captionbox
\def\enddocument{
\newpage
%     \begingroup
%     \parindent 0pt
%     \parskip 2ex
%     \def\enotesize{\normalsize}
%     \theendnotes
%     \endgroup
     \clearpage
     \clearpage
     \section*{Captions}
     \def\baselinestreatch{2}\small\normalsize
     \unvbox\captionbox
     \clearpage
%     \thispagestyle{empty}
%     \section*{Key Phrases}
%     \begin{enumerate}
%     \@keyphrases
%     \end{enumerate}
     \clearpage\oend}
\def\keyphrases#1{\def\@keyphrases{#1}}
\keyphrases{}
\setbox\captionbox\vbox{\hsize \textwidth}
% \def\mcaption#1{\global\setbox\captionbox=\vbox{\unvbox\captionbox\vskip\baselineskip\hbox to \hsize{#1\hfill}}}
\def\mcaption#1{\global\setbox\captionbox=\vbox{\unvbox\captionbox\vskip\baselineskip{#1\hfill}}}
\def\topfraction{0.01}
\def\textfraction{0.99} 
\def\floatpagefraction{0.99}
\def\dbltopfraction{0.01}
\def\dblfloatpagefraction{0.99}
\def\topline{\hrule\vskip 0.5\baselineskip}
\def\bottomline{\vskip \baselineskip\hrule\vskip 2\baselineskip}
\def\fnum@figure{{\bf Fig.~\thefigure.}}
\def\fnum@table{{\bf Table \thetable.}}
\def\thetable{\@Roman\c@table}
\let\@rphendfigure=\endfigure
\let\@rphendtable=\endtable
\def\endtable{\@rphendtable\marginpar{$\leftarrow$Tab \thetable}}
\def\endfigure{\@rphendfigure\marginpar{$\leftarrow$Fig \thefigure}}
\long\def\@makecaption#1#2{
 \vskip 10pt 
 \setbox\@tempboxa\hbox{#1 #2}
  \mcaption{#1 #2}
 \ifdim \wd\@tempboxa >\hsize \unhbox\@tempboxa\par \else \hbox
to\hsize{\hfil\box\@tempboxa\hfil} 
 \fi}
\def\section{\@startsection {section}{1}{\z@}{-2.0ex plus -0.2ex minus 
 -.2ex}{1.3ex plus .2ex}{\large\bf}}
\def\subsection{\@startsection{subsection}{2}{\z@}{-2.0ex plus -0.5ex minus 
 -.2ex}{0.5ex plus .2ex}{\normalsize\bf}}
\def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-3.25ex plus 
-1ex minus -.2ex}{1.5ex plus .2ex}{\normalsize\bf}}
\def\paragraph{\@startsection
 {paragraph}{4}{\z@}{3.25ex plus 1ex minus .2ex}{-1em}{\normalsize\bf}}
\def\subparagraph{\@startsection
 {subparagraph}{4}{\parindent}{3.25ex plus 1ex minus 
 .2ex}{-1em}{\normalsize\bf}}
% Page numbers in top right.
\def\ps@plain{\let\@mkboth\@gobbletwo
     \def\@oddhead{\rm\hfil\thepage}\def\@oddfoot{}\let\@evenhead\@oddhead\let\@evenfoot\@oddfoot}
\ps@plain
