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.

docsreferencemodelenum.md

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

Numbered List

enum

A numbered list.

Displays a sequence of items vertically and numbers them consecutively.

Example

Automatically numbered:
+ Preparations
+ Analysis
+ Conclusions

Manually numbered:
2. What is the first step?
5. I am confused.
+  Moving on ...

Multiple lines:
+ This enum item has multiple
  lines because the next line
  is indented.

Function call.
#enum[First][Second]

You can easily switch all your enumerations to a different numbering style with a set rule.

#set enum(numbering: "a)")

+ Starting off ...
+ Don't forget step two

You can also use enum.item to programmatically customize the number of each item in the enumeration:

#enum(
  enum.item(1)[First step],
  enum.item(5)[Fifth step],
  enum.item(10)[Tenth step]
)

Syntax

This functions also has dedicated syntax:

  • Starting a line with a plus sign creates an automatically numbered enumeration item.
  • Starting a line with a number followed by a dot creates an explicitly numbered enumeration item.

Enumeration items can contain multiple paragraphs and other block-level content. All content that is indented more than an item's marker becomes part of that item.

#enum(
  tight: bool,
  numbering: str | function,
  start: auto | int,
  full: bool,
  reversed: bool,
  indent: length,
  body-indent: length,
  spacing: auto | length,
  number-align: alignment,
  children
) -> content

Parameters

  • tight:
    • description: Defines the default spacing of the enumeration. If it is false, the items are spaced apart with paragraph spacing. If it is true, they use paragraph leading instead. This makes the list more compact, which can look better if the items are short. In markup mode, the value of this parameter is determined based on whether items are separated with a blank line. If items directly follow each other, this is set to true; if items are separated by a blank line, this is set to false. The markup-defined tightness cannot be overridden with set rules. typst + If an enum has a lot of text, and maybe other inline content, it should not be tight anymore. + To make an enum wide, simply insert a blank line between the items.
    • type: bool
    • default: true
  • numbering:
    • description: How to number the enumeration. Accepts a numbering pattern or function. If the numbering pattern contains multiple counting symbols, they apply to nested enums. If given a function, the function receives one argument if full is false and multiple arguments if full is true. typst #set enum(numbering: "1.a)") + Different + Numbering + Nested + Items + Style #set enum(numbering: n => super[#n]) + Superscript + Numbering!
    • type: str | function
    • default: "1."
  • start:
    • description: Which number to start the enumeration with. typst #enum( start: 3, [Skipping], [Ahead], )
    • type: auto | int
    • default: auto
  • full:
    • description: Whether to display the full numbering, including the numbers of all parent enumerations. typst #set enum(numbering: "1.a)", full: true) + Cook + Heat water + Add ingredients + Eat
    • type: bool
    • default: false
  • reversed:
    • description: Whether to reverse the numbering for this enumeration. typst #set enum(reversed: true) + Coffee + Tea + Milk
    • type: bool
    • default: false
  • indent:
    • description: The indentation of each item.
    • type: length
    • default: 0pt
  • body-indent:
    • description: The space between the numbering and the body of each item.
    • type: length
    • default: 0.5em
  • spacing:
    • description: The spacing between the items of the enumeration. If set to auto, uses paragraph leading for tight enumerations and paragraph spacing for wide (non-tight) enumerations.
    • type: auto | length
    • default: auto
  • number-align:
    • description: The alignment that enum numbers should have. By default, this is set to end + top, which aligns enum numbers towards end of the current text direction (in left-to-right script, for example, this is the same as right) and at the top of the line. The choice of end for horizontal alignment of enum numbers is usually preferred over start, as numbers then grow away from the text instead of towards it, avoiding certain visual issues. This option lets you override this behaviour, however. (Also to note is that the unordered list uses a different method for this, by giving the marker content an alignment directly.). typst #set enum(number-align: start + bottom) Here are some powers of two: 1. One 2. Two 4. Four 8. Eight 16. Sixteen 32. Thirty two
    • type: alignment
    • default: end + top
  • children:
    • description: The numbered list's items. When using the enum syntax, adjacent items are automatically collected into enumerations, even through constructs like for loops. typst #for phase in ( "Launch", "Orbit", "Descent", ) [+ #phase]
    • type: content | array
    • default: None

Definitions

enum.item

An enumeration item.

#enum.item(
  number,
  body
) -> content
Parameters
  • number:
    • description: The item's number.
    • type: auto | int
    • default: auto
  • body:
    • description: The item's body.
    • type: content
    • 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