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

How to display the outline of dewdrop theme in two columns? #54

Open
Clark-Young opened this issue Jun 20, 2024 · 1 comment
Open

How to display the outline of dewdrop theme in two columns? #54

Clark-Young opened this issue Jun 20, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Clark-Young
Copy link

When we have more sections, a single-column table of contents can easily exceed one page. However, the section titles are usually short, so it is a good idea to have a double-column table of contents.
I have try my best to figure out how to achieve this but failed, so I open an issue here. Hope to get your reply soon.

@OrangeX4
Copy link
Member

a hack way:

#let s = themes.dewdrop.register(aspect-ratio: "16-9")
#(s.methods.outline-slide = (self: none, ..args) => {
  (self.methods.slide)(self: self, setting: columns.with(2), heading(level: 2, self.outline-title) + parbreak() + (self.methods.touying-outline)(self: self, cover: false))
})
#(s.methods.touying-new-section-slide = (self: none, section) => {
  (self.methods.slide)(self: self, setting: columns.with(2), section: section, heading(level: 2, self.outline-title) + parbreak() + (self.methods.touying-outline)(self: self))
})
#let (init, slides, touying-outline, alert) = utils.methods(s)
#show: init

#show strong: alert

#let (slide, empty-slide, title-slide, outline-slide, new-section-slide, focus-slide) = utils.slides(s)
#show: slides

I'll find a way to simplify it in the future.

@OrangeX4 OrangeX4 added the enhancement New feature or request label Jun 20, 2024
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