Ampersand symbol in \textit

I need this exact symbol of & but when I try to put it into \textit{}, it outputs a very different version of this symbol. How do I achieve this symbol & in \textit{}?

• tex has no information on the shape of characters, it is the choice of the font designer. In computer modern fonts the italic & shows a different form but this is no different from the fact that g is often a looped variant in italic, you could find another font where the italic & was more like a sloped &. – David Carlisle Apr 30 '18 at 12:44
• You could try \textsl{\&} which is somewhat close, but not perfect. – Dan Apr 30 '18 at 12:44

If you want that & doesn't change shape when in an italic context, redefine \& to use \textup:

\documentclass{article}

\renewcommand{\&}{\textup{\symbol{\&}}}

\begin{document}

This \& that

\textit{This \& that}

\end{document}


If you want it to be slanted in italic contexts:

\documentclass{article}

\DeclareRobustCommand{\&}{%
\ifdim\fontdimen1\font>0pt
\textsl{\symbol{\&}}%
\else
\symbol{\&}%
\fi
}

\begin{document}

This \& that

\textit{This \& that}

\end{document}


A bit of explanation: the first font parameter in a font tells TeX about its slant. If it's positive, then the font is slanted to the right. It is true for italic and slanted fonts. So, if the parameter is positive for the current font (that in TeX is accessible as \font), we enclose \symbol{\&} in \textsl. However, this will do nothing sensible if the current font family doesn't have a slanted variant (as opposed to italics).