19

Rationale

\TeX and \LaTeX were created with the (implicit) goal to create printed documents, mostly in English. In this context, using serif fonts as a default makes sense ; in particular, using serifs for math typefaces was a good default.

The language limitation was soon resolved by the introduction of (problem-specific) encodings which (more or less) solved the problem for alphabetic languages ; this was more awkward for large-glyph-sets languages.

Similarly, the use of various typefaces has been made possible by the creation of ad-hoc packages allowing the use of a lot of typefaces in \LaTeX.

However, \LaTeX is more and more used for the production of documents aimed at display use rather than printed use ; in this context, the use of sans serif typefaces is preferred (rightly or wrongly, I do not know) to serif typefaces . Again, specific packages (e. g. beamer) allow the use of sans typefaces, at east for text ; similarly, various packages allow for the (partial) replacement of serif math typefaces by sans typefaces.

This replacement is only partial : in all packages I am aware of, some symbols still are extracted from serif typefaces : large delimiters, summation and integral operators, various operators. The problem is that some of these operators an symbols "swear" horribly with most of the "sans math" symbols used by these packages.

Furthermore, the introduction of Unicode-enabled \TeX engines solved the encoding problem "the right (orthogonal) way", allowing a much easier use of non-ASCII languages ; they also introduced a set of very interesing new possibilities. Among them, the availability of Opentype "math fonts" (i. e. an Opentype font, with a "MATH" table describing (in exceeedingly fine detail) the available math glyphs and accents, their spacing, their correction(s) and possibly their kerning parameters), greatly simplifying the use of these fonts (while greatly complicating their creation).

However, there are various problems when trying to use the various "sans-math" packages with \XeTeX or \LuaLaTeX ; furthermore, the "serif math symbols" are still with us.

State of the problem

I am not aware of any "fully sans" Opentype font (i. e. a font where all the elements were designed for sans use) currently usable with an Unicode-enabled engine without using various "tricks" :

According to a recent review, there were 15 available "Opentype math fonts" :

  • 11 freely available ;
  • 1 freely available but abandoned ;
  • 3 commercial.

All of them are serif fonts ; most of them directly borrow some of their symbols" from a serif font.

By definition of an "Opentype math font", these fonts already have sans alphabets ; but the other elements (script, fraktur, bbold, typewriter alphabets), math symbols and large symbols) are still serif-based. For post of these elements, the difference may be slight, but some of them jump at the eye of the reader...

Given the growing importance of producing "screen-ready" documents, and postulating that the current dislike for serif typefaces in this context is right, there is clearly a need for at least one sans-designed Opentype typeface. Which currently does not exists...

The question

Are you aware of an "Unicode sans math font" under development ?

EDIT, 9 months later :

Krishna's (GFS Neohellenic Math) and Henri Menke's (Fira Math) answersnow give us two sans-based Opentype typefaces. A very rough first comparison can be done by retyping the example given below by Henri Menke for Fira Math and recompiling it with GFS Neohellenic Math :

Henri Menke's example, composed with GFS Neohellenic Math

This appears readable, with no major problems, although one notes the presence of "serif-like" appendages at the ends of the top bar of the final "T" in Einsein's field equations, as well at the ends of the initial "S" of Einstein-Hilbert action. These appendages, which express a stylistic choice, do not break the readability of the font nor its overall style.

So we have now two possible solutions to compose math-rich consistent documents using a sans-based design. If the GUST stands by its intent to create a Déjà Vù Sans Math (as answered by Ulrike Fisher, and seen on a 2015 BachoTeX poster), we should get three possible bases for such a document. This should help to get rid of those zillions slides/Web pages where "modernist" sans-based designs horribly swear with Latin Modern (or worse, bitmapped Computed Modern....).

Note : I didn't (yet) check the contents of these fonts for completeness (the same work should also be done for the available Math serif fonts, by the way). This could be the subject of another question. Any takers ?

But the most difficult question is to find the right rationale for the use of one of these solutions over the other(s). Ideas ?

8
  • 1
    This question might be of interest.
    – TeXnician
    Jun 10, 2017 at 12:08
  • @TeXnician Good hint :). I added the Kepler font (kpfonts üackage) yesterday. See also tex.stackexchange.com/questions/19597 Jun 10, 2017 at 19:21
  • 1
    The tex gyre project wants to make one. How fast it will be completed depends on their time and the money Jun 11, 2017 at 6:38
  • 1
    @Ulrike Fisher : thank you ! I wasn't aware of this. Keeping in mind the past productivity of the GUST folks and their (considerable) experience in Opentype math, I think we might have some news on this front at BachoTeX 2018, unless they give a larger priority to their revisions to the TeX Gyre (serif) math fonts. Jun 12, 2017 at 7:42
  • 1
    They asked about some foundings from various tex user groups. So you can push the development by promoting the cause. Jun 12, 2017 at 8:00

6 Answers 6

13

Fira Math: sans-serif font with Unicode math support

Developed by Xiangdong Zeng (Stone-Zeng) at https://github.com/Stone-Zeng/FiraMath

enter image description here

6

GFS NeoHellenic is a recently available choice that will fit the description. If it did not make into TL2017, it will certainly be included in TL2018. The font is already available on CTAN here.

This is probably the only Unicode OpenType Sans Math Font available as of April 2018.

2
  • I note that the Debian texlive-fonts-extra package available in unstable alreadu contains this font (as shown in the relevant files list). Apr 20, 2018 at 21:02
  • 2
    A first very quick trial in a beamer presentation gives a good impression (add "\usefonttheme{professionalfonts}" and "\usepackage{gfsneohellenicot}" (this is included in the CTAN and Debian packages) to an "empty" beamer template, compile with LuaLaTeX or XeTeX and you're set). The result isn't too shabby... This is an important addition, and its availability should be largely publicized. Apr 20, 2018 at 21:10
3

I'm not sure I understand the question, since the term 'sans font' is being used in three different senses. The alphabets in the MAS are independent of whatever the font (file)'s Basic Latin and Greek and Coptic code blocks contain. (So a serif font's "U+1D60B MATHEMATICAL SANS-SERIF ITALIC CAPITAL D" will always be sans, for example.)

If the goal is to have everything on the slide in sans (text and math), then the alphabets in the Mathematical Alphanumeric Symbols (MAS) unicode block can be mapped to sans.

Using the 15 latin alphabets as an example (with Asana Math as the mathfont for all of them, and just to demonstrate), keeping bold and italic:

before mapping:

original unmapped

after mapping:

mapped

The ones in blue are already sans.

The text sans (meaning the Basic Latin, and Greek and Coptic blocks) does not (necessarily) need to be supplied by the mathfont(s).

The MAS has bold and bolditalic sans for Greek, and upright sans for Digits, defined. Although it sounds like the slide will want a sans upright Greek (in the math-mapping sense), perhaps.

MWE

\documentclass[12pt]{article}
\usepackage{xcolor}
\usepackage{unicode-math}

\setmathfont{Asana Math}[Colour=blue]
\setmathfont{Asana Math}[range={up/{latin,Latin}->sfup,it/{latin,Latin}->sfit,bb/{latin,Latin}->sfup,bbit/{latin,Latin}->bfsfit,scr/{latin,Latin}->sfup,cal/{latin,Latin}->sfup,bfcal/{latin,Latin}->bfsfup,frak/{latin,Latin}->sfup,tt/{latin,Latin}->sfup,bfup/{latin,Latin}->bfsfup,bfit/{latin,Latin}->bfsfit,bfscr/{latin,Latin}->bfsfup,bffrak/{latin,Latin}->bfsfup},Colour=red]
\setmainfont{Noto Sans}
%sfup,sfit,bfsfup,bfsfit



\begin{document}
\Large

$
\symup{A}
\symbfup{A}
\symit{A}
\symbfit{A}
\symsfup{A}
\symbfsfup{A}
\symsfit{A}
\symbfsfit{A}
\symtt{A}
\symbb{A}
\symbbit{A}
\symscr{A}
\symbfscr{A}
\symfrak{A}
\symbffrak{A}
$

\end{document}

Edited to add:

Interesting. You can define your own math symbols (sensu latu) and what type they are, in unicode-math-table.tex, and then refer to them in your code.

gamma sans

The blue gammas are Asana Math mapped to upright sans Greek math (there isn't any, in the MAS, so amounts to a no-op). The violet upright and italic Cyrillic I are just an experiment. Ignore those. The green sf Gammas come from Noto Sans, Regular and Italic, from the 'plain text' range if I can call it that (the Greek and Coptic unicode block). In the equation, red is the mapped Asana Math font, blue is un-mapped, and black (for the fraction line) is presumably from TeX's internals somewhere.

So the inference is that a full mapping of the Greek math range could be done.

Powerful stuff.

\UnicodeMathSymbol{"0438}{\mupcyrI                     }{\mathalpha}{CYRILLIC CAPITAL LETTER I}%
\UnicodeMathSymbol{"0438}{\mitcyrI                     }{\mathalpha}{CYRILLIC CAPITAL LETTER I}%

%==========================
\UnicodeMathSymbol{"0393}{\msfupGamma                     }{\mathalpha}{GREEK CAPITAL LETTER GAMMA}%
\UnicodeMathSymbol{"0393}{\msfitGamma                     }{\mathalpha}{GREEK CAPITAL LETTER GAMMA}%
\UnicodeMathSymbol{"03B3}{\msfupgamma                     }{\mathalpha}{GREEK SMALL LETTER GAMMA}%
\UnicodeMathSymbol{"03B3}{\msfitgamma                     }{\mathalpha}{GREEK SMALL LETTER GAMMA}%

MWE

\documentclass[12pt]{article}
\usepackage{xcolor}
\usepackage{unicode-math}


\setmathfont{Asana Math}[Colour=blue]
\setmathfont{Asana Math}[%
%       math-style=french,
        range={%
        up/{latin,Latin,num}->sfup,
        it/{latin,Latin,num}->sfit,
        bb/{latin,Latin,greek,Greek,num}->sfup,
        frak/{latin,Latin,greek,Greek,num}->sfup,
        tt/{latin,Latin,num}->sfup,
        bfup/{latin,Latin,greek,Greek,num}->bfsfup,
        bfit/{latin,Latin,greek,Greek,num}->bfsfit,
        bffrak/{latin,Latin,greek,Greek,num}->bfsfup,
%       bfcal/{latin,Latin}->bfsfup,
%       cal/{latin,Latin}->sfup,
%       bbit/{latin,Latin}->bfsfit,
        scr/{latin,Latin,num}->sfup,
        bfscr/{latin,Latin,num}->bfsfup,
        },
        Colour=red,
        ]
\setmainfont{Noto Sans}
\setmathfontface\mfcr{Noto Sans Regular}[Color=green]
\setmathfontface\mfci{Noto Sans Italic}[Color=green]
\setmathfontface\mfccr{Noto Serif Regular}[Color=violet]
\setmathfontface\mfcci{Noto Serif Italic}[Color=violet]

%sfup,sfit,bfsfup,bfsfit

\newcommand\mtextucl{A}
\newcommand\mtextlcl{a}
\newcommand\mtextucg{Γ}
\newcommand\mtextlcg{γ}
\newcommand\mtextd{3}
\newcommand\testmtext[1]{%
\Large
$
\symup{#1}
\symbfup{#1}
\symit{#1}
\symbfit{#1}
\symsfup{#1}
\symbfsfup{#1}
\symsfit{#1}
\symbfsfit{#1}
\symtt{#1}
\symbb{#1}
\symbbit{#1}
\symscr{#1}
\symbfscr{#1}
\symfrak{#1}
\symbffrak{#1}
$}


\newcommand\mtestrun{%
\testmtext{\mtextucl}\par
\testmtext{\mtextlcl}\par
\testmtext{\mtextucg}\par
\testmtext{\mtextlcg}\par
\testmtext{\mtextd}\par
}

\begin{document}

\mtestrun

$\upGamma \itGamma \upgamma \itgamma$

$\mupGamma \mupgamma {\mfccr\mupcyrI} {\mfcci\mitcyrI} $

$\mfcr{\msfupGamma  \msfupgamma} \mfci{\msfitGamma \msfitgamma}$ 

$\mfcr{\msfupGamma}^2 = \frac{f(x)}{\mfci{\msfitgamma}^{\mfci{\msfitgamma}}}  $

\end{document}
2

This is not quite the answer sought, but: the STIX fonts have a large selection of roman and greek sans-serif glyphs, including sans-serif greek in the private use area. The collection was sufficient that Michael Sharpe produced the newtxsf math package using glyphs from STIX. While that package is pdflatex-oriented (and I have not tested it under LuaLatex), it seems to prove the possibility of using STIX 2 to extract a fully unicode sans-serif math font. The examples in the newtxsf documentation file look quite nice.

In fact, many of the required hooks to get the STIX private-use alphabets are already in one of the unicode-math dtx files, so I assume there's a longer range plan to provide easy access to these math alphabets with commands along the lines of "stixsf".

So, it appears that a unicode-math sans font exists within STIX 2, but will require some additional development to unveil.

2
  • One would need other symbols such as integrals, sums, brackets, square roots, calligraphic and Fraktur alphabet, other alphanumeric symbols, etc. to match the sans-serif look as well. Aug 20 at 6:26
  • 1
    Goodness, five years have passed since I posted this! As I mentioned at the time, it's not quite the answer sought. However, the newtxsf package runs with lualatex and fontspec, if unicode-math is not loaded. In that configuration, all necessary symbols are available - although the parentheses, fraktur, calligraphic, etc. are not sf. See the package documentation for an example.
    – John
    Aug 20 at 20:20
2

There is Lato Math available on GitHub (although not on CTAN): https://github.com/abccsss/LatoMath

lato_math

2
  • Opening the LatoMath.sfd file with fontforge shows many faulty glyphs: missing extrema, intersecting paths, wrong direction… Any chance that these glitches could be fixed in a near future? Jun 23 at 10:17
  • @DanielFlipo I really don't know. There aren't any commits on GitHub this year. Perhaps this is the reason it is not on CTAN yet. Jun 23 at 13:15
1

The Arev package provides math based on Arev, which is a derivative of Bitstream Vera Sans. Deja vu Sans is also derived from Bitstream Vera Sans.

3
  • There are similar packages "providing math support in LaTeX" for other sans opentype fonts. Perusing the catalogue of fonts with math support, one notes that Asana, Iwona and Kurier fonts all offer math support, are available as OTF fonts and are sans-serif. (and that Arev isn't available as an Opentype font...). Apr 28, 2018 at 19:22
  • But they do not offer an "Opentype math font", i. e. a, opentype font offering an Opentype "math table" and a minimal set of faces sufficient for mathematics (defined in a report by Barabara Beeton and al.). THis table allows non-(La)TeX software (such as LibreOffice or Word) to use these fonts for mathematics typesetting, which the LaTeX sipport packages do not allow. Apr 28, 2018 at 19:23
  • These OFT Math fonts also allow LuaTeX (and possibly XeTeX, I didn't check) some novel possibilities, such as the ability to switch math fonts for part of the text, or tweaking the typesetting according to various rules (think TeX-style fs "french" style vs ISO style for math symbols...). Apr 28, 2018 at 19:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .