5

I'm not a fan of italics in math mode, is there a way to make all my math upright?

When using the MinionPro package, I'm quite happy with the frenchmath option, which I believe turns all greek letters and all upper-case latin letters upright. Is there a way to do this using the, perhaps more standard, amsmath package?

7 Answers 7

3

Another font family that you can try is kpfonts. It is designed to be compatible with amsmath, and contains the option for frenchstyle.

1
  • 1
    I know this isn't, strictly speaking, an answer to my question; but I'm glad you showed kpfonts: pretty sweet font family! Oct 17, 2010 at 0:30
4

If you used XeLaTeX, the mathspec or unicode-math packages would provide the means to get fully upright math.

In regular LaTeX, all I can do is tell you some things I've tried. I'm sure people who know what they're doing will explain everything I'm doing wrong. First, you could try something like (for upright Computer Modern):

\SetSymbolFont{letters}{normal}{T1}{cmr}{m}{n}

But that's almost certain to lead to some bad unintended consequences.

Something like this would probably be a little safer, though I still think it may not work the way you'd hope:

\DeclareSymbolFont{mymathvariables}{T1}{cmr}{m}{n}
\DeclareSymbolFontAlphabet{\mathnormal}{mymathvariables}

\DeclareMathSymbol{a}{\mathalpha}{mymathvariables}{`a}
\DeclareMathSymbol{b}{\mathalpha}{mymathvariables}{`b}
\DeclareMathSymbol{c}{\mathalpha}{mymathvariables}{`c}
\DeclareMathSymbol{d}{\mathalpha}{mymathvariables}{`d}
\DeclareMathSymbol{e}{\mathalpha}{mymathvariables}{`e}
\DeclareMathSymbol{f}{\mathalpha}{mymathvariables}{`f}
\DeclareMathSymbol{g}{\mathalpha}{mymathvariables}{`g}
\DeclareMathSymbol{h}{\mathalpha}{mymathvariables}{`h}
\DeclareMathSymbol{i}{\mathalpha}{mymathvariables}{`i}
\DeclareMathSymbol{j}{\mathalpha}{mymathvariables}{`j}
\DeclareMathSymbol{k}{\mathalpha}{mymathvariables}{`k}
\DeclareMathSymbol{l}{\mathalpha}{mymathvariables}{`l}
\DeclareMathSymbol{m}{\mathalpha}{mymathvariables}{`m}
\DeclareMathSymbol{n}{\mathalpha}{mymathvariables}{`n}
\DeclareMathSymbol{o}{\mathalpha}{mymathvariables}{`o}
\DeclareMathSymbol{p}{\mathalpha}{mymathvariables}{`p}
\DeclareMathSymbol{q}{\mathalpha}{mymathvariables}{`q}
\DeclareMathSymbol{r}{\mathalpha}{mymathvariables}{`r}
\DeclareMathSymbol{s}{\mathalpha}{mymathvariables}{`s}
\DeclareMathSymbol{t}{\mathalpha}{mymathvariables}{`t}
\DeclareMathSymbol{u}{\mathalpha}{mymathvariables}{`u}
\DeclareMathSymbol{v}{\mathalpha}{mymathvariables}{`v}
\DeclareMathSymbol{w}{\mathalpha}{mymathvariables}{`w}
\DeclareMathSymbol{x}{\mathalpha}{mymathvariables}{`x}
\DeclareMathSymbol{y}{\mathalpha}{mymathvariables}{`y}
\DeclareMathSymbol{z}{\mathalpha}{mymathvariables}{`z}

\DeclareMathSymbol{A}{\mathalpha}{mymathvariables}{`A}
\DeclareMathSymbol{B}{\mathalpha}{mymathvariables}{`B}
\DeclareMathSymbol{C}{\mathalpha}{mymathvariables}{`C}
\DeclareMathSymbol{D}{\mathalpha}{mymathvariables}{`D}
\DeclareMathSymbol{E}{\mathalpha}{mymathvariables}{`E}
\DeclareMathSymbol{F}{\mathalpha}{mymathvariables}{`F}
\DeclareMathSymbol{G}{\mathalpha}{mymathvariables}{`G}
\DeclareMathSymbol{H}{\mathalpha}{mymathvariables}{`H}
\DeclareMathSymbol{I}{\mathalpha}{mymathvariables}{`I}
\DeclareMathSymbol{J}{\mathalpha}{mymathvariables}{`J}
\DeclareMathSymbol{K}{\mathalpha}{mymathvariables}{`K}
\DeclareMathSymbol{L}{\mathalpha}{mymathvariables}{`L}
\DeclareMathSymbol{M}{\mathalpha}{mymathvariables}{`M}
\DeclareMathSymbol{N}{\mathalpha}{mymathvariables}{`N}
\DeclareMathSymbol{O}{\mathalpha}{mymathvariables}{`O}
\DeclareMathSymbol{P}{\mathalpha}{mymathvariables}{`P}
\DeclareMathSymbol{Q}{\mathalpha}{mymathvariables}{`Q}
\DeclareMathSymbol{R}{\mathalpha}{mymathvariables}{`R}
\DeclareMathSymbol{S}{\mathalpha}{mymathvariables}{`S}
\DeclareMathSymbol{T}{\mathalpha}{mymathvariables}{`T}
\DeclareMathSymbol{U}{\mathalpha}{mymathvariables}{`U}
\DeclareMathSymbol{V}{\mathalpha}{mymathvariables}{`V}
\DeclareMathSymbol{W}{\mathalpha}{mymathvariables}{`W}
\DeclareMathSymbol{X}{\mathalpha}{mymathvariables}{`X}
\DeclareMathSymbol{Y}{\mathalpha}{mymathvariables}{`Y}
\DeclareMathSymbol{Z}{\mathalpha}{mymathvariables}{`Z}

But I think that needs a lot more tweaking.

Apologies in advance to people who know what they're doing and can tell me everything I'm doing wrong.

1
3

You could try the euler fonts. I warn you, they are not universally liked. They were made for the AMS and emulate a handwritten font.

1
  • Thanks, but I'm not a fan of those either :) I'll give it a try anyways. Oct 15, 2010 at 15:38
3

In ConTeXt, if you are using a regular open-type math font, you can use:

\setupbodyfont[xits]
\setupmathematics[ucgreek=normal,lcgreek=normal]
\appendtoks\mathrm \to \everymathematics
2

You can change the font setup. But how exactly depends on your current setup.

\documentclass{article}
\DeclareSymbolFont{letters}     {OT1}{cmr} {m}{n}
\begin{document}
$a=b=1$
\end{document}
2
  • That kills Greek.
    – frabjous
    Oct 15, 2010 at 16:15
  • My example wasn't meant as a working code. One would need an upright OML encoded font to do the above correctly. But it is possible to separate the fonts used for letters and greek. See e.g. in beamerbasefont.sty the definition and use of the "pureletters" font. But whatever you need to do depends on your (unknown) actual math setup. There is no solution that works "in general". Oct 16, 2010 at 9:09
1

There's probably a better way to do this, but what about using the everyhook package to install a hook for \everymath and \everydisplay which sets \fam to 0?

\PushPostHook{math}{\fam0\relax}
\PushPostHook{display}{\fam0\relax}
$\alpha\beta a b c$
\[\alpha\beta a b c\]
\PopPostHook{display}
\PopPostHook{math}
0

I know this is quite an old question, but I have another approach that I think may be worth sharing. We define a new math mode environment using £s instead of $s. The good thing about it is that the ordinary tialic math mode is kept working, which may or may not be what people want.

\documentclass{memoir}
\let\££ %enables you to write the £ sign as \£
\def £#1£{$\mathrm{#1}$}

\begin{document}
   Let £P_1£ be the statement that $e^{i\pi} + 1 = 0$.
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .