Avoid bad boxes #31

Merged
lukas merged 14 commits from testing-bad-boxes into main 2026-04-10 09:03:51 +00:00
Owner

see https://github.com/atticus-sullivan/kata/pull/14 and https://github.com/atticus-sullivan/kata/issues/9

The issue was when compiling a document, this lead to lots of "bad boxes" reported by LaTeX, despite the output was as expected/desired. The reason for this was I patched too much together over time (thus kinda fighting against LaTeX which only succeeded by e.g. adjusting penalties) instead of solving the issue of spacing properly like LaTeX likes it.

So the core issue seems to be the lacking rubber spaces between the pictures which are needed to obtain the layout I want -> now we explicitly add these spaces/skips (0pt + 1.0fil)

Notes:

  • \parfillskip=0pt is still needed for the right layout
  • also avoids using tikzpictures for the phantoms -> uses \rule instead (like \strut)
  • renames the width parameter to columns

many of these are suggestions from @cfr, so thanks a lot

Todos:

  • update the kata.pdf (docs) before merging
  • update the tests (maybe better to do this outside of this PR, but not sure) -> don't forget to check the outputs (e.g. for not found and/or errors)
see https://github.com/atticus-sullivan/kata/pull/14 and https://github.com/atticus-sullivan/kata/issues/9 The issue was when compiling a document, this lead to lots of "bad boxes" reported by LaTeX, despite the output was as expected/desired. The reason for this was I patched too much together over time (thus kinda fighting against LaTeX which only succeeded by e.g. adjusting penalties) instead of solving the issue of spacing properly like LaTeX likes it. So the core issue seems to be the lacking rubber spaces between the pictures which are needed to obtain the layout I want -> now we explicitly add these spaces/skips (`0pt + 1.0fil`) Notes: - `\parfillskip=0pt` is still needed for the right layout - also avoids using `tikzpictures` for the phantoms -> uses `\rule` instead (like `\strut`) - renames the `width` parameter to `columns` many of these are suggestions from @cfr, so thanks a lot Todos: - [x] update the `kata.pdf` (docs) before merging - [x] update the tests (maybe better to do this outside of this PR, but not sure) -> don't forget to check the outputs (e.g. for `not found` and/or errors)
lukas self-assigned this 2026-04-08 14:46:00 +00:00
lukas force-pushed testing-bad-boxes from c5eae373fe to af3ea6e239 2026-04-08 14:52:55 +00:00 Compare
lukas force-pushed testing-bad-boxes from af3ea6e239 to cf348fe383 2026-04-08 14:53:26 +00:00 Compare
lukas merged commit 3634fdc84a into main 2026-04-10 09:03:51 +00:00
lukas deleted branch testing-bad-boxes 2026-04-10 09:03:51 +00:00
Sign in to join this conversation.
No description provided.