Skip to main content

glossary-indexer

扫描 Typst 文件中的标签(如 <def:limit-of-sequence-of-sets>),在 Appendix 的 Glossary 节中生成字母索引。

설치로 이동

소스 정보

저장소
locusyuri/MathRepo
최근 소스 활동
2026년 6월 16일 12:56
감지된 SKILL.md 언어
영어
스타
6
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
glossary-indexer
description
扫描 Typst 文件中的标签(如 <def:limit-of-sequence-of-sets>),在 Appendix 的 Glossary 节中生成字母索引。
user_invocable
true
# Glossary Indexer (索引生成技能) ## Usage ``` /glossary-indexer <subject-initial.typ> ``` ## Workflow Given a Typst file path (e.g. `1.Analyse/Analyse Réelle/chapters/LebesgueIntegration.typ`), perform the following steps: ### Step 1: Scan for Labels Search the file for all labels matching the pattern: ```regex <[a-z]+:[a-z][a-z0-9-]*> ``` Examples: `<def:continuation>`, `<def:limit-of-sequence-of-sets>`, `<thm:open-set-construction>` Use `grep` (POSIX) / `findstr` (Windows) to extract all unique labels. ### Step 2: Parse Each Label Split each label into: - **Prefix**: the part before the first `:` (e.g. `def`, `thm`, `lem`, `cor`, `prop`, `ex`, `note`) - **Name**: the kebab-case part after the `:` (e.g. `limit-of-sequence-of-sets`) - **Display Name**: convert kebab-case to Title Case with spaces - Replace `-` with ` ` - Capitalize first letter of each word - Example: `limit-of-sequence-of-sets` → `Limit of a Sequence of Sets` ### Step 3: Organize Alphabetically Group entries by the **first letter** of the Display Name (uppercase A-Z). For each letter group, sort entries alphabetically. ### Step 4: Generate Glossary Content Generate the following structure at the end of the file: ```typst #part("Appendix") = Glossary == A - *#link(<def:...>)[Display Name]* - *#link(<thm:...>)[Display Name]* == B - ... ``` Rules: - Use `== <Letter>` for each letter heading - Use `- *#link(<tag>)[Display Name]*` for each entry (bullet + link) - Skip letters that have no entries - Delete any existing glossary content between `#part("Appendix")` and the end of file before inserting the new one ### Step 5: Verify Compile the file after insertion: ```bash typst compile "<subject>/initial.typ" "<subject>/initial.pdf" --root . ```
GitHub에서 보기