9

In my latex document I would like to change the default font style (i.e italic) of the math mode to normal shape.

By now I am using \mathrm but is there a way to set the style of a specific math snippet?

Something like this:

\begin{align}[font=\rmfamily]
...
\end(align)
bluenot20
  • 241

2 Answers2

5

Really strange demand..

Changing math font may help you---font Euler can be loaded by \usepackage{euler}.

\documentclass{article}
\usepackage{euler}
\usepackage{amsmath}
\begin{document}
\[
    E = mc^2.
\]
\end{document}

In addition, \usepackage[LGRgreek]{mathastext} may be what you are looking for, see here:

\documentclass{article}
\usepackage[LGRgreek]{mathastext}
\usepackage{amsmath}
\begin{document}
\[
    E = mc^2.
\]
\end{document}

Or, if you want to use your own font, have a look at the section 3.4 "Declaring math alphabets" of document fntguide (type texdoc fntguide in terminal window).

Indeed, I strongly advise not to do evil things like printing all math upright.. PLUS ONE.

Ch'en Meng
  • 3,843
  • 1
  • 19
  • 45
3

Simply put these in your preamble:

\everymath\expandafter{\the\everymath\mathgroup0}
\everydisplay\expandafter{\the\everydisplay\mathgroup0}

It doesn't look good though, so I guess you may also want to change font.

Francis
  • 6,183