# Upright sans serif greek in math mode

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:

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.

• Possible duplicate of How to get non italic greek symbols with ams packages? Jun 11, 2016 at 9:11
• @CarLaTeX no, that question and its answers don't address the sans serif issue. Jun 11, 2016 at 9:13
• @CarLaTeX I don't think that makes it a duplicate, but it does mean you can post an answer. (However, I've tried it with my MWE and it didn't work for me.) Jun 11, 2016 at 9:17
• The upgreek package from the answers to that question does work for me, though. Jun 11, 2016 at 9:24
• I'm happy you have found the solution, despite my confusion! Jun 11, 2016 at 9:28

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}


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}


\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{}.

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.