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\sphinxstyleindexentry#1{#1} % no monospaced index entries
|
||||
\def\sphinxstyleindexextra#1{ (#1)} % no italics
|
||||
\def\sphinxtablecontinued#1{{\sffamily\footnotesize #1}} % add footnotesize
|
||||
|
||||
% Allow line breaks in URLs
|
||||
\usepackage{seqsplit}
|
||||
@ -82,7 +83,11 @@
|
||||
|
||||
% Fix list spacing in tables
|
||||
\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
|
||||
\usepackage[iso]{isodate}
|
||||
|
@ -347,6 +347,9 @@ 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}|
|
||||
|
||||
.. table::
|
||||
:class: longtable
|
||||
|
||||
+------------------------------------------+---------------------------------------------------------------------+
|
||||
| Action | Example motions |
|
||||
+==========================================+=====================================================================+
|
||||
|
Loading…
Reference in New Issue
Block a user