{"id":28795783,"url":"https://github.com/khonsulabs/nominals","last_synced_at":"2025-10-13T10:40:40.937Z","repository":{"id":217386272,"uuid":"743332460","full_name":"khonsulabs/nominals","owner":"khonsulabs","description":"Formatting of nominal identifiers in various languages (ordered list headings)","archived":false,"fork":false,"pushed_at":"2024-07-25T15:38:54.000Z","size":1825,"stargazers_count":5,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-02T13:54:19.193Z","etag":null,"topics":["formatting","nominals","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/khonsulabs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"github":["ecton"]}},"created_at":"2024-01-15T01:54:09.000Z","updated_at":"2024-07-25T15:38:38.000Z","dependencies_parsed_at":"2024-01-17T05:10:42.171Z","dependency_job_id":"2374f4ec-59a9-4fd8-a117-7b37fc526915","html_url":"https://github.com/khonsulabs/nominals","commit_stats":null,"previous_names":["khonsulabs/nominals"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/khonsulabs/nominals","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khonsulabs%2Fnominals","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khonsulabs%2Fnominals/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khonsulabs%2Fnominals/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khonsulabs%2Fnominals/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khonsulabs","download_url":"https://codeload.github.com/khonsulabs/nominals/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khonsulabs%2Fnominals/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014647,"owners_count":26085555,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["formatting","nominals","rust"],"created_at":"2025-06-18T03:10:21.394Z","updated_at":"2025-10-13T10:40:40.931Z","avatar_url":"https://github.com/khonsulabs.png","language":"Rust","funding_links":["https://github.com/sponsors/ecton"],"categories":[],"sub_categories":[],"readme":"# Nominals\n\n\u003c!-- This file is generated by `rustme`. Ensure you're editing the source in the .rustme/ directory --!\u003e\n\u003c!-- markdownlint-disable first-line-h1 --\u003e\n\n![nominals is considered alpha](https://img.shields.io/badge/status-alpha-orange)\n[![crate version](https://img.shields.io/crates/v/nominals.svg)](https://crates.io/crates/nominals)\n[![Documentation for `main`](https://img.shields.io/badge/docs-main-informational)](https://khonsulabs.github.io/nominals/main/nominals/)\n\nThis type of formatting can be used for list identifiers when creating ordered\nlists similar to HTML's `\u003col\u003e` tag. The crate was written to power the\n`List` widget in [Cushy][cushy].\n\nThis crate's original implementation was inspired by [Typst][typst]'s\nimplementation of list numbering. However, this crate is a fresh implementation\nwith newly-written implementations and types.\n\n```rust\nuse nominals::{Decimal, DigitCollection, Error, LetterLower, Nominal};\n\nfn main() {\n    // Formatting a nominal is as easy as calling to_nominal with the desired\n    // nominal system.\n    assert_eq!(0_u32.to_nominal(\u0026Decimal), \"0\");\n    // By default, alphabet systems treat their first symbol as 0 in the ones\n    // place, but treat the first symbol as 1 in every other digit place.\n    assert_eq!(0_u32.to_nominal(\u0026LetterLower), \"a\");\n    assert_eq!(1_u32.to_nominal(\u0026LetterLower), \"b\");\n    assert_eq!(26_u32.to_nominal(\u0026LetterLower), \"aa\");\n\n    // This behavior can be changed by using the one_based helper:\n    assert_eq!(1_u32.to_nominal(\u0026LetterLower.one_based()), \"a\");\n    assert_eq!(2_u32.to_nominal(\u0026LetterLower.one_based()), \"b\");\n    assert_eq!(27_u32.to_nominal(\u0026LetterLower.one_based()), \"aa\");\n    // When a nominal can't be formatted with `to_nominal`, it falls back to\n    // Decimal.\n    assert_eq!(0_u32.to_nominal(\u0026LetterLower.one_based()), \"0\");\n    assert_eq!(\n        0_u32.try_to_nominal(\u0026LetterLower.one_based()).unwrap_err(),\n        Error::NoZeroSymbol\n    );\n}\n```\n\n## `no_std` support\n\nThis crate is `no_std` compatible, and can operate both with and without\n`alloc`.\n\n[cushy]: https://github.com/khonsulabs/cushy\n[typst]: https://github.com/typst/typst\n\n## Supported Systems\n\n- [`Decimal`](https://khonsulabs.github.io/nominals/main/nominals/struct.Decimal.html): 0‎ 1‎ 2‎ 3‎ 4‎ …‎ 9‎ 10‎ 11‎ 12‎ …‎ 99‎ 100‎ 101‎ 102\n- [`LetterLower`](https://khonsulabs.github.io/nominals/main/nominals/struct.LetterLower.html): a‎ b‎ c‎ d‎ e‎ …‎ z‎ aa‎ ab‎ ac‎ …‎ yz‎ za‎ zb‎ zc\n- [`LetterUpper`](https://khonsulabs.github.io/nominals/main/nominals/struct.LetterUpper.html): A‎ B‎ C‎ D‎ E‎ …‎ Z‎ AA‎ AB‎ AC‎ …‎ YZ‎ ZA‎ ZB‎ ZC\n- [`RomanLower`](https://khonsulabs.github.io/nominals/main/nominals/struct.RomanLower.html): i‎ ii‎ iii‎ iv‎ v‎ vi‎ …‎ ix‎ x‎ xi‎ …‎ mmmcmxcix‎ i̅v̅‎ i̅v̅i‎ …‎ d̅m̅l̅c̅i̅x̅cmxcix‎ m̅‎ m̅i\n- [`RomanUpper`](https://khonsulabs.github.io/nominals/main/nominals/struct.RomanUpper.html): I‎ II‎ III‎ IV‎ V‎ VI‎ …‎ IX‎ X‎ XI‎ …‎ MMMCMXCIX‎ I̅V̅‎ I̅V̅I‎ …‎ D̅M̅L̅C̅I̅X̅CMXCIX‎ M̅‎ M̅I\n- [`CircledNumber`](https://khonsulabs.github.io/nominals/main/nominals/struct.CircledNumber.html): ⓪‎ ①‎ ②‎ ③‎ ④‎ …‎ ⑨‎ ⑩‎ ⑪‎ ⑫‎ …‎ ㊽‎ ㊾‎ ㊿\n- [`DoubleCircledNumber`](https://khonsulabs.github.io/nominals/main/nominals/struct.DoubleCircledNumber.html): ⓵‎ ⓶‎ ⓷‎ ⓸‎ ⓹‎ ⓺‎ ⓻‎ ⓼‎ ⓽‎ ⓾\n- [`ArmenianLower`](https://khonsulabs.github.io/nominals/main/nominals/struct.ArmenianLower.html): ա‎ բ‎ գ‎ …‎ թ‎ ժ‎ ժա‎ ժբ‎ …‎ ղթ‎ ճ‎ ճա\n- [`ArmenianUpper`](https://khonsulabs.github.io/nominals/main/nominals/struct.ArmenianUpper.html): Ա ‎ Բ‎ Գ‎ …‎ Թ‎ Ժ‎ ԺԱ ‎ ԺԲ‎ …‎ ՂԹ‎ Ճ‎ ՃԱ \n- [`Bengali`](https://khonsulabs.github.io/nominals/main/nominals/struct.Bengali.html): ০‎ ১‎ ২‎ ৩‎ ৪‎ …‎ ৯‎ ১০‎ ১১‎ ১২‎ …‎ ৯৯‎ ১০০‎ ১০১‎ ১০২\n- [`Cambodian`](https://khonsulabs.github.io/nominals/main/nominals/struct.Cambodian.html): ០‎ ១‎ ២‎ ៣‎ ៤‎ …‎ ៩‎ ១០‎ ១១‎ ១២‎ …‎ ៩៩‎ ១០០‎ ១០១‎ ១០២\n- [`SimplifiedChineseInformal`](https://khonsulabs.github.io/nominals/main/nominals/struct.SimplifiedChineseInformal.html): 零‎ 一‎ 二‎ …‎ 九‎ 十‎ 十一‎ …‎ 十九‎ 二十‎ 二十一‎ …‎ 九十九‎ 一百‎ 一百零一\n- [`TraditionalChineseInformal`](https://khonsulabs.github.io/nominals/main/nominals/struct.TraditionalChineseInformal.html): 零‎ 一‎ 二‎ …‎ 九‎ 十‎ 十一‎ …‎ 十九‎ 二十‎ 二十一‎ …‎ 九十九‎ 一百‎ 一百零一\n- [`SimplifiedChineseFormal`](https://khonsulabs.github.io/nominals/main/nominals/struct.SimplifiedChineseFormal.html): 零‎ 一‎ 二‎ …‎ 九‎ 一十‎ 一十一‎ …‎ 一十九‎ 二十‎ 二十一‎ …‎ 九十九‎ 一百‎ 一百零一\n- [`TraditionalChineseFormal`](https://khonsulabs.github.io/nominals/main/nominals/struct.TraditionalChineseFormal.html): 零‎ 一‎ 二‎ …‎ 九‎ 一十‎ 一十一‎ …‎ 一十九‎ 二十‎ 二十一‎ …‎ 九十九‎ 一百‎ 一百零一\n- [`CjkDecimal`](https://khonsulabs.github.io/nominals/main/nominals/struct.CjkDecimal.html): 〇‎ 一‎ 二‎ 三‎ 四‎ …‎ 九‎ 一〇‎ 一一‎ 一二‎ …‎ 九九‎ 一〇〇‎ 一〇一‎ 一〇二\n- [`CjkEarthlyBranch`](https://khonsulabs.github.io/nominals/main/nominals/struct.CjkEarthlyBranch.html): 子‎ 丑‎ 寅‎ 卯‎ 辰‎ …‎ 亥‎ 一三‎ 一四‎ 一五‎ …‎ 一四四‎ 一四五‎ 一四六‎ 一四七\n- [`CjkHeavenlyStem`](https://khonsulabs.github.io/nominals/main/nominals/struct.CjkHeavenlyStem.html): 甲‎ 乙‎ 丙‎ 丁‎ 戊‎ …‎ 癸‎ 一一‎ 一二‎ 一三‎ …‎ 一〇〇‎ 一〇一‎ 一〇二‎ 一〇三\n- [`Devanagari`](https://khonsulabs.github.io/nominals/main/nominals/struct.Devanagari.html): ०‎ १‎ २‎ ३‎ ४‎ …‎ ९‎ १०‎ ११‎ १२‎ …‎ ९९‎ १००‎ १०१‎ १०२\n- [`EasternArabic`](https://khonsulabs.github.io/nominals/main/nominals/struct.EasternArabic.html): ٠‎ ١‎ ٢‎ ٣‎ ٤‎ …‎ ٩‎ ١٠‎ ١١‎ ١٢‎ …‎ ٩٩‎ ١٠٠‎ ١٠١‎ ١٠٢\n- [`Ethiopic`](https://khonsulabs.github.io/nominals/main/nominals/struct.Ethiopic.html): ፩‎ ፪‎ ፫‎ …‎ ፲‎ ፲፩‎ ፲፪‎ …‎ ፺፱‎ ፻‎ ፻፩‎ …‎ ፱፻፺፱‎ ፲፻‎ ፲፻፩\n- [`Georgian`](https://khonsulabs.github.io/nominals/main/nominals/struct.Georgian.html): ა‎ ბ‎ გ‎ …‎ თ‎ ი‎ ია‎ იბ‎ …‎ ჟთ‎ რ‎ რა\n- [`GreekLower`](https://khonsulabs.github.io/nominals/main/nominals/struct.GreekLower.html): α‎ β‎ γ‎ δ‎ ε‎ …‎ ω‎ αα‎ αβ‎ αγ‎ …‎ ψω‎ ωα‎ ωβ‎ ωγ\n- [`GreekUpper`](https://khonsulabs.github.io/nominals/main/nominals/struct.GreekUpper.html): Α‎ Β‎ Γ‎ Δ‎ Ε‎ …‎ Ω‎ ΑΑ‎ ΑΒ‎ ΑΓ‎ …‎ ΨΩ‎ ΩΑ‎ ΩΒ‎ ΩΓ\n- [`Gujarati`](https://khonsulabs.github.io/nominals/main/nominals/struct.Gujarati.html): ૦‎ ૧‎ ૨‎ ૩‎ ૪‎ …‎ ૯‎ ૧૦‎ ૧૧‎ ૧૨‎ …‎ ૯૯‎ ૧૦૦‎ ૧૦૧‎ ૧૦૨\n- [`Gurmukhi`](https://khonsulabs.github.io/nominals/main/nominals/struct.Gurmukhi.html): ੦‎ ੧‎ ੨‎ ੩‎ ੪‎ …‎ ੯‎ ੧੦‎ ੧੧‎ ੧੨‎ …‎ ੯੯‎ ੧੦੦‎ ੧੦੧‎ ੧੦੨\n- [`HanjaInformal`](https://khonsulabs.github.io/nominals/main/nominals/struct.HanjaInformal.html): 零‎ 一‎ 二‎ …‎ 九‎ 十‎ 十一‎ …‎ 十九‎ 二十‎ 二十一‎ …‎ 九十九‎ 百‎ 百一\n- [`HangeulFormal`](https://khonsulabs.github.io/nominals/main/nominals/struct.HangeulFormal.html): 영‎ 일‎ 이‎ …‎ 구‎ 일십‎ 일십일‎ …‎ 일십구‎ 이십‎ 이십일‎ …‎ 구십구‎ 일백‎ 일백일\n- [`HangeulJamo`](https://khonsulabs.github.io/nominals/main/nominals/struct.HangeulJamo.html): ㄱ‎ ㄴ‎ ㄷ‎ ㄹ‎ ㅁ‎ …‎ ㅎ‎ ㄱㄱ‎ ㄱㄴ‎ ㄱㄷ‎ …‎ ㅍㅎ‎ ㅎㄱ‎ ㅎㄴ‎ ㅎㄷ\n- [`HangeulSyllable`](https://khonsulabs.github.io/nominals/main/nominals/struct.HangeulSyllable.html): 가‎ 나‎ 다‎ 라‎ 마‎ …‎ 하‎ 가가‎ 가나‎ 가다‎ …‎ 파하‎ 하가‎ 하나‎ 하다\n- [`HanjaFormal`](https://khonsulabs.github.io/nominals/main/nominals/struct.HanjaFormal.html): 零‎ 壹‎ 貳‎ …‎ 九‎ 壹拾‎ 壹拾壹‎ …‎ 壹拾九‎ 貳拾‎ 貳拾壹‎ …‎ 九拾九‎ 壹百‎ 壹百壹\n- [`Hebrew`](https://khonsulabs.github.io/nominals/main/nominals/struct.Hebrew.html): ׳א״‎ ׳ב״‎ ׳ג״‎ …‎ ׳ט״‎ ׳י״‎ …‎ יג‎ יד‎ ט״ו‎ ט״ז‎ יז‎ …‎ שצו‎ שצז‎ שצח‎ שצט‎ ׳ת״\n- [`HexLower`](https://khonsulabs.github.io/nominals/main/nominals/struct.HexLower.html): 0‎ 1‎ 2‎ 3‎ 4‎ …‎ f‎ 10‎ 11‎ 12‎ …‎ ff‎ 100‎ 101‎ 102\n- [`HexUpper`](https://khonsulabs.github.io/nominals/main/nominals/struct.HexUpper.html): 0‎ 1‎ 2‎ 3‎ 4‎ …‎ F‎ 10‎ 11‎ 12‎ …‎ FF‎ 100‎ 101‎ 102\n- [`Hiragana`](https://khonsulabs.github.io/nominals/main/nominals/struct.Hiragana.html): あ‎ い‎ う‎ え‎ お‎ …‎ ん‎ ああ‎ あい‎ あう‎ …‎ をん‎ んあ‎ んい‎ んう\n- [`HiraganaIroha`](https://khonsulabs.github.io/nominals/main/nominals/struct.HiraganaIroha.html): い‎ ろ‎ は‎ に‎ ほ‎ …‎ す‎ いい‎ いろ‎ いは‎ …‎ せす‎ すい‎ すろ‎ すは\n- [`JapaneseFormal`](https://khonsulabs.github.io/nominals/main/nominals/struct.JapaneseFormal.html): 零‎ 壱‎ 弐‎ …‎ 九‎ 壱拾‎ 壱拾壱‎ …‎ 壱拾九‎ 弐拾‎ 弐拾壱‎ …‎ 九拾九‎ 壱百‎ 壱百壱\n- [`JapaneseInformal`](https://khonsulabs.github.io/nominals/main/nominals/struct.JapaneseInformal.html): 〇‎ 一‎ 二‎ …‎ 九‎ 十‎ 十一‎ …‎ 十九‎ 二十‎ 二十一‎ …‎ 九十九‎ 百‎ 百一\n- [`Kannada`](https://khonsulabs.github.io/nominals/main/nominals/struct.Kannada.html): ೦‎ ೧‎ ೨‎ ೩‎ ೪‎ …‎ ೯‎ ೧೦‎ ೧೧‎ ೧೨‎ …‎ ೯೯‎ ೧೦೦‎ ೧೦೧‎ ೧೦೨\n- [`Katakana`](https://khonsulabs.github.io/nominals/main/nominals/struct.Katakana.html): ア‎ イ‎ ウ‎ エ‎ オ‎ …‎ ン‎ アア‎ アイ‎ アウ‎ …‎ ヲン‎ ンア‎ ンイ‎ ンウ\n- [`KatakanaIroha`](https://khonsulabs.github.io/nominals/main/nominals/struct.KatakanaIroha.html): イ‎ ロ‎ ハ‎ ニ‎ ホ‎ …‎ ス‎ イイ‎ イロ‎ イハ‎ …‎ セス‎ スイ‎ スロ‎ スハ\n- [`Lao`](https://khonsulabs.github.io/nominals/main/nominals/struct.Lao.html): ໐‎ ໑‎ ໒‎ ໓‎ ໔‎ …‎ ໙‎ ໑໐‎ ໑໑‎ ໑໒‎ …‎ ໙໙‎ ໑໐໐‎ ໑໐໑‎ ໑໐໒\n- [`Malayalam`](https://khonsulabs.github.io/nominals/main/nominals/struct.Malayalam.html): ൦‎ ൧‎ ൨‎ ൩‎ ൪‎ …‎ ൯‎ ൧൦‎ ൧൧‎ ൧൨‎ …‎ ൯൯‎ ൧൦൦‎ ൧൦൧‎ ൧൦൨\n- [`Mongolian`](https://khonsulabs.github.io/nominals/main/nominals/struct.Mongolian.html): ᠐‎ ᠑‎ ᠒‎ ᠓‎ ᠔‎ …‎ ᠙‎ ᠑᠐‎ ᠑᠑‎ ᠑᠒‎ …‎ ᠙᠙‎ ᠑᠐᠐‎ ᠑᠐᠑‎ ᠑᠐᠒\n- [`Myanmar`](https://khonsulabs.github.io/nominals/main/nominals/struct.Myanmar.html): ၀‎ ၁‎ ၂‎ ၃‎ ၄‎ …‎ ၉‎ ၁၀‎ ၁၁‎ ၁၂‎ …‎ ၉၉‎ ၁၀၀‎ ၁၀၁‎ ၁၀၂\n- [`Oriya`](https://khonsulabs.github.io/nominals/main/nominals/struct.Oriya.html): ୦‎ ୧‎ ୨‎ ୩‎ ୪‎ …‎ ୯‎ ୧୦‎ ୧୧‎ ୧୨‎ …‎ ୯୯‎ ୧୦୦‎ ୧୦୧‎ ୧୦୨\n- [`Persian`](https://khonsulabs.github.io/nominals/main/nominals/struct.Persian.html): ۰‎ ۱‎ ۲‎ ۳‎ ۴‎ …‎ ۹‎ ۱۰‎ ۱۱‎ ۱۲‎ …‎ ۹۹‎ ۱۰۰‎ ۱۰۱‎ ۱۰۲\n- [`Tamil`](https://khonsulabs.github.io/nominals/main/nominals/struct.Tamil.html): ௦‎ ௧‎ ௨‎ ௩‎ ௪‎ …‎ ௯‎ ௧௦‎ ௧௧‎ ௧௨‎ …‎ ௯௯‎ ௧௦௦‎ ௧௦௧‎ ௧௦௨\n- [`Telugu`](https://khonsulabs.github.io/nominals/main/nominals/struct.Telugu.html): ౦‎ ౧‎ ౨‎ ౩‎ ౪‎ …‎ ౯‎ ౧౦‎ ౧౧‎ ౧౨‎ …‎ ౯౯‎ ౧౦౦‎ ౧౦౧‎ ౧౦౨\n- [`Thai`](https://khonsulabs.github.io/nominals/main/nominals/struct.Thai.html): ๐‎ ๑‎ ๒‎ ๓‎ ๔‎ …‎ ๙‎ ๑๐‎ ๑๑‎ ๑๒‎ …‎ ๙๙‎ ๑๐๐‎ ๑๐๑‎ ๑๐๒\n- [`Tibetan`](https://khonsulabs.github.io/nominals/main/nominals/struct.Tibetan.html): ༠‎ ༡‎ ༢‎ ༣‎ ༤‎ …‎ ༩‎ ༡༠‎ ༡༡‎ ༡༢‎ …‎ ༩༩‎ ༡༠༠‎ ༡༠༡‎ ༡༠༢\n\n## Open-source Licenses\n\nThis project, like all projects from [Khonsu Labs](https://khonsulabs.com/), is open-source.\nThis repository is available under the [MIT License](./LICENSE-MIT) or the\n[Apache License 2.0](./LICENSE-APACHE).\n\nTo learn more about contributing, please see [CONTRIBUTING.md](./CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhonsulabs%2Fnominals","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhonsulabs%2Fnominals","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhonsulabs%2Fnominals/lists"}