0

I would like to render my math in non-italic font.

I tried various combinations of mathastext with no avail and am starting to believe this can't be achieved this way, but looking on TeX-StackExchange that seems to be the proper way.

Is there a simple way of not displaying math in italics, globally?

1
  • 2
    Welcome to TeX.SE. Please be more specific as to what you've tried so far. E.g., which options did you set when loading the mathastext package? Please also provide information about the TeX engine (pdfLaTeX? XeLaTeX? LuaLaTeX? something else?), the document class, and any font packages you employ. – Mico Jul 29 '20 at 16:54
5

I'm not sure what the purpose of this is, except for trying to get really bad typesetting. But here it is.

\documentclass{article}
\usepackage{amsmath}
\usepackage{mathastext}

\begin{document}

This document has upright math $a+b=c$ everywhere. It's so bad
that my eyes bleed.
\begin{equation}\label{xx}
\begin{split}
a& =b+c-d\\
 & \quad +e-f\\
 & =g+h\\
 & =i
\end{split}
\end{equation}
A more complicated display
\begin{equation}\label{e:barwq}\begin{split}
H_c&=\frac{1}{2n} \sum^n_{l=0}(-1)^{l}(n-{l})^{p-2}
  \sum_{l _1+\dots+ l _p=l}\prod^p_{i=1} \binom{n_i}{l _i}\\
&\quad\cdot[(n-l )-(n_i-l _i)]^{n_i-l _i}\cdot
  \Bigl[(n-l )^2-\sum^p_{j=1}(n_i-l _i)^2\Bigr].
\end{split}\end{equation}

\end{document}

The displays were taken from the documentation of amsmath.

enter image description here

I also tried the same with XeLaTeX and LuaLaTeX (adding \usepackage{fontspec}) and the result is the same.

0

With unicode-maths, use the [range=it->up] option. Compile with xelatex/lualatex.

Presumably you aren't using 𝕽 anywhere.

italic to upright

MWE

\documentclass{article}
\usepackage{amsmath}
\usepackage{xcolor}
\usepackage{unicode-math}
\newcommand\mfname{Asana Math}
\setmainfont[Colour=blue]{\mfname}
\setmathfont{\mfname}
\setmathfont{XITS Math}[Colour=red,range={it->up}]
\usepackage{simpsons}


\begin{document}

Unicode (math mode):
$𝒢^{2} ∈ 𝕽_{θ_{i}}$

Unicode (text mode):

{\huge
𝒢\hspace{2pt}\textsuperscript{\normalsize 2} ∈ 𝕽\textsubscript{\Large{θ}\textsubscript{\textit{i}}}
}
\hfill\Left\Burns

x + \mscrL + \BbbN   + \mfrakH + \mbffrakR \ $\mapsto$ \  $x + \mscrL + \BbbN   + \mfrakH + \mbffrakR $
\bigskip

egreg: This document has upright math $a+b=c$ everywhere. It's so bad
that my eyes bleed.
\begin{equation}\label{xx}
\begin{split}
a& =b+c-d\\
 & \quad +e-f\\
 & =g+h\\
 & =i
\end{split}
\end{equation}
A more complicated display
\begin{equation}\label{e:barwq}\begin{split}
H_c&=\frac{1}{2n} \sum^n_{l=0}(-1)^{l}(n-{l})^{p-2}
  \sum_{l _1+\dots+ l _p=l}\prod^p_{i=1} \binom{n_i}{l _i}\\
&\quad\cdot[(n-l )-(n_i-l _i)]^{n_i-l _i}\cdot
  \Bigl[(n-l )^2-\sum^p_{j=1}(n_i-l _i)^2\Bigr].
\end{split}\end{equation}


\end{document}

Plenty of math alphabets in Unicode, all in the one font file. Here are some:

half of the alphabets

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.