Skip to content

Bug fix: ensure correct parbreaks around image and tabular in sidebyside - #3186

Open
oscarlevin wants to merge 1 commit into
PreTeXtBook:masterfrom
oscarlevin:latex-sbs
Open

Bug fix: ensure correct parbreaks around image and tabular in sidebyside#3186
oscarlevin wants to merge 1 commit into
PreTeXtBook:masterfrom
oscarlevin:latex-sbs

Conversation

@oscarlevin

Copy link
Copy Markdown
Member

This fixes two related bugs with the latex conversion.

  1. If a worksheet contains a sidebyside to lay out exercises, those exercises can contain a mix of paragraphs and images. As in a stack, a paragraph followed by an image in a sidebyside needs special care to ensure there is a paragraph break between the paragraph and the image. The test for this only checked whether the image was in a stack.
  2. The same sort of check needs to be applied to tabulars after paragraphs. Claude uncovered that this is not happening because the tabular-inclusion code lived inside a \resizebox{...}{. See the pdf of the sample article corresponding to this Paragraph
    https://pretextbook.org/examples/sample-article/html/section-side-by-side.html#stacking-side-by-side-8-1-3

Claude claimed that the same thing was happening with the text after an image, specifically the text after the QR codes for interactives. This may be, but those QR codes are wide enough that the next word went to the following line anyway. But in theory it does make sense to guard against the "after" case too.

@oscarlevin

Copy link
Copy Markdown
Member Author

Before/after PDFs compared with Adobe's compare tool show only expected diffs (besides a few random "image replaced" with seem to just be artifacts of tikz not being 100% raster-perfect.

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.

1 participant