Skip to content

Update LaTeX spanner width logic to use the correct columns #2079

Merged
rich-iannone merged 7 commits intorstudio:masterfrom
shannonhaughton:spanner_widths
Nov 17, 2025
Merged

Update LaTeX spanner width logic to use the correct columns #2079
rich-iannone merged 7 commits intorstudio:masterfrom
shannonhaughton:spanner_widths

Conversation

@shannonhaughton
Copy link
Copy Markdown
Contributor

@shannonhaughton shannonhaughton commented Nov 13, 2025

Summary

The existing logic to calculate the spanner widths in latex uses indexing rather than matching on the column names, meaning that hidden columns and reordered columns caused the incorrect widths to be used

The code also had repeats for calculating the number of stub columns, so tidied this up

Fixes: #2016
Fixes: #1922

Checklist

Copy link
Copy Markdown
Member

@rich-iannone rich-iannone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@rich-iannone rich-iannone merged commit 4217ad9 into rstudio:master Nov 17, 2025
12 checks passed
@shannonhaughton shannonhaughton deleted the spanner_widths branch February 18, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

spanning headers not respecting table column widths - latex LaTeX tables: column spanner widths are affected by order of the input data

2 participants