Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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)
share|improve this question

2 Answers 2

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.

share|improve this answer
    
Printing math upright? Something that's easy to do with the-program-I-never-mention-the-name-of. ;-) Not reader's friendly at all. –  egreg Oct 16 '13 at 11:02
    
Hah, that's really evil, acting like "I'm shy, don't look at me".. lol @egreg –  Ch'en Meng Oct 16 '13 at 11:54

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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