|
From: <gr...@us...> - 2013-02-21 20:48:12
|
Revision: 7617
http://docutils.svn.sourceforge.net/docutils/?rev=7617&view=rev
Author: grubert
Date: 2013-02-21 20:48:05 +0000 (Thu, 21 Feb 2013)
Log Message:
-----------
FIX [ docutils-Bugs-3594442 ] complex table formatting error
Modified Paths:
--------------
trunk/docutils/docutils/writers/latex2e/__init__.py
trunk/docutils/test/functional/expected/standalone_rst_latex.tex
Modified: trunk/docutils/docutils/writers/latex2e/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/latex2e/__init__.py 2013-02-21 20:44:25 UTC (rev 7616)
+++ trunk/docutils/docutils/writers/latex2e/__init__.py 2013-02-21 20:48:05 UTC (rev 7617)
@@ -1972,6 +1972,7 @@
count = node['morerows'] + 1
self.active_table.set_rowspan(
self.active_table.get_entry_number()-1,count)
+ # TODO why does multirow end on % ? needs to be checked for below
self.out.append('\\multirow{%d}{%s}{%%' %
(count,self.active_table.get_column_width()))
self.context.append('}')
@@ -1995,9 +1996,13 @@
# header / not header
if isinstance(node.parent.parent, nodes.thead):
+ if self.out[-1].endswith("%"):
+ self.out.append("\n")
self.out.append('\\textbf{%')
self.context.append('}')
elif self.active_table.is_stub_column():
+ if self.out[-1].endswith("%"):
+ self.out.append("\n")
self.out.append('\\textbf{')
self.context.append('}')
else:
Modified: trunk/docutils/test/functional/expected/standalone_rst_latex.tex
===================================================================
--- trunk/docutils/test/functional/expected/standalone_rst_latex.tex 2013-02-21 20:44:25 UTC (rev 7616)
+++ trunk/docutils/test/functional/expected/standalone_rst_latex.tex 2013-02-21 20:48:05 UTC (rev 7617)
@@ -1783,7 +1783,8 @@
\setlength{\DUtablewidth}{\linewidth}
\begin{longtable*}[c]{|p{0.156\DUtablewidth}|p{0.238\DUtablewidth}|}
\hline
-\multirow{2}{0.16\DUtablewidth}{%\textbf{%
+\multirow{2}{0.16\DUtablewidth}{%
+\textbf{%
XXX
}} & \textbf{%
Variable Summary
@@ -1795,7 +1796,8 @@
\hline
\endfirsthead
\hline
-\multirow{2}{0.16\DUtablewidth}{%\textbf{%
+\multirow{2}{0.16\DUtablewidth}{%
+\textbf{%
XXX
}} & \textbf{%
Variable Summary
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|