Closed OrangeX4 closed 4 months ago
That is exactly what I want. Thank you!
BTW, how can I map ==
headings to slide titles? In most cases, I won't need subsections.
Do you think there should be a way to do this? is it not convenient to use ===
?
Do you think there should be a way to do this? is it not convenient to use
===
?
Thanks for your reply. In fact, I think it is convenient enough to use ===
. So if you don't think it is necessary to map ==
headings as slide titles, please ignore my question. The only reason that I want to use ==
instead of ===
to represent the slide titles is that I think the following document looks a bit strange.
= Section 1
=== Title 1.1
=== Title 1.2
= Section 2
=== Title 2.1
=== Ttile 2.2
So forget it if you don't think so.
A slide level in the header's hierarchy could be defined to specify that headings with the specified level create slides. See for example Pandoc.
Regards,
Another quick question: shall I use the callback-style functions to use the animations like cover
and uncover
?
Yes, while maybe I could provide a non-callback function of only
and uncover
(with some limitations), I think there are two styles that make touying more difficult to understand.
I've added the slide-level parameter. We use the slide-level
parameter in slides to represent the structural depth. For example, the default setting for the university theme is slide-level: 1
, where heading 1 and 2 represent section and title, respectively. If we use #show: slides.with(slide-level: 2)
, heading 1, 2, and 3 will represent section, subsection, and title, respectively.
I've added the slide-level parameter. We use the
slide-level
parameter in slides to represent the structural depth. For example, the default setting for the university theme isslide-level: 1
, where heading 1 and 2 represent section and title, respectively. If we use#show: slides.with(slide-level: 2)
, heading 1, 2, and 3 will represent section, subsection, and title, respectively.
So the number starts from 0 😄
Yes, I think so, I've merged it :-)
Many thanks @OrangeX4 for this great feature !
Touying 0.3.1 has been released :-)
As mentioned in #7 and #8, we plan to implement a more powerful show-slides mode, which can be broadly divided into the following three parts:
slide-level
parameter in slides to represent the structural depth. For example, the default setting for the university theme isslide-level: 1
, where heading 1 and 2 represent section and title, respectively. If we use#show: slides.with(slide-level: 2)
, heading 1, 2, and 3 will represent section, subsection, and title, respectively.slide-in-slides
method. Instead, we adopt the "convention over configuration" philosophy to simplify the implementation. Specifically, in the slides mode, the default call is made to theself.methods.slide
method. Additionally, if we have aself.methods.touying-new-section-slide
method,= Section
will be automatically translated intoself.methods.touying-new-section-slide[Section]
.#let (slide, focus-slide) = utils.slides(s)
, we can use syntax like#slide[]
and#focus-slide[]
in the show-slides mode, providing more powerful functionality and clearer structure. In this syntax, section, subsection, and title will be automatically passed into#slide[]
. (Because"slide"
is registered inself.slides = ("slide",)
, it can be automatically passed in)Here is a specific example:
cc @fbob and @HPDell