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

LaTeX: release of LaTeX from June 2021 causes extra vertical whitespace in cells of complex tables #9315

Closed
jfbu opened this issue Jun 8, 2021 · 2 comments

Comments

@jfbu
Copy link
Contributor

jfbu commented Jun 8, 2021

Describe the bug
A clear and concise description of what the bug is.

With recently released LaTeX of 2021-06-01 which adds "paragraph hooks", they cause extra whitespace due to bad interaction with varwidth package.

To Reproduce
Steps to reproduce the behavior:

complex tables
==============


+--------------+----------+-----------+-----------+
| row 1, col 1 | column 2 | column 3  | column 4  |
+--------------+----------+-----------+-----------+
| row 2        | one                              |
| row 2        |                                  |
| row 2        | two                              |
| row 2        |                                  |
| row 2        | three                            |
+--------------+----------+-----------+-----------+
| row 3        |          |           |           |
+--------------+----------+-----------+-----------+


+--------------------+----------------+
|  2 rows and 2 cols | 1 row x 3 cols |
|                    +----+-----+-----+
|                    |  A |  B  |  C  |
+---+----------------+----+-----+-----+
| 1 |       2        |  3 |  4  |  5  |
+---+----------------+----+-----+-----+


+----------+--------------------------------+------------------------+----------+----------+----------+----------+----------+
| Header 1 | Long Header 2 that should wrap | Common column Header 3 | Header 4 | Header 5 | Header 6 | Header 7 | Header 8 |
|          |                                +-----------+------------+          |          |          |          |          |
|          |                                | Header 3a | Header 3b  |          |          |          |          |          |
+==========+================================+===========+============+==========+==========+==========+==========+==========+
| Value 1  | Value 2 does actually wrap     | Value 3a  | Value 3b   | Value 4  | Value 5  | Value 6  | Value 7  | Value 8  |
+----------+--------------------------------+-----------+------------+----------+----------+----------+----------+----------+


and make latexpdf. (I am using #9314 because these tables show the Sphinx 4.0 bug #9313).

With TeXLive 2021 and the latest LaTeX release we get this

Capture d’écran 2021-06-08 à 23 26 54

With TeXLive 2019 we got this with no extra space

Capture d’écran 2021-06-08 à 23 27 04

Environment info

  • OS: [e.g. Unix/Linux/Mac/Win/other with version]
  • Python version: [e.g. 3.7.1]
  • Sphinx version: 4.x with Fix #9313 #9314, or prior to 4.0
  • Sphinx extensions: [e.g. sphinx.ext.autodoc, recommonmark]
  • Extra tools: Bug shows with LaTeX release 2021-06-01.

Additional context

This is LaTeX upstream ticket latex3/latex2e#583

But I have not checked in detail yet.

Not setting a milestone, hoping it gets fixed upstream at LaTeX.

However, as varwidth is a third-party package not maintained by LaTeX team, it is not guaranteed there will be a fix from upstream and we perhaps will have to take some measures.

Notice that the LaTeX 2021-06-01 added paragraph hooks could also badly interfere with Sphinx code-blocks but this was anticipated at #9000.

I have not yet checked for other potential breakage from upstream LaTeX changes.

@jfbu
Copy link
Contributor Author

jfbu commented Jun 16, 2021

There has been a LaTeX upstream update but it does not solve the issue in our context: the extra whitespace appears below not above the paragraph in merged cells of complex tables:
Capture d’écran 2021-06-16 à 09 03 08

  1. The upstream latex update is via version of file latex2e-first-aid-for-external-files.ltx dated 2021/06/08. It is a file which is automatically included during the latex format generation which happens when the user updates the installation via package manager. One sees no trace of it in log file.
  2. As this is potentially time consuming I have not yet checked if the above phenomenon is a bad interaction with our usage of varwidth or really is due to lacunary fix of varwidth compatibility by latex2e-first-aid-for-external-files.ltx
  3. The "latex2e-first-aid" mechanism is supposed to be provisory until the third-party packages get fixed. But, after one or two years, they will stop including their fixes in the latex format itself. So whatever happens the safest is probably for us to apply a fix ourselves. Which however is complicated and annoying because it implies making it in a way compatible to whatever happens on upstream latex or package side.

@jfbu
Copy link
Contributor Author

jfbu commented Jun 26, 2021

As of 2021/06/24 version of LaTeX internal file latex2e-first-aid-for-external-files this problem has been fixed upstream.

I am thus closing this as it was a transient upstream problem.

@jfbu jfbu closed this as completed Jun 26, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 27, 2021
@AA-Turner AA-Turner removed this from the some future version milestone Sep 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants