Fix #2308: Define `\tablecontinued` macro to redefine the style of continued label for longtables

This commit is contained in:
Takeshi KOMIYA 2016-02-16 11:44:33 +09:00
parent 774927c90c
commit d9be95a6d3
3 changed files with 5 additions and 2 deletions

View File

@ -6,6 +6,8 @@ Incompatible changes
Features added Features added
-------------- --------------
* #2308: Define ``\tablecontinued`` macro to redefine the style of continued label for
longtables.
Bugs fixed Bugs fixed
---------- ----------

View File

@ -145,6 +145,7 @@
\newcommand{\code}[1]{\texttt{#1}} \newcommand{\code}[1]{\texttt{#1}}
\newcommand{\bfcode}[1]{\code{\bfseries#1}} \newcommand{\bfcode}[1]{\code{\bfseries#1}}
\newcommand{\email}[1]{\textsf{#1}} \newcommand{\email}[1]{\textsf{#1}}
\newcommand{\tablecontinued}[1]{\textsf{#1}}
% Redefine the Verbatim environment to allow border and background colors. % Redefine the Verbatim environment to allow border and background colors.
% The original environment is still used for verbatims within tables. % The original environment is still used for verbatims within tables.

View File

@ -1006,12 +1006,12 @@ class LaTeXTranslator(nodes.NodeVisitor):
self.body.extend(self.tableheaders) self.body.extend(self.tableheaders)
self.body.append('\\endfirsthead\n\n') self.body.append('\\endfirsthead\n\n')
self.body.append('\\multicolumn{%s}{c}%%\n' % self.table.colcount) 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')) % _('continued from previous page'))
self.body.append('\n\\hline\n') self.body.append('\n\\hline\n')
self.body.extend(self.tableheaders) self.body.extend(self.tableheaders)
self.body.append('\\endhead\n\n') 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, % (self.table.colcount,
_('Continued on next page'))) _('Continued on next page')))
self.body.append('\n\\endfoot\n\n') self.body.append('\n\\endfoot\n\n')