Skip to content

Render multiline cells in LaTeX tables - #523

Open
Boulea7 wants to merge 1 commit into
astanin:masterfrom
Boulea7:fix/latex-cell-wrapping
Open

Boulea7 wants to merge 1 commit into
astanin:masterfrom
Boulea7:fix/latex-cell-wrapping

Conversation

@Boulea7

@Boulea7 Boulea7 commented Dec 3, 2026

Copy link
Copy Markdown

Fixes #283.

Render multiline cells in latex, latex_booktabs, and latex_longtable with LaTeX's built-in \shortstack. Explicit newlines and line breaks from column-width options now render within the cell, with the existing escaping and column alignment.

The regression tests cover wrapped cells and headers, numeric formatting, CRLF, and text starting with [. The full suite passed with NumPy, pandas, and wcwidth. Generated tables compiled with Tectonic, and single-line and raw LaTeX outputs matched the base byte for byte.

Codex assisted with implementation and verification.

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.

tabulate does not appear to support text wrapping for latex format tables

1 participant