Open Beiri22 opened 5 months ago
Related blog link: https://laurmaedje.github.io/posts/types-and-context/
I've looked into the blog about custom types, and I'm also considering how to apply it to touying. I haven't delved deeply into it yet, but depending on the specific implementation of types and fields, custom types can always be beneficial for touying. In the worst case, we can also use them to customize the styles of headers and footers, allowing users to conveniently customize the headers and footers for themes, or even replace them entirely. In the best case, we can explore how to store "global variables" within a field of a custom type in touying, such as saving handout-mode
to a field of type touying-slide
. Depending on the specific implementation, perhaps touying's OOP may no longer be necessary, which would be a significant (and breaking) update. However, I think a few things are likely to remain unchanged: the #pause
implementation based on traversal and reconstruction, as well as the syntax for #show: slides
and dividing slides based on headings.
As far as I remember, custom types are not number one priority right now, but once available I am looking forward to seeing them in action here 😀
Hi,
you did an impressive job to make the OOP work in typst. I wonder if the touying syntax would become easier once typst implements custom types? Have you had a look at the blog post?