latex tables: Fix rendering for grid filled merged vertical cells #14024
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The table from issue #9313:
has merged vertical cells that notably needs to draw a vertical line on the left and right-hand side of the cells in the 2x2 grid area. If you add a column to the left of this:
then the 2x2 area should not draw a column line to the left of the area.
We can fix this by adjusting the \multicolumn invocation to adjust when it emits the colspec.
Notably, this commit does not consider the other broken case where a person maybe just wants the table borders like:
That has an impact in this area of the code, but to correctly consider that one has to parse out the given colspec to determine which columns have borders between them. (This line of code has a bug for this case as the colspec being emitted should be conditional if the specific column actually has it enabled, but the supporting code only determines if a vertical line is enabled anywhere rather than which columns.)
Here are the three tables mentioned prior to this fix:
And after the fix (which just fixes the second case):
Notably, the 3rd case (which is not a full grid fill) leaves extra vertical lines, and an extraneous "dot".