<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{simurgh-adadi}[2013/09/18 v0.01a adadi counter]
\newcommand{\adadi}[1]{%
\expandafter\@adadi\csname c@#1\endcsname%
}
\newcommand{\@adadi}[1]{%
\simurgh@numberstring{#1}\simurgh@yekanii{ØµÙØ±}{}%
}
\let\adadinumeral\@adadi%
\def\simurgh@numberoutofrange#1#2{%
\simurgh@error{The number `#1' is too large %
to be formatted using simurgh}{The largest possible %
number is 999,999,999.}%
}
\def\simurgh@numberstring#1#2#3#4{%
\ifnum\number#1&lt;\@ne%
#3%
\else\ifnum\number#1&lt;1000000000 %
\expandafter\simurgh@adadi\expandafter{\number#1}#2%
\else%
\simurgh@numberoutofrange{#1}{#4}%
\fi\fi%
}
\def\simurgh@adadi#1#2{%
\expandafter\simurgh@@adadi%
\ifcase%
\ifnum#1&lt;10 1%
\else\ifnum#1&lt;100 2%
\else\ifnum#1&lt;\@m 3%
\else\ifnum#1&lt;\@M 4%
\else\ifnum#1&lt;100000 5%
\else\ifnum#1&lt;1000000 6%
\else\ifnum#1&lt;10000000 7%
\else\ifnum#1&lt;100000000 8%
\else9%
\fi\fi\fi\fi\fi\fi\fi\fi %
\or00000000#1% case 1: Add 8 leading zeros
\or0000000#1%  case 2: Add 7 leading zeros
\or000000#1%   case 3: Add 6 leading zeros
\or00000#1%    case 4: Add 5 leading zeros
\or0000#1%     case 5: Add 4 leading zeros
\or000#1%      case 6: Add 3 leading zeros
\or00#1%       case 7: Add 2 leading zeros
\or0#1%        case 8: Add 1 leading zero
\or#1%         case 9: Add no leading zeros
\or%
\@nil#2%
\fi%
}
\def\simurgh@@adadi#1#2#3#4#5#6#7\or#8\@nil#9{%
\ifnum#1#2#3&gt;\z@
\simurgh@milyoongan#1#2#3%
\ifnum#7&gt;\z@\ifnum#4#5#6&gt;\z@\ Ùˆ \else\ Ùˆ \fi\else\ifnum#4#5#6&gt;\z@\ Ùˆ \fi\fi%
\fi%
\ifnum#4#5#6&gt;\z@%
\simurgh@sadgan#4#5#6{#1#2#3}{#4#5}\simurgh@yekani%
\ifnum#4#5#6&gt;\@neâ€Œ\fi%
Ù‡Ø²Ø§Ø±%
\ifnum#7&gt;\z@\ Ùˆ \fi%
\fi%
\simurgh@sadgan#7{#4#5#6}1#9%
}
\def\simurgh@milyoongan#1#2#3{%
\ifnum#1#2#3=\@ne%
\simurgh@sadgan#1#2#301\simurgh@yekaniii%
â€Œ%
Ù…ÛŒÙ„ÛŒÙˆÙ†%
\else%
\simurgh@sadgan#1#2#301\simurgh@yekanii%
â€Œ%
Ù…ÛŒÙ„ÛŒÙˆÙ†%
\fi%
}
\def\simurgh@sadgan#1#2#3#4#5#6{%
\ifnum#1&gt;\z@%
\ifnum#4#1&gt;\@ne\simurgh@yekaniv#1\fi%
ØµØ¯%
\ifnum#2#3&gt;\z@\ Ùˆ \fi%
\fi%
\ifnum#2#3&lt;20%
\ifnum#5#2#3&gt;\@ne#6{#2#3}\fi%
\else%
\simurgh@dahgan#2%
\ifnum#3&gt;\z@\ Ùˆ \simurgh@yekani#3\fi%
#60%
\fi%
}
\def\simurgh@yekani#1{%
\ifcase#1\@empty\or ÛŒÚ©\or Ø¯Ùˆ\or Ø³Ù‡\or Ú†Ù‡Ø§Ø±\or Ù¾Ù†Ø¬\or Ø´Ø´%
\or Ù‡ÙØª\or Ù‡Ø´Øª\or Ù†Ù‡\or Ø¯Ù‡\or ÛŒØ§Ø²Ø¯Ù‡\or Ø¯ÙˆØ§Ø²Ø¯Ù‡\or Ø³ÛŒØ²Ø¯Ù‡%
\or Ú†Ù‡Ø§Ø±Ø¯Ù‡\or Ù¾Ø§Ù†Ø²Ø¯Ù‡\or Ø´Ø§Ù†Ø²Ø¯Ù‡\or Ù‡ÙØ¯Ù‡%
\or Ù‡Ø¬Ø¯Ù‡\or Ù†ÙˆØ²Ø¯Ù‡\fi%
}
\def\simurgh@yekanii#1{%
\ifcase#1\@empty\or ÛŒÚ©\else\simurgh@yekani{#1}\fi%
}
\def\simurgh@yekaniii#1{%
\ifcase#1\@empty\or ÛŒÚ©\else\simurgh@yekani{#1}\fi%
}
\def\simurgh@yekaniv#1{%
\ifcase#1\@empty\or\or Ø¯ÙˆÛŒ\or Ø³ÛŒ\or Ú†Ù‡Ø§Ø±\or Ù¾Ø§Ù†\or Ø´Ø´%
\or Ù‡ÙØª\or Ù‡Ø´Øª\or Ù†Ù‡\fi%
}
\def\simurgh@dahgan#1{%
\ifcase#1\or\or Ø¨ÛŒØ³Øª\or Ø³ÛŒ\or Ú†Ù‡Ù„%
\or Ù¾Ù†Ø¬Ø§Ù‡\or Ø´ØµØª\or Ù‡ÙØªØ§Ø¯\or Ù‡Ø´ØªØ§Ø¯%
\or Ù†ÙˆØ¯\fi%
}
\endinput</pre></body></html>