1

Thanks to @HenriMenke, I know how to use Roboto font in math for letters (including Greek) and digits. Now, I'd like to use a sans serif font for math operators as well (say \int or \sum). AFAIK, Roboto does not provide such glyphs.

How can I do (I mostly use lualatex but I can use xelatex if necessary)?

2
+50

You could use e.g. Fira Math:

\documentclass[12pt]{article}
\usepackage[sfdefault]{roboto}
\usepackage{amsmath}
\usepackage{unicode-math}
\setmathfont{Fira Math}
\setmathfont[range=up]{Roboto}
\setmathfont[range=it]{Roboto-Italic}
\setmathfont[range=\int]{Fira Math}

\begin{document}
 Hello world! 12345 $12345$

 \textit{abcdef} $abcdef$

 $\gamma = G$
  \[\int \sum  a^2 + b^2 = c^2 \]
\end{document}

enter image description here

  • Great (+1), thanks. That's clearly a very good alternative I did not think of at that time. But what's the problem with kpfonts? Is it too complex with non otf fonts? – cjorssen Feb 6 at 20:17
  • Why should I spent a lot of time trying to figure out how to at best mix legacy math fonts (kpfonts) with opentype font (roboto) when there exist sans-serif math fonts now? – Ulrike Fischer Feb 6 at 21:20
  • Sorry. No offense intented. So I guess the answer is: yes it is complex to mix legacy fonts and otf. It does not worth it. Thanks again. – cjorssen Feb 7 at 10:21

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.