nanpa.sty 581 B

123456789101112131415161718192021222324252627
  1. \NeedsTeXFormat{LaTeX2e}
  2. \ProvidesPackage{nanpa}[2020/11/21 nanpa]
  3. \def\@nanpa#1{%
  4. \ifcase#1\or wan\or tu\else mute\fi}
  5. \def\@nanpasuli#1{%
  6. \ifnum #1 < 1
  7. ala \fi
  8. \ifnum #1 > 100
  9. ale \@nanpasuli{\the\numexpr#1-100}\fi
  10. \ifnum #1 = 100
  11. ale\fi
  12. \ifnum #1 > 20
  13. \ifnum #1 < 100
  14. mute \@nanpasuli{\numexpr#1-20}\fi\fi
  15. \ifnum #1 = 20
  16. mute\fi
  17. \ifnum #1 > 5
  18. \ifnum #1 < 20
  19. luka \@nanpasuli{\the\numexpr#1-5}\fi\fi
  20. \ifcase#1 \or wan\or tu\or tu wan\or tu tu\or luka\fi
  21. }
  22. \def\nanpa#1{\expandafter\@nanpa\csname c@#1\endcsname}
  23. \def\nanpasuli#1{\expandafter\@nanpasuli\csname c@#1\endcsname}