TransWikia.com

Math font Helvetica non-italic

TeX - LaTeX Asked by Laura Mugica on December 11, 2020

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!

4 Answers

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)nesinalpha+sinbeta$, but
[
e^x=lim_{ttoinfty}left(1+frac{x}{t}right)^t
]

end{document}

enter image description here

Correct answer by egreg on December 11, 2020

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:

Answered by cfr on December 11, 2020

Use:

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

Answered by Edilon Junior on December 11, 2020

See https://gist.github.com/Pni0/2923266 for a means to use helvet for math:

renewcommand{familydefault}{sfdefault}
usepackage[scaled=1]{helvet}
usepackage[helvet]{sfmath}
everymath={sf}

Worked for me.

Answered by Tyrone on December 11, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP