The commands
$\mathcal{\mbox{$M$}}$
and
\mbox{$\mathcal{M}$}
produce different output. I would like a replacement for \mbox that creates a box preserving all features of the current font in math mode. How can I do this?
The commands
$\mathcal{\mbox{$M$}}$
and
\mbox{$\mathcal{M}$}
produce different output. I would like a replacement for \mbox that creates a box preserving all features of the current font in math mode. How can I do this?
Please always post complete documents:
\documentclass{article}
\usepackage{amsfonts}
\begin{document}
$\mathcal{\count0=\fam\mbox{$\fam=\count0 M$}}$
\end{document}
\mathcal{M}
\mathcal
You can use the similar commands \mathmbox or \mathmakebox provided by the mathtools package.
\mathcal{M} as result, but \mathcal{\mathmbox{M}} gives the other M.