$$\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.


  • 3
    What are you trying to achieve by placing a text sentence in a display-math setting? – Mico May 10 at 21:48
  • 1
  • 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
  • 3
    Why are you adding the $$ around the text? – Ulrike Fischer May 10 at 21:55
  • 6
    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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.