Use longtable for long tables
This commit is contained in:
parent
7a4a7acda8
commit
6b7c2330c9
34
_templates/longtable.tex_t
Normal file
34
_templates/longtable.tex_t
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
\begin{savenotes}\sphinxatlongtablestart\begin{longtable}
|
||||||
|
<%- if table.align in ('center', 'default') -%>
|
||||||
|
[c]
|
||||||
|
<%- elif table.align == 'left' -%>
|
||||||
|
[l]
|
||||||
|
<%- elif table.align == 'right' -%>
|
||||||
|
[r]
|
||||||
|
<%- endif -%>
|
||||||
|
<%= table.get_colspec() %>
|
||||||
|
<%- if table.caption -%>
|
||||||
|
\sphinxthelongtablecaptionisattop
|
||||||
|
\caption{<%= ''.join(table.caption) %>\strut}<%= labels %>\\*[\sphinxlongtablecapskipadjust]
|
||||||
|
\hline
|
||||||
|
<% elif labels -%>
|
||||||
|
\hline\noalign{\phantomsection<%= labels %>}%
|
||||||
|
<% else -%>
|
||||||
|
\hline
|
||||||
|
<% endif -%>
|
||||||
|
<%= ''.join(table.header) %>
|
||||||
|
\endfirsthead
|
||||||
|
|
||||||
|
\multicolumn{<%= table.colcount %>}{c}%
|
||||||
|
{\makebox[0pt]{\sphinxtablecontinued{<%= _('continued from previous page') %>}}}\\
|
||||||
|
\hline
|
||||||
|
<%= ''.join(table.header) %>
|
||||||
|
\endhead
|
||||||
|
|
||||||
|
\hline
|
||||||
|
\multicolumn{<%= table.colcount %>}{r}{\makebox[0pt][r]{\sphinxtablecontinued{<%= _('continues on next page') %>}}}\\
|
||||||
|
\endfoot
|
||||||
|
|
||||||
|
\endlastfoot
|
||||||
|
<%= ''.join(table.body) %>
|
||||||
|
\end{longtable}\sphinxatlongtableend\end{savenotes}
|
@ -10,6 +10,7 @@
|
|||||||
\def\sphinxcrossref#1{#1} % no italicised references
|
\def\sphinxcrossref#1{#1} % no italicised references
|
||||||
\def\sphinxstyleindexentry#1{#1} % no monospaced index entries
|
\def\sphinxstyleindexentry#1{#1} % no monospaced index entries
|
||||||
\def\sphinxstyleindexextra#1{ (#1)} % no italics
|
\def\sphinxstyleindexextra#1{ (#1)} % no italics
|
||||||
|
\def\sphinxtablecontinued#1{{\sffamily\footnotesize #1}} % add footnotesize
|
||||||
|
|
||||||
% Allow line breaks in URLs
|
% Allow line breaks in URLs
|
||||||
\usepackage{seqsplit}
|
\usepackage{seqsplit}
|
||||||
@ -82,7 +83,11 @@
|
|||||||
|
|
||||||
% Fix list spacing in tables
|
% Fix list spacing in tables
|
||||||
\usepackage{enumitem}
|
\usepackage{enumitem}
|
||||||
\def\sphinxattablestart{\par\vskip\dimexpr\sphinxtablepre\relax\setlist[itemize]{leftmargin=2.5ex,before=\vspace*{-1.3em},after=\vspace*{-1.3em}}}
|
\def\table@fixitemize{\setlist[itemize]{leftmargin=2.5ex,before=\vspace*{-1.7em},after=\vspace*{-1.3em}}}
|
||||||
|
\let\orig@sphinxattablestart\sphinxattablestart
|
||||||
|
\def\sphinxattablestart{\orig@sphinxattablestart\table@fixitemize}
|
||||||
|
\let\orig@sphinxatlongtablestart\sphinxatlongtablestart
|
||||||
|
\def\sphinxatlongtablestart{\orig@sphinxatlongtablestart\table@fixitemize}
|
||||||
|
|
||||||
% Override Sphinx title page
|
% Override Sphinx title page
|
||||||
\usepackage[iso]{isodate}
|
\usepackage[iso]{isodate}
|
||||||
|
@ -347,29 +347,32 @@ Customarily, a motion may be amended to:\ [#fn19]_
|
|||||||
|
|
||||||
.. tabularcolumns:: |>{\raggedright}m{0.3\dimexpr\linewidth-4\tabcolsep-3\arrayrulewidth\relax}|p{0.7\dimexpr\linewidth-4\tabcolsep-3\arrayrulewidth\relax}|
|
.. tabularcolumns:: |>{\raggedright}m{0.3\dimexpr\linewidth-4\tabcolsep-3\arrayrulewidth\relax}|p{0.7\dimexpr\linewidth-4\tabcolsep-3\arrayrulewidth\relax}|
|
||||||
|
|
||||||
+------------------------------------------+---------------------------------------------------------------------+
|
.. table::
|
||||||
| Action | Example motions |
|
:class: longtable
|
||||||
+==========================================+=====================================================================+
|
|
||||||
| *omit* (or delete or strike out) words | * That the motion be amended by omitting ‘…’ |
|
+------------------------------------------+---------------------------------------------------------------------+
|
||||||
| | * That the words ‘…’ be omitted |
|
| Action | Example motions |
|
||||||
| | * That ‘…’ be omitted from line X |
|
+==========================================+=====================================================================+
|
||||||
| | * | That the motion be amended as follows: |
|
| *omit* (or delete or strike out) words | * That the motion be amended by omitting ‘…’ |
|
||||||
| | | Omit ‘…’ |
|
| | * That the words ‘…’ be omitted |
|
||||||
+------------------------------------------+---------------------------------------------------------------------+
|
| | * That ‘…’ be omitted from line X |
|
||||||
| *insert* (or add) words\ [#fn21]_ | * That the motion be amended by inserting ‘…’ after ‘…’ |
|
| | * | That the motion be amended as follows: |
|
||||||
| | * That the words ‘…’ be inserted after ‘…’ |
|
| | | Omit ‘…’ |
|
||||||
| | * That ‘…’ be added at the end of the motion |
|
+------------------------------------------+---------------------------------------------------------------------+
|
||||||
| | * | That the motion be amended as follows: |
|
| *insert* (or add) words\ [#fn21]_ | * That the motion be amended by inserting ‘…’ after ‘…’ |
|
||||||
| | | After ‘…’, insert ‘…’ |
|
| | * That the words ‘…’ be inserted after ‘…’ |
|
||||||
+------------------------------------------+---------------------------------------------------------------------+
|
| | * That ‘…’ be added at the end of the motion |
|
||||||
| omit words and *substitute* others\ | * That the motion be amended by omitting ‘…’ and substituting ‘…’ |
|
| | * | That the motion be amended as follows: |
|
||||||
| [#fn22]_ | * That the motion be amended by omitting all words after ‘That’ and |
|
| | | After ‘…’, insert ‘…’ |
|
||||||
| | substituting ‘…’\ [#fn11]_ |
|
+------------------------------------------+---------------------------------------------------------------------+
|
||||||
| | * That the words ‘…’ be omitted and ‘…’ inserted in their place |
|
| omit words and *substitute* others\ | * That the motion be amended by omitting ‘…’ and substituting ‘…’ |
|
||||||
| | * That ‘…’ be substituted for ‘…’\ [#fn12]_ |
|
| [#fn22]_ | * That the motion be amended by omitting all words after ‘That’ and |
|
||||||
| | * | That the motion be amended as follows: |
|
| | substituting ‘…’\ [#fn11]_ |
|
||||||
| | | Omit ‘…’, substitute ‘…’ |
|
| | * That the words ‘…’ be omitted and ‘…’ inserted in their place |
|
||||||
+------------------------------------------+---------------------------------------------------------------------+
|
| | * That ‘…’ be substituted for ‘…’\ [#fn12]_ |
|
||||||
|
| | * | That the motion be amended as follows: |
|
||||||
|
| | | Omit ‘…’, substitute ‘…’ |
|
||||||
|
+------------------------------------------+---------------------------------------------------------------------+
|
||||||
|
|
||||||
The example motions shown above are non-exhaustive, and many other valid forms will be seen in practice – including forms for more complex types of amendment. All should be regarded as acceptable, so long as the intended effect is clear.
|
The example motions shown above are non-exhaustive, and many other valid forms will be seen in practice – including forms for more complex types of amendment. All should be regarded as acceptable, so long as the intended effect is clear.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user