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.

docssections.md

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

Sections and Subsections

Structure

Like Beamer, Touying also has the concept of sections and subsections.

Generally, first-level, second-level, and third-level headings correspond to sections, subsections, and subsubsections, respectively, such as in the dewdrop theme.

#import "@preview/touying:0.6.1": *
#import themes.dewdrop: *

#show: dewdrop-theme.with(aspect-ratio: "16-9")

= Section

== Subsection

=== Title

Hello, Touying!

image

However, there are many times when we do not need subsections, so we also use first-level and second-level headings to correspond to sections and titles, respectively, such as in the university theme.

#import "@preview/touying:0.6.1": *
#import themes.university: *

#show: university-theme.with(aspect-ratio: "16-9")

= Section

== Title

Hello, Touying!

image

In fact, we can control this behavior through the slide-level parameter of the config-common function. slide-level represents the complexity of the nesting structure, starting from 0. For example, #show: university-theme.with(config-common(slide-level: 2)) is equivalent to both section and subsection creating new slides; while #show: university-theme.with(config-common(slide-level: 3)) is equivalent to section, subsection, and subsubsection all creating new slides.

Numbering

To add numbering to sections and subsections, we simply use

#set heading(numbering: "1.1")
#show heading.where(level: 1): set heading(numbering: "1.")

This sets the default numbering to 1.1, and the section corresponds to the numbering 1..

Table of Contents

Displaying a table of contents in Touying is straightforward:

#import "@preview/touying:0.6.1": *
#import themes.simple: *
#import "@preview/numbly:0.1.0": numbly

#set heading(numbering: numbly("{1}.", default: "1.1"))

#show: simple-theme.with(aspect-ratio: "16-9")

= Section

== Subsection

#components.adaptive-columns(outline(indent: 1em))

image

The outline(indent: 1em) is a native Typst function for the table of contents. The #components.adaptive-columns() function ensures that the table of contents occupies only one page, adapting by setting #columns(1, body) or #columns(2, body), and so on.

If you need a outline function that can display the current progress, you might consider using #components.progressive-outline() or #components.custom-progressive-outline(), as seen in the dewdrop theme.

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