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.

docsmulti-file.md

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

Multi-File Architecture

Touying features a syntax as concise as native Typst documents, along with numerous customizable configuration options, yet it still maintains real-time incremental compilation performance, making it suitable for writing large-scale slides.

If you need to write a large set of slides, such as a course manual spanning tens or hundreds of pages, you can also try Touying's multi-file architecture.

Configuration and Content Separation

A simple Touying multi-file architecture consists of three files: a global configuration file globals.typ, a main entry file main.typ, and a content file content.typ for storing the actual content.

These three files are separated to allow both main.typ and content.typ to import globals.typ without causing circular references.

globals.typ can be used to store some global custom functions and initialize Touying themes:

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

// as well as some utility functions

main.typ, as the main entry point of the project, applies show rules by importing globals.typ and includes content.typ using #include:

// main.typ
#import "/globals.typ": *

#show: university-theme.with(
  aspect-ratio: "16-9",
  config-info(
    title: [Title],
    subtitle: [Subtitle],
    author: [Authors],
    date: datetime.today(),
    institution: [Institution],
    logo: emoji.school,
  ),
)

#include "content.typ"

content.typ is where you write the actual content:

// content.typ
#import "/globals.typ": *

= The Section

== Slide Title

Hello, Touying!

#focus-slide[
  Focus on me.
]

Multiple Sections

Implementing multiple sections is also straightforward. You only need to create a sections directory and move the content.typ file to the sections.typ directory, for example:

// main.typ
#import "/globals.typ": *

#show: university-theme.with(
  aspect-ratio: "16-9",
  config-info(
    title: [Title],
    subtitle: [Subtitle],
    author: [Authors],
    date: datetime.today(),
    institution: [Institution],
    logo: emoji.school,
  ),
)

#include "sections/content.typ"
// #include "sections/another-section.typ"

And

// sections/content.typ
#import "/globals.typ": *

= The Section

== Slide Title

Hello, Touying!

#focus-slide[
  Focus on me.
]

Now, you have learned how to use Touying to achieve a multi-file architecture for large-scale slides.

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