Running the following input file through rst2latex.py:
+----+----+----+----+ | c1 | c2 | c3 | c4 | +----+----+----+----+ | d1 | d2 | d34 | +----+----+---------+
will produce this for the second row:
d1 & d2 & \multicolumn{2}{p{0.13\DUtablewidth}|}{% d34 } \\ \hline
If we make the last cell blank:
+----+----+----+----+ | c1 | c2 | c3 | c4 | +----+----+----+----+ | d1 | d2 | | +----+----+---------+
we get:
d1 & d2 & \multicolumn{2}{p{0.13\DUtablewidth}|}{%} \\ \hline
which produces an error in LaTeX, because the closing bracket is commented out by the %
that's intended to mask the following line break (writers/latex2e/__init__.py:2102
).
Tested on the current docutils snapshot, revision 8173, under Python 2.7.13 (Homebrew-installed) on OS X 10.11.6.
Fixed in revision 8174.
Thank you for the report.