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

Maintain consistency aross different themes #22

Closed
yjcui opened this issue Mar 26, 2024 · 4 comments
Closed

Maintain consistency aross different themes #22

yjcui opened this issue Mar 26, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@yjcui
Copy link

yjcui commented Mar 26, 2024

Would it be possible to keep all themes compatible with each other? Currently different themes are implemented in different ways (variable names, function def, etc.) and user can not switch from one theme to another by changing the theme name only. It would be preferrable to define common template for the slides structure and maintain the consistency, just like how LaTeX/Beamer did it.

@OrangeX4
Copy link
Member

I believe I've tried my best to maintain consistency among different themes: for instance, self.colors, self.info, slide, and empty-slide, they all have a similar unified structure. I've abstracted these parts that can be standardized, so if you only utilize these standardized parts, you can easily switch between different themes.

However, we also have to acknowledge that there will inevitably be differences among different themes. We can't eliminate efforts to provide special effects for certain themes in the pursuit of uniformity, such as the subtitle parameter in the #slide[] function in the 'university' theme. I don't think we should impose too many restrictions on this because the demand for theme switching isn't actually that common; most people still prefer to achieve better visual effects within a specific theme.

Of course, you're welcome to propose your ideas in this issue, and if they're reasonable, I can consider adding more standardized abstractions for Touying.

@OrangeX4 OrangeX4 added the question Further information is requested label Mar 27, 2024
@yjcui
Copy link
Author

yjcui commented Apr 17, 2024

Thanks for the response! One idea just came to my mind. Is it possible to have a pseudo-standard template which has all possible parameters defaulting to something like none or empty strings? For example, I noticed university theme came with progress-bar while the default theme did not. Error would be reported when changing from university to default as parameter progress-bar was not defined. I can manually commented it out, but it would be convenient if default theme also comes with this parameter but defaults to false. Not sure how difficult it would be, implementation-wise.

@OrangeX4
Copy link
Member

I think just adding ..args to the register function to capture the remaining unused arguments would solve the problem, and I'll create a PR to fix the issue :-)

@OrangeX4 OrangeX4 added enhancement New feature or request and removed question Further information is requested labels Apr 20, 2024
@yjcui
Copy link
Author

yjcui commented Apr 22, 2024

Even better. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants