Following MWE does not work:
\documentclass{article}
\usepackage{calc}
\newlength{\charwidth}
\setlength{\charwidth}{\widthof{$-$}}
\begin{document}
\centering $\infty$
\centering \hspace{-\charwidth}$-\infty$
\centering \hspace{-\widthof{$-$}}$-\infty$
\end{document}
\hspace{-\widthof{$-$}} throws following error
! Missing number, treated as zero. <to be read again> \widthof l.10 \centering \hspace{-\widthof{$-$}} $-\infty$ ?
Is there a possibility to insert negative \widthof into \hspace without defining a newlength?

\hspacewhen addingcalcsupport to the rest of the format back when we made 2e. You can use the scratch register0if you don't want to define a new length\setlength{\dimen0}{-\widthof{$-$}}\hspace{\dimen0}– David Carlisle Jul 28 '15 at 12:25calcgoes through several hoops in order to get\withofto work inside\setlength, so it is no wonder that it will not work in other everyday circumstances. – daleif Jul 28 '15 at 12:28\widthofto hspace (see http://tex.stackexchange.com/a/99242/2388), the negative-\widthof{..}doesn't work -- neither in the\setlengthnor elsewhere. – Ulrike Fischer Jul 28 '15 at 12:32\hspace{\widthof{$-$}}does not work. – Aug 29 '15 at 17:50