-
Notifications
You must be signed in to change notification settings - Fork 343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle long content in callout when format is typst #12179
Comments
That's the same issue as with LaTeX. In my opinion, I really don't believe callouts should contain such contents. |
FYI, this is done on purpose as "breakable" default in Typst is "true".
|
Ok, it's really clear now, setting breakable to false seems reasonable, I agree with all that have been said. In my use case I was using return quarto.Callout({
breakable = true,
type = "tip",
content = {div},
title = "Correction",
collapse = false,
icon = true,
appearance = 'simple'
}) Is it worth adding this as it will not be used by all formats. |
I don't think, the "quarto" Lua API should become specific towards one format. |
Ok, thanks for your time and reflexions, I ended redefinig the typst callout function in my // breakable callout see https://github.com/quarto-dev/quarto-cli/issues/12179
// callout typst code from https://github.com/quarto-dev/quarto-cli/blob/93ac52d00d94f01993d86bc75340451b00fee4ff/src/resources/formats/typst/pandoc/quarto/definitions.typ#L150
#let callout(body: [], title: "Callout", background_color: rgb("#dddddd"), icon: none, icon_color: black) = {
block(
breakable: true,
fill: background_color,
stroke: (paint: icon_color, thickness: 0.5pt, cap: "round"),
width: 100%,
radius: 2pt,
block(
inset: 1pt,
width: 100%,
below: 0pt,
block(
fill: background_color,
width: 100%,
inset: 8pt)[#text(icon_color, weight: 900)[#icon] #title]) +
if(body != []){
block(
inset: 1pt,
width: 100%,
block(fill: white, width: 100%, inset: 8pt, body))
}
)
} |
This issue was disturbing me for years now. It is ok for me now, do you want that I close the issue? |
Let's wait for Carlos. |
I agree with the sentiment and the principle. At the same time, Quarto callouts already have different behaviors in different formats, so this wouldn't be a big additional violation of the principle. With that said, I'm not sure (or I no longer remember) how |
Bug description
callout doesn't handle correctly long content in typst.
Steps to reproduce
Actual behavior
callout overflow on the page it is created.
Expected behavior
Long callout should break pages like code blocks...
Your environment
No response
Quarto check output
The text was updated successfully, but these errors were encountered: