Commit | Line | Data |
---|---|---|
46d528a4 MW |
1 | \ProvidesClass{tables} |
2 | ||
3 | \PassOptionsToClass | |
4 | {8pt, a4paper, article, nonumbering, nooffsetpages} | |
5 | {strayman} | |
6 | \LoadClass{strayman} | |
7 | \RequirePackage{dnd} | |
8 | ||
9 | %%% page layout | |
10 | \textheight = \paperheight \advance\textheight by -2in | |
11 | \headsep = 0pt \headheight = 0pt | |
12 | \footskip = 20pt | |
13 | \fancypagestyle{foots}{% | |
14 | \fancyhf{}% | |
15 | \fancyfoot[RE, RO]{\itshape\small \sectname\ \thepage/\thepagemax}% | |
16 | } | |
17 | \pagestyle{foots} | |
18 | ||
4005b342 MW |
19 | \newcount\sectcount |
20 | \sectcount = 0 | |
21 | \def\thepagemax{\pageref{pgn:\the\sectcount}} | |
46d528a4 | 22 | \def\sect#1{% |
4005b342 | 23 | \label{pgn:\the\sectcount}% |
46d528a4 MW |
24 | \newpage\section{#1}% |
25 | \gdef\sectname{#1}% | |
4005b342 MW |
26 | \global\advance\sectcount\@ne% |
27 | \global\count0\@ne% | |
46d528a4 | 28 | } |
4005b342 | 29 | \AtEndDocument{\label{pgn:\the\sectcount}} |
46d528a4 MW |
30 | |
31 | %%% tables | |
32 | \tabcolsep = 0.5em | |
33 | ||
34 | %%% orders of events | |
35 | \newcount\itemcount \newcount\levelcount | |
36 | ||
37 | \newenvironment{order}[1]{% | |
38 | \global\itemcount=0% | |
39 | \def\item{\global\advance\itemcount by1\relax\the\itemcount.&} | |
40 | \begin{tabular}{rl} \hlx*{hv} | |
41 | \tt{#1} \\ \hlx{vhv} | |
42 | }{% | |
43 | \hlx*{vh} \end{tabular}% | |
44 | } | |
45 | ||
46 | \newenvironment{order*}[1]{% | |
47 | \def\item{$\bullet$&} | |
48 | \begin{tabular}{rl} \hlx*{hv} | |
49 | \tt{#1} \\ \hlx{vhv} | |
50 | }{% | |
51 | \hlx*{vh} \end{tabular}% | |
52 | } | |
53 | ||
4005b342 MW |
54 | \def\swimming{\unskip\penalty100/\ignorespaces} |
55 | \def\flying{\unskip\penalty100/$\!\!\!$/\ignorespaces} | |
56 | ||
46d528a4 MW |
57 | %%% table sets |
58 | \def\col{\vbox\bgroup\halign\bgroup\hfil\ignorespaces##\unskip\hfil\cr} | |
59 | \def\endcol{\crcr\egroup\egroup} | |
60 | \def\row{\hbox to\hsize\bgroup\valign\bgroup\vskip\topglue@\centering\hbox{##}\vskip\botglue@\cr\noalign{\hfil}\col} | |
61 | \def\endrow{\endcol\cr\noalign{\hfil}\egroup\egroup} | |
62 | \def\rowgap{\endcol\cr\noalign{\hskip1em plus1fil}\col} | |
63 | \def\colgap{\cr\noalign{\medskip}} | |
64 | \def\line{\endrow\medskip\row} | |
65 | \def\set{\@ifnextchar[\set@{\set@[c]}} | |
4005b342 MW |
66 | \newskip\topglue@ |
67 | \newskip\botglue@ | |
46d528a4 MW |
68 | \def\set@[#1]{\topglue@0ptplus1fil\botglue@0ptplus1fil\ifx |
69 | b#1\botglue@\z@\else\ifx t#1\topglue@\z@\fi\fi\vspace\bigskipamount\vbox\bgroup\row} | |
70 | \def\endset{\endrow\egroup} | |
71 |