I have a package for \hg and \hgunits as given here
I wanted to use it like this:
\item svoboda a volnost {\jednotky{22}}
\item \def\aa{\value\modulo{152123}{10}}
{\hg
\hgunits{\aa}
}
HERE
{\hg
\hgunits{2}
}
WORKS but
{\hg
\hgunits{\aa}
}
DOES NOT.
ALSO \jednotky{22} prints the correct value 2 when called alone.
I would like to know how to fix it.
the package:
\usepackage[nomessages]{fp}
\newcommand{\modulo}[2]{%
\FPeval{\result}{trunc(#1-(#2*trunc(#1/#2,0)),0)}\result%
}
\newcommand\jednotky[1]{
$\modulo{#1}{10}$
}
\valueis a macro that takes one argument so\value\modulois the same as\value{\modulo}which causes all sorts of errors, you intended\value{\modulo{152123}{10}}but that also will do nothing useful as the argument to\valueis the name of a counter, likesectionorenumialso do not use\aaas the name, that is a standard latex command. – David Carlisle Oct 07 '19 at 13:02! Emergency stop.
\hgnumcommand to https://tex.stackexchange.com/a/511167/1090 that takes a number and expands to the hieroglyph typesetting, no mod 10 arithmetic is needed. – David Carlisle Oct 07 '19 at 13:28\!irrespective of the counters, it is a math mode command. I have no idea what\babyloniannumis (and this is not the place to define it in comments on an unrelated question) – David Carlisle Oct 07 '19 at 13:52