All skills
apcamargo avatar

/touying-author

@433372a

Author, refactor, and troubleshoot Typst slide decks built with Touying

Use this Skill: https://skilld.dev/gh/apcamargo/typst-skills/touying-author

This session only. Nothing lands on disk.

docsglobal-settings.md

≈502 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Global Settings

Global Styles

For Touying, global styles refer to set rules or show rules that need to be applied everywhere, such as #set text(size: 20pt).

Themes in Touying encapsulate some of their own global styles, which are placed in #self.methods.init. For example, the simple theme encapsulates:

config-methods(
  init: (self: none, body) => {
    set text(fill: self.colors.neutral-darkest, size: 25pt)
    show footnote.entry: set text(size: .6em)
    show strong: self.methods.alert.with(self: self)
    show heading.where(level: self.slide-level + 1): set text(1.4em)

    body
  },
)

If you are not a theme creator but simply want to add some of your own global styles to your slides, you can easily place them before or after #show: xxx-theme.with(). For example, the metropolis theme recommends that you add the following global styles yourself:

#set text(font: "Fira Sans", weight: "light", size: 20pt)
#show math.equation: set text(font: "Fira Math")
#set strong(delta: 100)
#set par(justify: true)

Global Information

Like Beamer, Touying helps you better maintain global information through a unified API design, allowing you to easily switch between different themes. Global information is a typical example of this.

You can set the title, subtitle, author, date, and institution information of your slides with:

config-info(
  title: [Title],
  subtitle: [Subtitle],
  author: [Authors],
  date: datetime.today(),
  institution: [Institution],
)

Later on, you can access them through self.info.

This information is generally used in the theme's title-slide, header, and footer, such as #show: metropolis-theme.with(aspect-ratio: "16-9", footer: self => self.info.institution).

The date can accept datetime format and content format, and the date display format of the datetime format can be changed with:

config-common(datetime-format: "[year]-[month]-[day]")

Source: SKILL.md on GitHub

1 warning17d5 checks · Risk SAFE
  • Gen Agent Trust Hub17d

    This skill provides a set of instructions and documentation for authoring Typst slide decks using the Touying library. It involves processing and refactoring Typst code, which presents a standard indirect prompt injection surface typical of code-centric skills.

  • Socket17d

    No alerts

  • Snyk17d

    Risk: LOW · No issues

  • Runlayer7mo

    44/44 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 433372a. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 weeks ago.

Activeupdated 3 weeks ago

README badge

README badge for apcamargo/typst-skills/touying-author