Add new environments: longtableii, longtableiii, and longtableiv, to
support long tables which might break across page boundaries. Otherwise identical to tableii, tableiii, and tableiv.
This commit is contained in:
parent
2964268db5
commit
da72b93a01
|
@ -780,13 +780,23 @@ distribution, to create or maintain whole documents or sections.
|
|||
matches the \var{cols} value of the corresponding table
|
||||
environment. These are supported for \var{cols} values of
|
||||
\code{ii}, \code{iii}, and \code{iv}. These environments are all
|
||||
built on top of the \env{tabular} environment.
|
||||
built on top of the \env{tabular} environment. Variants based on
|
||||
the \env{longtable} environment are also provided.
|
||||
|
||||
Note that all tables in the standard Python documentation use
|
||||
vertical lines between columns, and this must be specified in the
|
||||
markup for each table. A general border around the outside of the
|
||||
table is not used, but would be the responsibility of the
|
||||
processor.
|
||||
processor; the document markup should not include an exterior
|
||||
border.
|
||||
|
||||
The \env{longtable}-based variants of the table environments are
|
||||
formatted with extra space before and after, so should only be
|
||||
used on tables which are long enough that splitting over multiple
|
||||
pages is reasonable; tables with fewer than twenty rows should
|
||||
never by marked using the long flavors of the table environments.
|
||||
The header row is repeated across the top of each part of the
|
||||
table.
|
||||
|
||||
\begin{envdesc}{tableii}{\p{colspec}\p{col1font}\p{heading1}\p{heading2}}
|
||||
Create a two-column table using the \LaTeX{} column specifier
|
||||
|
@ -802,8 +812,15 @@ distribution, to create or maintain whole documents or sections.
|
|||
\var{heading2}.
|
||||
\end{envdesc}
|
||||
|
||||
\begin{envdesc}{longtableii}{\unspecified}
|
||||
Like \env{tableii}, but produces a table which may be broken
|
||||
across page boundaries. The parameters are the same as for
|
||||
\env{tableii}.
|
||||
\end{envdesc}
|
||||
|
||||
\begin{macrodesc}{lineii}{\p{column1}\p{column2}}
|
||||
Create a single table row within a \env{tableii} environment.
|
||||
Create a single table row within a \env{tableii} or
|
||||
\env{longtableii} environment.
|
||||
The text for the first column will be generated by applying the
|
||||
macro named by the \var{col1font} value when the \env{tableii}
|
||||
was opened.
|
||||
|
@ -814,6 +831,12 @@ distribution, to create or maintain whole documents or sections.
|
|||
The heading for the third column is given by \var{heading3}.
|
||||
\end{envdesc}
|
||||
|
||||
\begin{envdesc}{longtableiii}{\unspecified}
|
||||
Like \env{tableiii}, but produces a table which may be broken
|
||||
across page boundaries. The parameters are the same as for
|
||||
\env{tableiii}.
|
||||
\end{envdesc}
|
||||
|
||||
\begin{macrodesc}{lineiii}{\p{column1}\p{column2}\p{column3}}
|
||||
Like the \macro{lineii} macro, but with a third column. The
|
||||
text for the third column is given by \var{column3}.
|
||||
|
@ -824,6 +847,12 @@ distribution, to create or maintain whole documents or sections.
|
|||
The heading for the fourth column is given by \var{heading4}.
|
||||
\end{envdesc}
|
||||
|
||||
\begin{envdesc}{longtableiv}{\unspecified}
|
||||
Like \env{tableiv}, but produces a table which may be broken
|
||||
across page boundaries. The parameters are the same as for
|
||||
\env{tableiv}.
|
||||
\end{envdesc}
|
||||
|
||||
\begin{macrodesc}{lineiv}{\p{column1}\p{column2}\p{column3}\p{column4}}
|
||||
Like the \macro{lineiii} macro, but with a fourth column. The
|
||||
text for the fourth column is given by \var{column4}.
|
||||
|
|
|
@ -1064,6 +1064,10 @@ sub do_env_tableii{
|
|||
. "\n</table>";
|
||||
}
|
||||
|
||||
sub do_env_longtableii{
|
||||
return do_env_tableii(@_);
|
||||
}
|
||||
|
||||
sub do_cmd_lineii{
|
||||
local($_) = @_;
|
||||
my $aligns = next_optional_argument();
|
||||
|
@ -1108,6 +1112,10 @@ sub do_env_tableiii{
|
|||
. "\n</table>";
|
||||
}
|
||||
|
||||
sub do_env_longtableiii{
|
||||
return do_env_tableiii(@_);
|
||||
}
|
||||
|
||||
sub do_cmd_lineiii{
|
||||
local($_) = @_;
|
||||
my $aligns = next_optional_argument();
|
||||
|
@ -1157,6 +1165,10 @@ sub do_env_tableiv{
|
|||
. "\n</table>";
|
||||
}
|
||||
|
||||
sub do_env_longtableiv{
|
||||
return do_env_tableiv(@_);
|
||||
}
|
||||
|
||||
sub do_cmd_lineiv{
|
||||
local($_) = @_;
|
||||
my $aligns = next_optional_argument();
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
\ProvidesPackage{python}
|
||||
[1998/01/11 LaTeX package (Python markup)]
|
||||
|
||||
\RequirePackage{longtable}
|
||||
|
||||
% Uncomment these two lines to ignore the paper size and make the page
|
||||
% size more like a typical published manual.
|
||||
%\renewcommand{\paperheight}{9in}
|
||||
|
@ -864,31 +866,62 @@
|
|||
\newenvironment{tableii}[4]{%
|
||||
\begin{center}%
|
||||
\def\lineii##1##2{\csname#2\endcsname{##1}&##2\\}%
|
||||
\begin{tabular}{#1}\strong{#3}&\strong{#4} \\ \hline%
|
||||
\begin{tabular}{#1}\strong{#3}&\strong{#4} \\* \hline\hline%
|
||||
}{%
|
||||
\end{tabular}%
|
||||
\end{center}%
|
||||
}
|
||||
|
||||
\newenvironment{longtableii}[4]{%
|
||||
\begin{center}%
|
||||
\def\lineii##1##2{\csname#2\endcsname{##1}&##2\\}%
|
||||
\begin{longtable}[c]{#1}\strong{#3}&\strong{#4} \\* \hline\hline\endhead%
|
||||
}{%
|
||||
\end{longtable}%
|
||||
\end{center}%
|
||||
}
|
||||
|
||||
\newenvironment{tableiii}[5]{%
|
||||
\begin{center}%
|
||||
\def\lineiii##1##2##3{\csname#2\endcsname{##1}&##2&##3\\}%
|
||||
\begin{tabular}{#1}\strong{#3}&\strong{#4}&\strong{#5} \\ \hline%
|
||||
\begin{tabular}{#1}\strong{#3}&\strong{#4}&\strong{#5} \\%
|
||||
\hline\hline%
|
||||
}{%
|
||||
\end{tabular}%
|
||||
\end{center}%
|
||||
}
|
||||
|
||||
\newenvironment{longtableiii}[5]{%
|
||||
\begin{center}%
|
||||
\def\lineiii##1##2##3{\csname#2\endcsname{##1}&##2&##3\\}%
|
||||
\begin{longtable}[c]{#1}\strong{#3}&\strong{#4}&\strong{#5} \\%
|
||||
\hline\hline\endhead%
|
||||
}{%
|
||||
\end{longtable}%
|
||||
\end{center}%
|
||||
}
|
||||
|
||||
\newenvironment{tableiv}[6]{%
|
||||
\begin{center}%
|
||||
\def\lineiv##1##2##3##4{\csname#2\endcsname{##1}&##2&##3&##4\\}%
|
||||
\begin{tabular}{#1}\strong{#3}&\strong{#4}&\strong{#5}&\strong{#6} \\%
|
||||
\hline%
|
||||
\hline\hline%
|
||||
}{%
|
||||
\end{tabular}%
|
||||
\end{center}%
|
||||
}
|
||||
|
||||
\newenvironment{longtableiv}[6]{%
|
||||
\begin{center}%
|
||||
\def\lineiv##1##2##3##4{\csname#2\endcsname{##1}&##2&##3&##4\\}%
|
||||
\begin{longtable}[c]{#1}\strong{#3}&\strong{#4}&\strong{#5}&\strong{#6}%
|
||||
\\%
|
||||
\hline\hline\endhead%
|
||||
}{%
|
||||
\end{longtable}%
|
||||
\end{center}%
|
||||
}
|
||||
|
||||
% Cross-referencing (AMK, new impl. FLD)
|
||||
% Sample usage:
|
||||
% \begin{seealso}
|
||||
|
|
Loading…
Reference in New Issue