1

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.

  • 1
    Possible duplicate of How to get non italic greek symbols with ams packages? – CarLaTeX Jun 11 '16 at 9:11
  • @CarLaTeX no, that question and its answers don't address the sans serif issue. – Nathaniel Jun 11 '16 at 9:13
  • 1
    @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.) – Nathaniel Jun 11 '16 at 9:17
  • The upgreek package from the answers to that question does work for me, though. – Nathaniel Jun 11 '16 at 9:24
  • I'm happy you have found the solution, despite my confusion! – CarLaTeX Jun 11 '16 at 9:28
2

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

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

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.