I would like to have a command which executes a simple division of numbers.
This \newcommand{\mylen}[1]{1.0 / #1}
just prints 1.0 / 3
when invoked as \mylen{3}
and not the desired 0.33333
. What do I have to do?
Edit: The result should be usable in an expression like \includegraphics[width=\mylen{3}\textwidth]{a}
\dimexpr
is OK. For something more complicated, you might want to use `luatex. See the section on Arithmetic without using abacus on the ConTeXt wiki.