How do I format one specific slide with Touying?

I want to change the font size on one specific slide in a touying deck. The documentation says:

If you want to affect only one specific slide, you can set the config locally via #slide(config: ...)[...].

== Local Config 
#slide(config:config-page(fill: purple.lighten(90%)))[
Only this slide has a light purple background, but the next slide goes back being light blue.
]

So I did this:

#focus-slide(config:config-page(text(size: 18pt)))[
    blah blah blah
]

Which looks like what the documentation calls for, but I got the error error: missing argument: body.

So I tried a show-set rule instead:

#focus-slide[
  #{ show here(): set text(size: 18pt)

  Blah blah blah content }
]

But that didn’t work either, and I got a long string of errors. What should I be doing differently?

As you found out, Touying provides configs to format some specific aspects, e.g. page options or theme colors. All available configs and their options are documented in Configs | Touying

General changes to the content can be done with Typst build-in mechanisms. To change the font size you can use a simple set rule.

#slide[
  #set text(size: 18pt)
  This is my text
]
1 Like

The problem arises because the argument is essentially just a text element, and the error is typst telling you that text elements also require some text, i.e. a body. The same error would appear if you just inserted #text(size: 18pt) in your document.

config-page also does not affect text

show here(): ... is not valid typst syntax, but presumably you only want the show rule to affect that page. In that case, I have good news for you: show and set rules are scoped by default!
From the docs:

Below, we use a content block to scope the list styling to one particular list.

 This list is affected: #[
   #set list(marker: [--])
   - Dash
 ]
 This one is not:
 - Bullet

So, the fix is simple:

#focus-slide[
  #set text(size: 18pt)
  blah blah blah
]
2 Likes

That worked, but it raises a new question: what’s the scenario where you would use

#focus-slide(config:config-page(text(size: 18pt)))[
    blah blah blah
]

as the documentation suggests?

UPDATE: answered elsewhere in the thread.