2014-05-08 12:08:01 -04:00
|
|
|
% LoVullo rater specification rate tables
|
|
|
|
%%
|
|
|
|
|
|
|
|
\NeedsTeXFormat{LaTeX2e}
|
|
|
|
\ProvidesClass{raterspec/rates}
|
|
|
|
\ProcessOptions\relax
|
|
|
|
|
|
|
|
|
2014-05-16 12:20:51 -04:00
|
|
|
\def\var#1{{\tt#1}}%
|
|
|
|
\def\locvar#1{\var{#1}_\loc}
|
|
|
|
\def\tlookup#1#2{\ArgSty{#2 from} \tref{#1}}%
|
|
|
|
\def\tlookupf#1#2{\tlookup{#1}{#2} \ArgSty{or fail in error}}%
|
|
|
|
|
|
|
|
|
2014-05-08 12:08:01 -04:00
|
|
|
\newenvironment{ratetable*}[5][]%
|
|
|
|
{%
|
|
|
|
\def\@@lotcaption{#1}
|
|
|
|
\def\@@label{#2}
|
|
|
|
\def\@@caption{#3}
|
|
|
|
\ifx\@@lotcaption\empty
|
|
|
|
\let\@@lotcaption\@@caption
|
|
|
|
\fi
|
|
|
|
\begin{table}[#5]
|
|
|
|
\caption[\@@lotcaption]{\@@caption}
|
|
|
|
\label{t:\@@label}
|
|
|
|
\centering\footnotesize\sf
|
|
|
|
\hspace*{-\marginparwidth}%
|
|
|
|
\begin{tabular}{#4}
|
|
|
|
\toprule
|
|
|
|
}
|
|
|
|
{%
|
|
|
|
\bottomrule
|
|
|
|
\end{tabular}
|
|
|
|
\hspace*{-\marginparwidth}%
|
|
|
|
\medskip
|
|
|
|
\end{table}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
% simplified syntax where a rate table should always appear on a page of floats
|
|
|
|
% (which is often the case, since many rate tables tend to be within close
|
|
|
|
% proximity to one-another)
|
|
|
|
\newenvironment{ratetable}[4][]%
|
|
|
|
{%
|
|
|
|
\begin{ratetable*}[#1]{#2}{#3}{#4}{p}%
|
|
|
|
}%
|
|
|
|
{%
|
|
|
|
\end{ratetable*}%
|
|
|
|
}
|
|
|
|
|