summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/numending/numending.sty
blob: 24d54bdf4d65398fdffebef7709828d0d50d939c (plain)
1
2
3
4
5
6
\ProvidesPackage{numending}
\def\numending#1#2#3#4{\ifnum#1>100
\numending{\numexpr#1-100\relax}{#2}{#3}{#4}\else \ifnum#1 < 21
\ifnum#1> 4 #4\else\ifnum#1=1 #2 \else#3\fi\fi\else \ifnum#1 < 31
\numending{\numexpr#1-20\relax}{#2}{#3}{#4}\else
\numending{\numexpr#1-10\relax}{#2}{#3}{#4}\fi\fi\fi}