3

I am using Helvetica font, but I don't want my math formulas to be in italic. I tried using \usepackage{mathastext} but it changes the font.

Is there a way in which I can have Helvetica non-italic font for math formulas? Greek letters and accents included?

Thanks!

7

The typesetting of math will be suboptimal, but you can get away with mathastext and newtxsf:

\documentclass{article}
\usepackage[scale=.85]{tgheros}
\usepackage[frenchmath]{newtxsf} % for sans serif symbols
\renewcommand{\familydefault}{\sfdefault}
\usepackage{mathastext}

\begin{document}

This is text and $\sin(\alpha+\beta)\ne\sin\alpha+\sin\beta$, but
\[
e^x=\lim_{t\to\infty}\left(1+\frac{x}{t}\right)^t
\]

\end{document}

enter image description here

5

No. You don't say anything about how you are configuring Helvetica for text. Probably you are saying something like

\usepackage{helvet}

(which isn't actually Helvetica, of course) or

\usepackage{tgheros}

or similar. Or you might be using a system font called Helvetica or Helvetica Neue with fontspec.

Whichever method you are using, you cannot use it for maths because it is a text font and not a maths font. For maths, you need fonts using the appropriate maths encodings. You can use certain elements from a text font in maths e.g. for variables and letters. But that does not get you Greek etc. For those you need appropriately encoded maths fonts.

There are one or two sans serif fonts for maths, such as the set used by Beamer. So if sans serif is the point, you may be in luck. But for Helvetica and its many clones themselves, the fonts don't exist.

Take a look at the TeX Font Catalogue's list of fonts with maths support to find something you like.

Fonts which either are sans-serif with maths support or offer one or more options for sans-serif with maths include:

  • Another option: Computer Modern Bright is a family of sans serif fonts based on Computer Modern. It comprises OT1, T1 and TS1 encoded text fonts of various shapes as well as all the fonts necessary for mathematical typesetting, including the AMS symbols. – Ross Sep 9 '16 at 17:00
  • 1
    @Ross Thanks, though I wasn't really trying to give a comprehensive list which is why I included the link to the index page. But I've added CMB anyway. – cfr Sep 9 '16 at 21:58
-1

Use:

\usepackage{arev}
\renewcommand{\rmdefault}{phv}
\usepackage{mathastext}

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.