1

I would like to know how to make the upright italics of the computer modern font the default choice on math mode for the whole document.

enter image description here

6

You define a new symbol font for the letters and reset their math codes.

\documentclass{article}

\DeclareSymbolFont{uiletters}{OT1}{cmr}{m}{ui}
\DeclareMathSymbol{a}{\mathalpha}{uiletters}{`a}
\DeclareMathSymbol{b}{\mathalpha}{uiletters}{`b}
\DeclareMathSymbol{c}{\mathalpha}{uiletters}{`c}
\DeclareMathSymbol{d}{\mathalpha}{uiletters}{`d}
\DeclareMathSymbol{e}{\mathalpha}{uiletters}{`e}
\DeclareMathSymbol{f}{\mathalpha}{uiletters}{`f}
\DeclareMathSymbol{g}{\mathalpha}{uiletters}{`g}
\DeclareMathSymbol{h}{\mathalpha}{uiletters}{`h}
\DeclareMathSymbol{i}{\mathalpha}{uiletters}{`i}
\DeclareMathSymbol{j}{\mathalpha}{uiletters}{`j}
\DeclareMathSymbol{k}{\mathalpha}{uiletters}{`k}
\DeclareMathSymbol{l}{\mathalpha}{uiletters}{`l}
\DeclareMathSymbol{m}{\mathalpha}{uiletters}{`m}
\DeclareMathSymbol{n}{\mathalpha}{uiletters}{`n}
\DeclareMathSymbol{o}{\mathalpha}{uiletters}{`o}
\DeclareMathSymbol{p}{\mathalpha}{uiletters}{`p}
\DeclareMathSymbol{q}{\mathalpha}{uiletters}{`q}
\DeclareMathSymbol{r}{\mathalpha}{uiletters}{`r}
\DeclareMathSymbol{s}{\mathalpha}{uiletters}{`s}
\DeclareMathSymbol{t}{\mathalpha}{uiletters}{`t}
\DeclareMathSymbol{u}{\mathalpha}{uiletters}{`u}
\DeclareMathSymbol{v}{\mathalpha}{uiletters}{`v}
\DeclareMathSymbol{w}{\mathalpha}{uiletters}{`w}
\DeclareMathSymbol{x}{\mathalpha}{uiletters}{`x}
\DeclareMathSymbol{y}{\mathalpha}{uiletters}{`y}
\DeclareMathSymbol{z}{\mathalpha}{uiletters}{`z}
\DeclareMathSymbol{A}{\mathalpha}{uiletters}{`A}
\DeclareMathSymbol{B}{\mathalpha}{uiletters}{`B}
\DeclareMathSymbol{C}{\mathalpha}{uiletters}{`C}
\DeclareMathSymbol{D}{\mathalpha}{uiletters}{`D}
\DeclareMathSymbol{E}{\mathalpha}{uiletters}{`E}
\DeclareMathSymbol{F}{\mathalpha}{uiletters}{`F}
\DeclareMathSymbol{G}{\mathalpha}{uiletters}{`G}
\DeclareMathSymbol{H}{\mathalpha}{uiletters}{`H}
\DeclareMathSymbol{I}{\mathalpha}{uiletters}{`I}
\DeclareMathSymbol{J}{\mathalpha}{uiletters}{`J}
\DeclareMathSymbol{K}{\mathalpha}{uiletters}{`K}
\DeclareMathSymbol{L}{\mathalpha}{uiletters}{`L}
\DeclareMathSymbol{M}{\mathalpha}{uiletters}{`M}
\DeclareMathSymbol{N}{\mathalpha}{uiletters}{`N}
\DeclareMathSymbol{O}{\mathalpha}{uiletters}{`O}
\DeclareMathSymbol{P}{\mathalpha}{uiletters}{`P}
\DeclareMathSymbol{Q}{\mathalpha}{uiletters}{`Q}
\DeclareMathSymbol{R}{\mathalpha}{uiletters}{`R}
\DeclareMathSymbol{S}{\mathalpha}{uiletters}{`S}
\DeclareMathSymbol{T}{\mathalpha}{uiletters}{`T}
\DeclareMathSymbol{U}{\mathalpha}{uiletters}{`U}
\DeclareMathSymbol{V}{\mathalpha}{uiletters}{`V}
\DeclareMathSymbol{W}{\mathalpha}{uiletters}{`W}
\DeclareMathSymbol{X}{\mathalpha}{uiletters}{`X}
\DeclareMathSymbol{Y}{\mathalpha}{uiletters}{`Y}
\DeclareMathSymbol{Z}{\mathalpha}{uiletters}{`Z}

\begin{document}

New setup: $ax+by=1$ $\hat{a}+\ddot{a}$

Standard setup $\mathnormal{ax+by}=1$ % for a check

\end{document}

enter image description here

The standard declarations are in fontmath.ltx and have the form

\DeclareMathSymbol{a}{\mathalpha}{letters}{`a}

The normal math italic letters are still available as \mathnormal{a}.

3

Just replace the letters symbol font with the upright italic variant (ui).

\documentclass{article}
\DeclareSymbolFont{letters}{OT1}{cmr}{m}{ui}
\begin{document}
$a^2 + b^2 = c^2$
\end{document}

enter image description here

The other answer has the benefit that you can get regular math italic back, whereas with this it is not possible.

0
3

With unicode-math, you cab use the range= noption of \setmathfont to select upright italics. This requires LuaLaTeX or XeLaTeX. Here, for example, are Euler’s identities typeset with constants in upright italic:

\documentclass{article}
\usepackage{mathtools}
\usepackage{unicode-math}

\defaultfontfeatures{Scale=MatchLowercase}
\setmainfont{Latin Modern Roman}[
  Scale=1.0]
\setmathfont{Latin Modern Math}
\setmathfont{CMU Serif Upright Italic}[
  range=up]

\newcommand\upi{\symup{i}}
\newcommand\upe{\symup{e}}

\begin{document}
\begin{align*}
  \upe^{\upi x} &= \cos{x} + \upi \sin{x} \\
  \upe^{\upi \uppi} + 1 &= 0
\end{align*}
\end{document}

Latin Modern Math/CMU Serif Upright Italic sample

To make math letters upright italic by default, pass unicode-math the math-style=upright option:

\usepackage[math-style=upright]{unicode-math}

Either way, you can switch back to slanted italics with \symit{x} and so on.

0

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.