I'd like to start a discussion with the latex community about the lack of a Helvetica-like font package that has full math support. From the research I've done, such a package does not exist, but many people would benefit from it. There are many questions about this in the main site (I've linked a few below), but I want to ask the more "meta" question about whether a different solution could or should be created. Here are the relevant points that I've thought of.
Why I think it does not exist yet
Helvetica makes a poor choice for setting the main text of a scientific document. In paragraph form, it can be hard to read, and the fact that some characters are indistinguishable (capital I (i) and lower case l (L) makes it dangerous for math, where meaning is carried by individual characters rather than words.
Why I still think the package should exist (and why it's important)
As the main text of a scientific document, Helvetica fails. But as the font choice for graphics in scientific papers, it is the de facto standard! Some journals (Nature and Science) prefer all the text in figures be set in Helvetica or a close relative. For graphics, readability is not as crucial because text is limited to single words or phrases. Also, any ambiguity introduced by identical characters in the figures should be obvious to those who read the the figure captions or main text. What seems to matter most for figure text is having the right style, and the neo-grotesque fonts like Helvetica have become the standard for that neutral, familiar, scientific look.
Scientists use latex as a tool to produce good-looking documents without having to be specialists in typesetting or design. However, while scientists rarely have to typeset documents, they are often required to typeset figures. Figures are both the only parts of published articles that scientists are expected to typeset themselves and the parts for which latex does not provide an adequate solution.
To see the state of scientific graphics in 2017, browse a well-respected journal, like PRX (it's open-access for y'all), and notice how figures mix serif math with sans-serif text, and even randomly use different sans-serif fonts in the same figure as if they are identical (these mixed solutions are even recommended by tex.stackexchange in the links below). I believe TeX can help solve these problem!
What options exist for typesetting graphics (and why they are inadequate)
First off, my experience in creating figures for scientific purposes is mostly from using python's matplotlib library, which allows you to use latex to typeset all or some of the text. When choosing fontsets, the easiest to work with are those that come in a latex package that includes math support. Most of such packages are for serifed fonts, but for the most part, people avoid serifed fonts in figures. Usually the body text of a paper is set in a serif font, and unless you match it exactly in typeface and size, you can create some typographical dissonance. It is much more common to use a san-serif font so that contrast with the main text is explicit and so that the smaller sizes needed in the figures can still be rendered and easily read.
This leads us to search for sans-serif font latex packages with math. One option is the package Arev, which provides the font DejaVu Sans with math support (this is the default choice in matplotlib 2.0). Another option is Computer Modern Bright. Browsing the latex font catalog, those two are really the only options for consistent sans-serif math. Other sans options on the list are either Frankensteins (one font for text, another for math, like FiraSans with newtxsf
, which uses Stix Sans for math) or are just not suited for scientific figures (in my opinion) due to their unique and potentially unprofessional looks (iwona, kurier, ...).
So are Arev and CMBright good enough for professional-looking scientific graphics? I think they could be, but they do bring their own unique style to the figure, and many scientists just want their figure text to look good, standard, and unremarkable. DejaVu (through Arev) and Computer Modern bright are good fonts, but they are quite different from Helvetica (see here and here). To my eye, both fontsets give a more humanist, optimistic feel than the more neutral Helvetica. While either choice may be better than Helvetica for typesetting a full paper, for the figures of a paper using a Times-like serif font, I think Helvetica is the more appropriate choice.
There are ways to get fake math support for Helvetica using packages like sansmathfonts
, mathastext
, and sfmath
. In my experience, using these packages can work, but it is a slippery slope to the world of endless hacking and tweaking, making it difficult to get a truly professional-looking result. What we need is something as easy as \usepackage{helvetica-with-math}
that includes a Helvetica-looking version of all the greek letters in italics and upright, as well all the mathematical symbols that might be reasonably needed.
Searching around leads to many threads in both the latex and matplotlib communities of people looking for a solution to this problem. Here are just a few I came across:
- How to combine another sans-serif math font with helvet for text?
- Setting up a Sans Serif Document Including Math (in 2017, using pdftex)
- https://3diagramsperpage.wordpress.com/2015/04/11/matplotlib-figures-with-helvetica-labels-helvet-vs-tgheros/
- Math font to match Helvetica
- Helvetica font and ohm symbol
- Combining Helvetica and Symbol fonts with mathspec
- Specific font for specific characters with mathspec package
- https://stackoverflow.com/questions/2537868/sans-serif-math-with-latex-in-matplotlib/20709149#20709149
Conclusions
I'm a latex and python user trying to make figures for my scientific papers. I've realized how hard it is to make what I thought should have been the simplest choice of using a Helvetica-like font for both text and math. It seems to me that a quality Helvetica clone package with full math support would solve most of these problems, and my feeling is that such a package could quickly become the standard package used in scientific plotting engines.
I see two good future scenarios. 1) The e-Gust foundry (creators of the Tex Gyre Heros font) develops math support for Heros and releases it as a latex package. 2) The Stix project, which solved a similar problem by giving us a Times-like font with full math support, produce a Helvetica-like font. The Stix project was funded by a group of publishers who use the fonts, and it would be great for them and us if they released a font package for figures. The figures in their journals would improve, and the scientific community would finally have an adequate answer to this recurring question.
I'm curious to see if anyone agrees with me. Is this a real need? Is anyone working on it? Am I missing a simple solution? How do we commission the package I'm suggesting? What challenges am I unaware of?
pdflatex
. For one who really needs a font like this I would recommend to find a sans font which contains all necessary symbols and use that withxelatex
andmathspec
.xelatex
withmathspec
solution is not the best because the symbols need to come from somewhere else. This leads to the kind of typographical dissonance that should drive any typesetting enthusiast crazy.