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.

docsutilitiesfit-to.md

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

Fit to Height / Width

Thanks to ntjess for the code.

Fit to Height

If you need to make an image fill the remaining slide height, you can try the fit-to-height function:

#utils.fit-to-height(1fr)[BIG]

Function definition:

#let fit-to-height(
  width: none, prescale-width: none, grow: true, shrink: true, height, body
) = { .. }

Parameters:

  • width: If specified, this will determine the width of the content after scaling. So, if you want the scaled content to fill half of the slide width, you can use width: 50%.
  • prescale-width: This parameter allows you to make Typst's layout assume that the given content is to be laid out in a container of a certain width before scaling. For example, you can use prescale-width: 200% assuming the slide's width is twice the original.
  • grow: Whether it can grow, default is true.
  • shrink: Whether it can shrink, default is true.
  • height: The specified height.
  • body: The specific content.

Fit to Width

If you need to limit the title width to exactly fill the slide width, you can try the fit-to-width function:

#utils.fit-to-width(1fr)[#lorem(20)]

Function definition:

#let fit-to-width(grow: true, shrink: true, width, body) = { .. }

Parameters:

  • grow: Whether it can grow, default is true.
  • shrink: Whether it can shrink, default is true.
  • width: The specified width.
  • body: The specific content.

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