Any reason that `=` is not translated to `#chapter`?
When using typst, it is common for people to switch between different templates to see what they like and don't like. This is a bit challenging to do with the typst-orange-template because = is seemingly not accounted for in a logical way. I would propose that the use of = should be equivalent to #chapter (with the default arguments) so that at least the file can be rendered in a reasonable way.
Hi, when I developed it, it was not possible due to a Typst limitation. I will try to fix it with the last version of Typst to see if it works.
The code of #chapter is essentially an heading of level 1 with page break and parte change to false. It was not possibile to embed it in heading with a show rule without create useless empty pages. Another problem is that each chapter has a different image, and using a named function resolved also this problem.
#let chapter(title, image:none, l: none) = {
pagebreak(to: "odd")
heading-image.update(x =>
image
)
if l != none [
#heading(level: 1, title) #label(l)
] else [
#heading(level: 1, title)
]
part-change.update(x =>
false
)
}
That's understandable. Thanks for the reply! Feel free to close this issue if you would like.
Hi, I fixed this with the last commit. I will publish on typst package manager soon.
// Chapter can also be defined in this way
#update-heading-image(image: image("./orange2.jpg"))
= In-text Element Examples
Fixed in "0.3.0"