Skip to content
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

Proposal: custom types for touying #33

Open
Beiri22 opened this issue Apr 15, 2024 · 2 comments
Open

Proposal: custom types for touying #33

Beiri22 opened this issue Apr 15, 2024 · 2 comments

Comments

@Beiri22
Copy link

Beiri22 commented Apr 15, 2024

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?

@OrangeX4
Copy link
Member

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.

@OrangeX4 OrangeX4 added enhancement New feature or request upstream labels Apr 16, 2024
@OrangeX4 OrangeX4 changed the title Just question... proposal: custom types for touying Apr 16, 2024
@OrangeX4 OrangeX4 changed the title proposal: custom types for touying Proposal: custom types for touying Apr 16, 2024
@Beiri22
Copy link
Author

Beiri22 commented Apr 16, 2024

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 😀

@OrangeX4 OrangeX4 added future and removed enhancement New feature or request labels May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants