All skills
jihe520 avatar

/typst-author

@4a360cb
by Sanjinjihe520/mathmodelagent6.2k stars
450

Generate idiomatic Typst (.typ) code, edit and troubleshoot Typst documents and projects, and answer Typst syntax/reference questions. Use when working with .typ files or when the user explicitly asks for Typst document creation, editing, debugging, compilation, formatting, template work, or package usage.

Use this Skill: https://skilld.dev/gh/jihe520/mathmodelagent/typst-author

This session only. Nothing lands on disk.

docsreferencemodelnumbering.md

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

Numbering

numbering

Applies a numbering to a sequence of numbers.

A numbering defines how a sequence of numbers should be displayed as content. It is defined either through a pattern string or an arbitrary function.

A numbering pattern consists of counting symbols, for which the actual number is substituted, their prefixes, and one suffix. The prefixes and the suffix are displayed as-is.

Example

#numbering("1.1)", 1, 2, 3) \
#numbering("1.a.i", 1, 2) \
#numbering("I – 1", 12, 2) \
#numbering(
  (..nums) => nums
    .pos()
    .map(str)
    .join(".") + ")",
  1, 2, 3,
)

Numbering patterns and numbering functions

There are multiple instances where you can provide a numbering pattern or function in Typst. For example, when defining how to number headings or figures. Every time, the expected format is the same as the one described below for the numbering parameter.

The following example illustrates that a numbering function is just a regular function that accepts numbers and returns content.

#let unary(.., last) = "|" * last
#set heading(numbering: unary)
= First heading
= Second heading
= Third heading
#numbering(
  numbering,
  numbers
) -> any

Parameters

  • numbering:
    • description: Defines how the numbering works. Counting symbols are 1, a, A, i, I, α, Α, 一, 壹, あ, い, ア, イ, א, 가, ㄱ, *, ١, ۱, १, ১, ক, ①, and ⓵. They are replaced by the number in the sequence, preserving the original case. The * character means that symbols should be used to count, in the order of *, †, ‡, §, , ‖. If there are more than six items, the number is represented using repeated symbols. Suffixes are all characters after the last counting symbol. They are displayed as-is at the end of any rendered number. Prefixes are all characters that are neither counting symbols nor suffixes. They are displayed as-is at in front of their rendered equivalent of their counting symbol. This parameter can also be an arbitrary function that gets each number as an individual argument. When given a function, the numbering function just forwards the arguments to that function. While this is not particularly useful in itself, it means that you can just give arbitrary numberings to the numbering function without caring whether they are defined as a pattern or function.
    • type: str | function
    • default: None
  • numbers:
    • description: The numbers to apply the numbering to. Must be non-negative. In general, numbers are counted from one. A number of zero indicates that the first element has not yet appeared. If numbering is a pattern and more numbers than counting symbols are given, the last counting symbol with its prefix is repeated.
    • type: int
    • default: None

Source: SKILL.md on GitHub

1 alert3mo3 checks · Risk SAFE
  • Gen Agent Trust Hub3mo

    This skill is a comprehensive Typst authoring assistant that provides a complete local mirror of the Typst documentation (tutorials, guides, and reference). It facilitates the generation, editing, and troubleshooting of Typst documents using standard ecosystem tools such as 'typst' and 'typstyle'. The instructions emphasize accuracy by directing the agent to prioritize local documentation and include safety checkpoints for formatting and editing tasks. No malicious patterns, data exfiltration risks, or other security threats were identified.

  • Socket3mo

    1 alert: obfuscatedFile

  • Snyk3mo

    Risk: LOW · No issues

Signed by skilld at 4a360cb. 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 4 months ago

README badge

README badge for jihe520/mathmodelagent/typst-author