mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #2308: Define `\tablecontinued
` macro to redefine the style of continued label for longtables
This commit is contained in:
parent
774927c90c
commit
d9be95a6d3
2
CHANGES
2
CHANGES
@ -6,6 +6,8 @@ Incompatible changes
|
||||
|
||||
Features added
|
||||
--------------
|
||||
* #2308: Define ``\tablecontinued`` macro to redefine the style of continued label for
|
||||
longtables.
|
||||
|
||||
Bugs fixed
|
||||
----------
|
||||
|
@ -145,6 +145,7 @@
|
||||
\newcommand{\code}[1]{\texttt{#1}}
|
||||
\newcommand{\bfcode}[1]{\code{\bfseries#1}}
|
||||
\newcommand{\email}[1]{\textsf{#1}}
|
||||
\newcommand{\tablecontinued}[1]{\textsf{#1}}
|
||||
|
||||
% Redefine the Verbatim environment to allow border and background colors.
|
||||
% The original environment is still used for verbatims within tables.
|
||||
|
@ -1006,12 +1006,12 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
self.body.extend(self.tableheaders)
|
||||
self.body.append('\\endfirsthead\n\n')
|
||||
self.body.append('\\multicolumn{%s}{c}%%\n' % self.table.colcount)
|
||||
self.body.append(r'{{\textsf{\tablename\ \thetable{} -- %s}}} \\'
|
||||
self.body.append(r'{{\tablecontinued{\tablename\ \thetable{} -- %s}}} \\'
|
||||
% _('continued from previous page'))
|
||||
self.body.append('\n\\hline\n')
|
||||
self.body.extend(self.tableheaders)
|
||||
self.body.append('\\endhead\n\n')
|
||||
self.body.append(r'\hline \multicolumn{%s}{|r|}{{\textsf{%s}}} \\ \hline'
|
||||
self.body.append(r'\hline \multicolumn{%s}{|r|}{{\tablecontinued{%s}}} \\ \hline'
|
||||
% (self.table.colcount,
|
||||
_('Continued on next page')))
|
||||
self.body.append('\n\\endfoot\n\n')
|
||||
|
Loading…
Reference in New Issue
Block a user