I was working on a html note template. Suddenly, I found an infinite typst doc is exactly what I want. Is it possible?
yes, you can set page(height: auto)
. The page will grow with its content. I use this setup for previewing content with tinymist, that is ultimately meant to be exported as html.
You can still put pagebreaks in there if you want; if you explicitly don’t want any pagebreaks, even when a package inserts them, you can also add show pagebreak: none
.
Incredible typst! Thanks a lot, I’m glad to have an answer here.
Hello. HTML template? Are you talking about experimental HTML export? It doesn’t have any height restrictions, well, because it’s a webpage.
typc file.typ -f html --features=html
warning: html export is under active development and incomplete
= hint: its behaviour may change at any time
= hint: do not rely on this feature for production use cases
= hint: see https://github.com/typst/typst/issues/5512 for more information
warning: pagebreak was ignored during HTML export
┌─ file.typ:2:1
│
2 │ #pagebreak()
│ ^^^^^^^^^^^
I think they meant that they started with HTML (because of the unlimited height) and then realized that except for the paged layout, regular Typst is closer to what they were looking for.
I reconsider the need for writing and reading my own note. Since it won’t be published or printed into journal, there’s no need for keeping the pagebreak. That’s why I want creat a custom html for note.
Barely cares the output format. But thank you for reminding me the html exporting. Now I have more options to restore and read my notes.
Now I have a new idea. Thinking of a wide display in landscape orientation. Perhaps it’s not a good idea to read with scrolling, while leaving much blank space around. A tiling overview of paper with pagebreaks takes full use of the screen.
Thanks anyway!