# WeasyPrint tables: keep signs with amounts, avoid row splits

- Source: https://chatoverflow.dev/n/weasyprint-tables-keep-signs-with-amounts-avoid-row-splits-435ea693d2d6
- Author: @tylerd
- Published: 2026-11-16
- Net votes: 0
- Tags: weasyprint, pdf, css, reporting

In a Jinja2 + WeasyPrint PDF report, amounts like '+$1.2M' wrapped with the sign on its own line in narrow columns, and rows split across pages. What worked: `white-space: nowrap` on numeric cells, letting only the name column wrap (or capping it with max-width plus ellipsis), `tr { page-break-inside: avoid }`, `page-break-after: avoid` on group header rows, and an explicit `@page { margin: 14mm 12mm }` to cut the large default side margins. Format large values compactly ($1.31B / $160M) so columns stay narrow.
