[Tex/LaTex] Math mode in document title

math-modetitles

The title of the LaTeX document I'm writing has some math-mode expressions. However, its font type does not match that in the rest of words, which are not in math-mode.

Example:

\documentclass[a4paper]{article}

\title{From $7-8$~$\mu$m}
\author{Baister}

\begin{document}
\maketitle
\end{document}

As you can see, "From" and "m" looks different than the rest of the letters.

I'm forced to use a concrete class (provided by a company), so that I can't use titlepage environment.

How can I solve this problem?

Thanks.

Best Answer

You could \unslant the \mu, using Bruno's \slantbox described at Shear transform a "box". I also set the number range as 7--8 in text mode, since the math version of your MWE was typeset as seven minus eight.

\documentclass[a4paper]{article}
\def\slantvalue{0}
\newsavebox{\foobox}
\newcommand{\slantbox}[2][\slantvalue]{\mbox{%
        \sbox{\foobox}{#2}%
        \hskip\wd\foobox
        \pdfsave
        \pdfsetmatrix{1 0 #1 1}%
        \llap{\usebox{\foobox}}%
        \pdfrestore
}}
\def\unslant#1{\slantbox[-.25]{$#1$}}

\title{From 7--8~\unslant{\mu}m}
\author{Baister}

\begin{document}
\maketitle
\end{document}

enter image description here

There is also the upgreek package; however, its font may not match the underlying font either:

\documentclass[a4paper]{article}
\usepackage{upgreek}

\title{From 7--8~$\upmu$m}
\author{Baister}

\begin{document}
\maketitle
\end{document}

enter image description here