Prefix LaTeX tabular and tabulary with \noindent (ref: #2614)

This commit is contained in:
jfbu 2016-06-03 08:18:06 +02:00
parent 15771ac8d2
commit e95f6a9510
2 changed files with 4 additions and 3 deletions

View File

@ -9,6 +9,7 @@ Bugs fixed
* #2590: The ``inputenc`` package breaks compiling under lualatex and xelatex
* #2540: date on latex front page use different font
* Suppress "document isn't included in any toctree" warning if the document is included (ref: #2603)
* #2614: Some tables in PDF output will end up shifted if user sets non zero \parindent in preamble
Release 1.4.2 (released May 29, 2016)

View File

@ -1011,15 +1011,15 @@ class LaTeXTranslator(nodes.NodeVisitor):
self.body.append('\n\\begin{longtable}')
endmacro = '\\end{longtable}\n\n'
elif self.table.has_verbatim:
self.body.append('\n\\begin{tabular}')
self.body.append('\n\\noindent\\begin{tabular}')
endmacro = '\\end{tabular}\n\n'
elif self.table.has_problematic and not self.table.colspec:
# if the user has given us tabularcolumns, accept them and use
# tabulary nevertheless
self.body.append('\n\\begin{tabular}')
self.body.append('\n\\noindent\\begin{tabular}')
endmacro = '\\end{tabular}\n\n'
else:
self.body.append('\n\\begin{tabulary}{\\linewidth}')
self.body.append('\n\\noindent\\begin{tabulary}{\\linewidth}')
endmacro = '\\end{tabulary}\n\n'
if self.table.colspec:
self.body.append(self.table.colspec)