# Can't remove italic format from my text with either \normalfont or \textnormal

$$\textit{Some italic and {\normalfont non italic} text}$$
$$\textit{Some italic and \textnormal{non italic} text}$$


My LaTeX block above is supposed to generate text like this (the first line):

But when I put that into my workflow (R Markdown -> Pandoc -> HTML) it comes out looking like this (the white font output below). What is going wrong? Seems nothing is recognizing my \normalfont or \textnormal arguments.

• What are you trying to achieve by placing a text sentence in a display-math setting? – Mico May 10 at 21:48
• – Phelype Oleinik May 10 at 21:48
• Are you typesetting your test document with LaTeX or with pandoc? If it's the latter, your posting will be closed as off-topic for this site. – Mico May 10 at 21:51
• Why are you adding the $$around the text? – Ulrike Fischer May 10 at 21:55 • You are in math, and math you should use math font commands and not text font commands. E.g. $\mathit{ABC} = \mathrm{minimum}{\mathit{XYZ}, \mathit{ZYX}}$  – Ulrike Fischer May 10 at 22:04 ## 1 Answer With$$ you are entering math mode. And in math mode you should use math fonts and math switches.

 $\mathit{ABC} = \mathrm{minimum}{\mathit{XYZ}, \mathit{ZYX}}$

• Anything wrong with using this instead? $ABC = \mathrm{minimum}\{XYZ, ZYX\}$. Isn't putting \mathit{} redundant since \mathit{} is default behavior inside $ and $? – Jason Hunter May 13 at 15:19