Pablo-Gonzalez-Calderon / showybox-package

A Typst package for creating colorful and customizable boxes
MIT License
60 stars 5 forks source link

Breakable box empty before new page #25

Open pabloavi opened 11 months ago

pabloavi commented 11 months ago

When setting the property breakable for a showybox, there may happen that when the box is created just before a new page it does not have any content inside (the white space in between is a new page starting):

imagen

A MWE:

#import "@preview/showybox:2.0.1": showybox

#let defi(definition, content) = {
  showybox(
    title-style: (color: black, sep-thickness: 0pt, align: left),
    breakable: true,
    frame: (title-color: white, border-color: black.darken(40%), thickness: 1pt),
    title: [*Definition*: #definition],
    content,
  )
}

#lorem(650)

#defi("Definition 1", "This is the first definition.")

I think this should not be the expected behaviour. It should start on the new page, as long as no content fits there.

Pablo-Gonzalez-Calderon commented 11 months ago

Hi! 😁

Yeah, it seems that something is going wrong inside the title behaviour while breaking the showybox. Currently I don't have much time to solve this issue, but in the meantime, I'll mark it as a bug, waiting for a fix (by myself or anyone else interested in fixing it).

Thank you for reporting the bug! 😁