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

Apply special theme accroding to heading label #148

Open
chxp opened this issue Jan 28, 2025 · 2 comments
Open

Apply special theme accroding to heading label #148

chxp opened this issue Jan 28, 2025 · 2 comments
Labels
question Further information is requested

Comments

@chxp
Copy link

chxp commented Jan 28, 2025

Considering we have a special slide named as two-column as follows:

#let two-column-slide(body) = touying-slide-wrapper(self => {}

How could we make a section using the style of two-column in == pictures sections as follows:

= intros
== background
- items


== pictures <two-column>
It will using the two-column slide formats here

== default slide
return to the default format.
@OrangeX4
Copy link
Member

I didn't understand the need to do that too much. We can use

#slide[A][B]

@OrangeX4 OrangeX4 added the question Further information is requested label Feb 20, 2025
@chxp chxp changed the title Apply special slides accroding to heading label Apply special theme accroding to heading label Feb 21, 2025
@chxp
Copy link
Author

chxp commented Feb 21, 2025

two-column is an example, it could also be a different theme such as a slide with special colors, a focus slide, a slide removing all header or footer, or a slide putting the image full of the slide without header.

In some text software such as emacs org-mode, the section header and the following content could be foldable. Slides such as #focus-slide[A] will fold into the section header and be invisible in an outline view as the following showed.

Temporarily, it will be useful when generating the typst code from the emacs org-mode. However, I foresee the future typst text software would also support section header folding. Thus it is convenient to define a special slide in the header by using a label rather than using #focus-slide[A].

original text

Image

outline view

Image

At last, an advantage of touying is automatically converting the section header into a slide with the section header.
Why not make the label of the section header more customizable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants