2

Consider the following MWE, which typesets some sans serif math that I'm using in a presentation:

\documentclass{article}
\usepackage{sansmath}
\usepackage{amsmath}
\begin{document}
\sansmath
\[
w\Delta z = \operatorname{cov}(w,z) + \operatorname{E}(w\Delta z),
\]
\end{document}

The result looks like this:

enter image description here

I think it would look a lot better if the Delta characters were upright instead of italic. How can I achieve that? (I like the w and z being italic, just not the deltas.)

If the solution involves using a different package than sansmath, or a different font than the one shown, I'm fine with that - I'm just looking for a quick easy way to make sans serif math that looks good.

Although I already mentioned it in both the title and the body of the question, and demonstrated it with an MWE, I apparently have to edit this to point out that I am looking to do this in a sans serif font, which is what makes this different from the linked question.

N. Virgo
  • 4,289
  • 2
  • 26
  • 41

3 Answers3

3

Instead of sansmath use the sansmathfonts package. It automatically switches the math font to sans serif throughout the whole document (no need for \sansmath). If you want to use a font other than CM, you might run into trouble with upright uppercase greek letters as other fonts might not have them (or not have them in the correct slot). A possible rectification has been proposed by [egreg (2016)].

\documentclass{article}
\usepackage{sansmathfonts}
\usepackage{amsmath}
\begin{document}
\[
w\Delta z = \operatorname{cov}(w,z) + \operatorname{E}(w\Delta z),
\]
\end{document}

enter image description here


Alternatively, you can use a sans serif font with built-in math support, such as cmbright. This might actually be your best bet, as you get correct adjustment and kerning out of the box. You can find a review of several math font (no limited to sans-serif) in S. Hartke, “A Survey of Free Math Fonts for TeX and LaTeX”, The PracTeX Journal 01, (2006).

\documentclass{article}
\usepackage{cmbright}
\usepackage{amsmath}
\begin{document}
\[
w\Delta z = \operatorname{cov}(w,z) + \operatorname{E}(w\Delta z),
\]
\end{document}

enter image description here

Henri Menke
  • 109,596
2
\documentclass{article}
\usepackage{sansmath}
\usepackage{amsmath}
\begin{document}
\sansmath
\[
w\mathrm{\Delta} z = \operatorname{cov}(w,z) + \operatorname{E}(w\mathrm{\Delta} z),
\]
\end{document}

Hello. To straighten the symbol in front of it is enough to add the command \mathrm{}.

Dmitry
  • 31
2

In unicode-math, and some legacy math font packages, you can use \increment for the Delta operator. If you want an actual upright letter Δ, that would be \symup{\Delta}, \upDelta, or \mupDelta.

Davislor
  • 44,045