Skip to content

auto-mando:0.2.0#4336

Open
VincentTam wants to merge 13 commits intotypst:mainfrom
VincentTam:auto-mando-0.2.0
Open

auto-mando:0.2.0#4336
VincentTam wants to merge 13 commits intotypst:mainfrom
VincentTam:auto-mando-0.2.0

Conversation

@VincentTam
Copy link
Contributor

I am submitting

  • a new package
  • an update for a package

Description: My basic attempt for automatic Mandarin annotations (pīnyīn & zhuyin) with word segmentation.

It's inspired by Typst packages easy-pinyin and auto-pinyin, and it's a Mandarin version of my Typst package auto-canto.

Motivations: in short, to provide a Typst package with a more sensible usage.

  1. Word segmentation would allow a more accurate conversion to Mandarin annotations from Chinese characters. For details, please refer to the beginning of my Rust crate rust-mando
  2. The zhuyin function in easy-pinyin does not represent Zhuyin (a.k.a. Bopomofo), which is a phonetic system invented a century ago, and still commonly used in Taiwan.
  3. The pinyin style used by easy-pinyin is the tone_num style in the Rust crate pinyin, which is used by the WASM plugin of auto-pinyin. The tone_num_end style is more commonly used by pīnyīn learners on the Web, because the tone style (with diacritics indicating the Mandarin tone contours), which is more common in teaching materials, is more difficult to input and handle in computing.
  4. To provide a basic means to annotate Chinese characters with Zhuyin alphabets.

ℹ️ My WASM file size is 6.4MB. As documented in the README in the dict/ folder of my Rust crate, this comes from a big Jieba dictionary dict.txt.big (for proper tokenization of both Simplified & Traditional Chinese text) and CC-CEDICT (for generating a pin1yin1 dictionary).

I've tried my best to reduce the WASM plugin size, following the method for auto-canto (zstd compression for dictionary file), followed by wasm-opt.

I have read and followed the submission guidelines and, in particular, I

  • selected a name that isn't the most obvious or canonical name for what the package does
  • added a typst.toml file with all required keys
  • added a README.md with documentation for my package
  • have chosen a license and added a LICENSE file or linked one in my README.md
  • tested my package locally on my system and it worked
  • excluded PDFs or README images, if any, but not the LICENSE

@typst-package-check typst-package-check bot added the new A new package submission. label Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new A new package submission.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants