[Tex/LaTex] How to change default font style in math mode

fontsmath-mode

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)

Best Answer

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.