Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An empty multicolumn cell causes extra row height in PDF output #4044

Closed
jfbu opened this issue Sep 6, 2017 · 1 comment
Closed

An empty multicolumn cell causes extra row height in PDF output #4044

jfbu opened this issue Sep 6, 2017 · 1 comment
Assignees
Milestone

Comments

@jfbu
Copy link
Contributor

jfbu commented Sep 6, 2017

Procedure to reproduce the problem

source:

+----+----+----+----+
| c1 | c2 | c3 | c4 |
+----+----+----+----+
| d1 | d2 |         |
+----+----+---------+

+----+----+----+----+
| c1 | c2 | c3 | c4 |
+----+----+----+----+
| d1 | d2 | d34     |
+----+----+---------+

Error logs / results

pdf output:

capture d ecran 2017-09-06 a 19 51 47

Notice extra row height in first table

Expected results

No extra row height in first table

Environment info

  • OS: Mac
  • Python version: 3.5.4 (CPython)
  • Docutils version: 0.14
  • Sphinx version: 1.6.3 and master

Anecdote: I took over the table from a docutils bug report. With Sphinx latex writer there isn't the problem of Docutils rst2latex, but still the produced LaTeX does not behave completely nicely as demonstrated by image above.

The latex file contains

&\sphinxstartmulticolumn{2}%
\begin{varwidth}[t]{\sphinxcolwidth{2}{4}}
\par
\vskip-\baselineskip\strut\end{varwidth}%
\sphinxstopmulticolumn

if it was (notice extra \strut)

&\sphinxstartmulticolumn{2}%
\begin{varwidth}[t]{\sphinxcolwidth{2}{4}}
\strut\par
\vskip-\baselineskip\strut\end{varwidth}%
\sphinxstopmulticolumn

this would fix the issue. Needs some thinking over, though.

@jfbu
Copy link
Contributor Author

jfbu commented Sep 11, 2017

Fixed at f453fe7 (and 8542e29 for line too long flake8 violation).

@jfbu jfbu closed this as completed Sep 11, 2017
@jfbu jfbu added this to the 1.6.4 milestone Sep 11, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant