% "environ.tex" contains LaTeX environments and related macros.  Use the last
% set of commands to actually create tables ("tinvrule", "tabarg"s,
% "cameratable", "cameracont", and "cameraend".
%
% Written by Michael R. Greason, Hughes STX, 22 January 1993.
%
%	Environment definitions and related commands.  These
%	environments are for defining AAS camera-ready tables.
%
%		The arguments for stdtable and stdendcont:
%			1 : The number of columns in the table.
%			2 : The "tabular" column format, in the normal 
%			    LaTeX table format (a series of l's, r's,
%			    and c's).
%			3 : The first of two title lines.  Just the text.
%			    stdendcont adds a " (cont.)" to this string.
%			4 : The second of two title lines.  Just the text.
%			5 : The column header line.  Embed the tab (&)
%			    characters just as if you were defining the
%			    table "normally."
%			6 : A line, with embedded tabs, containing a line that
%			    defines the maximum widths of each column.  It is
%			    recommended that this line have a negative height,
%			    so that it is invisible.  It is inserted just
%			    before the first title, but after the lines.
%		The environment (stdtable) sets up and finishs a page's
%		worth of table.  You have to break the table up
%		yourself.  The command (stdendcont) combines the end of
%		the previous table with the start of the next
%		continuation of that table.  This command allows the
%		user to move the end of a table around, trying to find
%		the best page break, by moving only a single line.
%		Note that you will still need to provide an
%		\end{stdtable} of the appropriate sort for the last
%		table when finished.
%
%		tinvrule defines a rule of negative height (-0.001pt).  The
%		argument is the width of the rule.  Created for use with
%		stdtable argument 6.
%
%		The "tabarg"s commands are used to simplify the creation of a
%		table.  The user is intended to redefine these commands with
%		their own arguments.
%			"tabarga" = "stdtable" argument 1
%			"tabargb" = "stdtable" argument 2
%			"tabargc" = "stdtable" argument 3
%			"tabargd" = "stdtable" argument 4
%			"tabarge" = "stdtable" argument 5
%			"tabargf" = "stdtable" argument 6
%
%		The "cameratable" command initializes a table.  It begins a
%		"stdtable" environment, supplying the "tabarg"s as the
%		"stdtable" arguments.
%
%		The "cameracont" command terminates the current page's table
%		and initializes the next, using the "stdendcont" command
%		supplied with the "tabarg"s as arguments.
%
%		The "cameraend" command terminates the last table, issuing a
%		"\end{stdtable}". 
%
%			The "stdtable" environment.
%
\newenvironment{stdtable}[6]{
%
%				The begin command-set.
%
\begin{tabular}{#2}
\tableline\tableline
#6\\[-9pt]			% The [-9pt] kills most of the strut.
\multicolumn{#1}{c}{#3}\\
\multicolumn{#1}{c}{#4}\\
#5\\
\tableline
}{
%
%				The end command-set.
%
\end{tabular}
}
%
%				The "stdendcont" command.
%
\newcommand{\stdendcont}[6]{\end{stdtable}\clearpage
\begin{stdtable}{#1}{#2}{#3\ (cont.)}{#4}{#5}{#6}}
%
%				The "tinvrule" command.
%
\newcommand{\tinvrule}[1]{\vrule width#1 height-0.001pt depth0.0pt}
%
%			The "tabarg"s commands are used to simplify the
%			creation of a table.  The user is intended to redefine
%			these commands with their own arguments.  
%				"tabarga" = "stdtable" argument 1
%				"tabargb" = "stdtable" argument 2
%				"tabargc" = "stdtable" argument 3
%				"tabargd" = "stdtable" argument 4
%				"tabarge" = "stdtable" argument 5
%				"tabargf" = "stdtable" argument 6
%
\newcommand{\tabarga}{\ }
\newcommand{\tabargb}{\ }
\newcommand{\tabargc}{\ }
\newcommand{\tabargd}{\ }
\newcommand{\tabarge}{\ }
\newcommand{\tabargf}{\ }
%
%			The "cameratable" command initializes a table.  It
%			begins a "stdtable" environment, supplying the
%			"tabarg"s as the "stdtable" arguments.
%
\newcommand{\cameratable}{%
\begin{stdtable}{\tabarga}{\tabargb}{\tabargc}{\tabargd}{\tabarge}{\tabargf}}
%
%			The "cameracont" command terminates the current page's
%			table and initializes the next, using the "stdendcont"
%			command supplied with the "tabarg"s as arguments.
%
\newcommand{\cameracont}{\stdendcont{\tabarga}{\tabargb}{\tabargc}%
{\tabargd}{\tabarge}{\tabargf}}
%
%			The "cameraend" command.
%
\newcommand{\cameraend}{\end{stdtable}}

