{"id":31662091,"url":"https://github.com/overflowcat/chiandiau","last_synced_at":"2026-02-17T11:01:52.340Z","repository":{"id":317396043,"uuid":"1067236535","full_name":"OverflowCat/chiandiau","owner":"OverflowCat","description":"Display tone-based jumpy pronunciations in Typst","archived":false,"fork":false,"pushed_at":"2025-10-12T03:14:50.000Z","size":91,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-18T17:39:34.947Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OverflowCat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-30T15:09:20.000Z","updated_at":"2026-01-04T06:59:15.000Z","dependencies_parsed_at":"2025-09-30T17:39:18.101Z","dependency_job_id":null,"html_url":"https://github.com/OverflowCat/chiandiau","commit_stats":null,"previous_names":["overflowcat/chiandiau"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/OverflowCat/chiandiau","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OverflowCat%2Fchiandiau","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OverflowCat%2Fchiandiau/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OverflowCat%2Fchiandiau/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OverflowCat%2Fchiandiau/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OverflowCat","download_url":"https://codeload.github.com/OverflowCat/chiandiau/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OverflowCat%2Fchiandiau/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29541119,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T08:11:05.436Z","status":"ssl_error","status_checked_at":"2026-02-17T08:09:38.860Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-07T19:48:20.006Z","updated_at":"2026-02-17T11:01:52.336Z","avatar_url":"https://github.com/OverflowCat.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg width=\"640\" height=\"320\" alt=\"logo\" src=\"https://github.com/user-attachments/assets/12d22e0c-ee02-4425-b4d1-d8c95dccf5a2\" /\u003e\n\u003c/p\u003e\n\n# chiandiau\n\n**`chiandiau`** ([腔調](https://en.wiktionary.org/wiki/%E8%85%94%E8%AA%BF#Chinese), Chinese _tone of voice_; Shanghainese _model behavior_) is a [Typst](https://github.com/typst/typst) package to generate [Jumpy Pronunciation](https://test.hambaanglaang.hk/) (跳跳紮注音) for any [Chinese variaties](https://en.wikipedia.org/wiki/Varieties_of_Chinese) or any other toned languages using [Chao tone letters](https://en.wikipedia.org/wiki/Tone_letter).\n\n## Quick start\n\n```typ\n#import \"@preview/chiandiau:0.1.0\": *\n#wuu-wugniu(\n  \"新冠防护勿放松，上海市民有腔调\",\n  \"1shin-kuoe 6vaon-wu 6veq8-faon-son 6zaon-he 6zy-min 6yeu 1chian-diau\",\n\n  // optional parameters\n  pron-font: ..., // custom font (name / list) for pronunciation\n  // see below for more\n)\n```\n\n![](https://github.com/user-attachments/assets/50bcec4c-c0f3-41b7-867e-3aca45999423)\n\n## Examples\n\n… of all available pre-defined writing systems. Check the [repo](https://github.com/OverflowCat/chiandiau) on GitHub for `demo.typ`.\n\n![](https://github.com/user-attachments/assets/5bccb6b6-a94c-4ae3-ae43-abc3cef57182)\n![](https://github.com/user-attachments/assets/fdf172e2-3bac-4027-b392-eccbeb050803)\n![](https://github.com/user-attachments/assets/8cca2287-b4b4-4266-9fb8-a31a7fad11b1)\n![](https://github.com/user-attachments/assets/f6fd050d-e16c-41d8-80cc-1ccbb1d01c42)\n\n\n## Built-in schemes\n\n- **`cmn`**:\n    - [成都話拼音](https://zh.wikipedia.org/wiki/%E5%9B%9B%E5%B7%9D%E8%AF%9D%E6%8B%BC%E9%9F%B3) `cmn-cyuc-sicuan`\n    - [四川話通用拼音](https://zhuanlan.zhihu.com/p/34562639) `cmn-xghu-tongyong`\n        - `scheme`: `\"Guiyang\" | \"Anshun\" | \"Liuzhi\" | \"Xingyi\" | \"Hanyin\" | \"Zhenba\" | \"Shiqian\" | \"Chengdu\" | \"Tongren\" | \"Guanyuan\" | \"Nanchong\" | \"Mianyang\" | \"Wanzhou\"`, default `\"Chengdu\"`\n- **`nan`**: [臺灣台語羅馬字](https://en.wikipedia.org/wiki/Taiwanese_Romanization_System) `nan-tailo` (compatible with [Pe̍h-ōe-jī](https://en.wikipedia.org/wiki/Pe%CC%8Dh-%C5%8De-j%C4%AB))\n- **`wuu`**: [吳語學堂拼音](https://en.m.wiktionary.org/wiki/Wiktionary:About_Chinese/Wu) `wuu-wugniu`\n    - append `\\` and tone after a syllable, like `8geh-soh7\\55` to make `soh` become `55`\n    - `scheme`: see `wuu.typ` on how to pass custom schemes\n- **`yue`**: [粤拼](https://en.wikipedia.org/wiki/Jyutping) `yue-jyutping`\n\nAdditionally, all schemes accepts `..attrs` that will be passed to `cd()` (see below).\n\n## Advanced usage\n\n### Write a new scheme\n\n```typ\n#let cmn-pinyin-scheme = (\n  none,\n  55,\n  35,\n  214, // unimplemented; use 14\n  53,\n)\n\n#let cmn-pinyin(zh, pron, ..attrs) = {\n  let pairs = to-pairs(zh, pron)\n  cd(\n    pairs,\n    scheme: to-scheme(cmn-pinyin-scheme),\n    ..attrs\n  )\n}\n```\n\n`to-scheme` and `to-pairs` cannot handle those with tone sandhi, so this sample will not deal with morphemes like 不 (bù; 'not') and 一 (yī; 'one'). in Standard Chinese. Use `to-sandhi-pairs` instead.\n\n### Use `cd()`\n\n`cd` accepts either:\n- `pairs: (zi: str, pron: str)` + `scheme: (pron: str) =\u003e conter`, or\n- `pairs: (zi: str, pron: str, conter: int)`.\n\nHere conter means the Chao tone number like $1$, $35$, $42$, etc.\n\n#### Optional parameters\n\n```typ\n  dir: direction.btt, // note that zi is before pron\n  pron-font: context text.font, // or font name / list\n  pron-size: .4em, // of zi font size which is .4em of 2em = .8em\n  width: \"monospace\", // or `auto` or fixed value like `1.2em`\n  pron-style: none, // or a function\n  debug: false, // show border of boxes\n```\n\n## Roadmap\n\n- [ ] 3-digit tone numbers\n- [ ] Tone sandhi by character\n- [ ] More built-in schemes\n- [ ] Backgrounds for tone boxes\n\n### Contributing\n\nFeedback, bugfix, or new scheme support are all welcome!\n\n## Acknowledgement\n\n* [Hambaanglaang Cantonese](https://hambaanglaang.hk/about-us-2/) and [粵典](https://words.hk/base/about/) for Graphical Jyutping.\n* [Subaru ad Astra Pø](https://github.com/subaruphoe) (@subaruphoe) for providing and checking Wugniu.\n* justfont for [jf open-huninn](https://github.com/justfont/open-huninn-font/), which supports Pe̍h-ōe-jī letters.\n\n## License\n\nThe source code is released under the Apache 2.0 License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foverflowcat%2Fchiandiau","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foverflowcat%2Fchiandiau","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foverflowcat%2Fchiandiau/lists"}