-
Notifications
You must be signed in to change notification settings - Fork 334
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
Pagebreak shortcode does not work in typst in multiple columns layout #11819
Comments
That's not really a bug as Typst uses a different break when inside columns: ---
title: "Quarto Playground"
format:
typst:
columns: 2
---
This is a playground for Quarto.
{{< lipsum 1 >}}
`#colbreak()`{=typst}
{{< lipsum 1 >}}
`#colbreak()`{=typst}
{{< lipsum 5 >}} I don't know if the |
We can try to do something smarter, but the problem is that the number of columns isn't fixed in a Typst document (it's scoped), so we can't just check the metadata. |
I would not try to cover all uses cases, only the case when |
FYI, in my opinion, the pagebreak shortcode is only a convenient/simple way to get a page break across formats, but Typst page break is more flexible (https://typst.app/docs/reference/layout/pagebreak/) so in the context of Typst, the shortcode is more a limitation. |
Could a scoped traversal help here? |
That qualifies as smarter, yes :) (It still won't work if someone changes the columns in a raw block... But I think I'd be fine with that.) |
Pagebreak shortcode does not work in typst when using multiple columns layout.
Leading to
pandoc to: typst output-file: index.typ standalone: true shift-heading-level-by: -1 default-image-extension: svg wrap: none citeproc: false toc: true metadata columns: 2 title: Quarto Playground [typst]: Compiling index.typ to index.pdf...error: pagebreaks are not allowed inside of containers ┌─ index.typ:305:1 │ 305 │ #pagebreak() │ ^^^^^^^^^^^ ERROR: Error at Object.complete (file:///Users/mcanouil/Projects/quarto/quarto-cli/src/command/render/output-typst.ts:79:13) at eventLoopTick (ext:core/01_core.js:175:7) at async file:///Users/mcanouil/Projects/quarto/quarto-cli/src/command/render/render.ts:300:23 at async withTimingAsync (file:///Users/mcanouil/Projects/quarto/quarto-cli/src/core/timing.ts:50:20) at async Object.complete (file:///Users/mcanouil/Projects/quarto/quarto-cli/src/command/render/render.ts:276:7) at async Object.onPostProcess (file:///Users/mcanouil/Projects/quarto/quarto-cli/src/command/render/render-files.ts:720:28) at async renderFileInternal (file:///Users/mcanouil/Projects/quarto/quarto-cli/src/command/render/render-files.ts:689:3) at async renderFiles (file:///Users/mcanouil/Projects/quarto/quarto-cli/src/command/render/render-files.ts:325:9) at async render (file:///Users/mcanouil/Projects/quarto/quarto-cli/src/command/render/render-shared.ts:102:18) at async renderForPreview (file:///Users/mcanouil/Projects/quarto/quarto-cli/src/command/preview/preview.ts:428:24)
Originally posted by @ironupiwada in #11591 (reply in thread)
The text was updated successfully, but these errors were encountered: