touying-typ / touying

Touying is a powerful package for creating presentation slides in Typst.
https://touying-typ.github.io/
MIT License
620 stars 15 forks source link

No `outline-slide` export from `utils.slides(s)` #42

Closed blucin closed 4 months ago

blucin commented 5 months ago

I wanted to create a title_slide with an extra option. I followed the accepted solution shown in #20 , which looks something like this:

#import "@preview/touying:0.4.0": *

#let s = themes.dewdrop.register(
  aspect-ratio: "16-9",
  footer: [Dewdrop],
  navigation: none,
)
#let s = (s.methods.info)(
  self: s,
  title: [Title],
  subtitle: [Subtitle],
  author: [Authors],
  date: datetime.today(),
  institution: [Institution],
)
#let (init, slides, touying-outline, alert) = utils.methods(s)
#show: init

#show strong: alert

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

#title-slide(extra: "Extra")

Issue

I cannot import the outline-slide from utils.slide(s)

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

#title-slide(extra: "Extra")

// does not work
#outline-slide() 

The workaround solution for this is

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

#title-slide(extra: "Extra")

// workaround for #outline-slide()
#slide(heading(level: 2, s.outline-title) + parbreak() + (s.methods.touying-outline)(self: s, cover: false))
OrangeX4 commented 4 months ago

done in 0.4.1.