touying-typ / touying

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

Using `extra` argument properly for #title-slide #20

Closed pvelayudhan closed 3 months ago

pvelayudhan commented 3 months ago

Hello,

Thanks for the package. I'm wondering how to properly make use of the extra parameter for #title-slide, specifically with the dewdrop theme.

The code below produces three slides:

  1. A title slide missing the extra information, (which I don't want)
  2. An outline slide
  3. A title slide containing the extra information (which I do want)

Ideally, I'd just have slide 3, then slide 1.

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

#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

#title-slide(extra: "Extra")

Sorry, I'm not very experienced with OOP!

OrangeX4 commented 3 months ago

show: slides.with(title-slide: false, outline-slide: false)

---Original--- From: @.> Date: Fri, Mar 22, 2024 01:07 AM To: @.>; Cc: @.***>; Subject: [touying-typ/touying] Using extra argument properly for#title-slide (Issue #20)

Hello,

Thanks for the package. I'm wondering how to properly make use of the extra parameter for #title-slide, specifically with the dewdrop theme.

The code below produces three slides:

A title slide missing the extra information, (which I don't want)

An outline slide

A title slide containing the extra information (which I do want)

Ideally, I'd just have slide 3, then slide 1.

import @.**/touying:0.3.2": #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 #title-slide(extra: "Extra")

Sorry, I'm not very experienced with OOP!

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

pvelayudhan commented 3 months ago

Thank you!