I try to set up an entire document using sans serif fonts including math. At the moment I would like to use pdftex
.
I searched the relevant questions and answers — this is what I found:
- [based on egreg] How to combine another sans-serif math font with helvet for text? (2014, August)
- [egreg] What's wrong with arev's subscript placement? (2015, September)
- [egreg again] The right way to get sans-serif math? (2016, October)
- [mico and others] How to typeset some text including math content in sans serif (2012, Januar)
- Typeset WHOLE document in sans-serif, Including Math Mode (2014, April)
kpfonts
Package
This is an edit from 2017-06-09. I found kpfonts
by accident and they seem to be promising.
\documentclass[preview]{standalone}
% https://www.ctan.org/pkg/kpfonts
% Complex package -- read the documentation!
\usepackage[sfmath]{kpfonts}
\usepackage{mathtools}
\renewcommand\familydefault{\sfdefault}
\begin{document}
Text
$\displaystyle
abc+\sum_{k=1}^{n}\int_{0}^{k}\sqrt{2}f(x)\,\text{d}x
$
Text
\end{document}
cmbright
Package
\documentclass[preview]{standalone}
\usepackage{cmbright}
\SetSymbolFont{largesymbols}{normal}{OMX}{iwona}{m}{n}
\usepackage{mathtools}
\begin{document}
Text
$\displaystyle
abc+\sum_{k=1}^{n}\int_{0}^{k}\sqrt{2}f(x)\,\text{d}x
$
Text
\end{document}
arevtext
and arevmath
(or simply arev
) Package
\documentclass[preview]{standalone}
\usepackage{arev}
% Suggested from Mico
\SetSymbolFont{largesymbols}{normal}{OMX}{iwona}{m}{n}
\usepackage{mathtools}
\begin{document}
Text
$\displaystyle
abc+\sum_{k=1}^{n}\int_{0}^{k}\sqrt{2}f(x)\,\text{d}x
$
Text
\end{document}
Without \SetSymbolFont{largesymbols}{normal}{OMX}{iwona}{m}{n}
With \SetSymbolFont{largesymbols}{normal}{OMX}{iwona}{m}{n}
sansmathfonts
and helvet
Package
\documentclass[preview]{standalone}
\usepackage{sansmathfonts}
\usepackage[scaled=0.95]{helvet}
\renewcommand{\rmdefault}{\sfdefault}
\usepackage{mathtools}
\begin{document}
Text
$\displaystyle
abc+\sum_{k=1}^{n}\int_{0}^{k}\sqrt{2}f(x)\,\text{d}x
$
Text
\end{document}
newtxsf
Package
The following code is taken from the newtxsf documentation and adjusted to the code examples above.
\documentclass[preview]{standalone}
\usepackage[sfdefault,scaled=.85]{FiraSans}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage[varqu,varl]{zi4}% inconsolata typewriter
\usepackage{amsmath,amsthm}
\usepackage[cmintegrals]{newtxsf}
\usepackage{mathtools}
\begin{document}
Text
$\displaystyle
abc+\sum_{k=1}^{n}\int_{0}^{k}\sqrt{2}f(x)\,\text{d}x
$
Text
\end{document}
I have trouble running the code since I get an error in the file miktex-makemf.log
. I already refreshed the FNDB (MiKTeX). The error is not part of the question though.
Maybe someone can add the output of the code for me.
2017-03-21 02:02:13,987+0100 FATAL miktex-makemf – The txsys source
file could not be found.
After following the comment of Ulrike Fischer (running upmap
on the command window of Windows), the error is gone!
sansmath
and helvet
Package
sansmath
doesn't seem to be an active package (this is an assumption — nothing more). I only found 2003-08-13, version 1.0 on CTAN.
\documentclass[preview]{standalone}
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{sansmath}
\sansmath
\usepackage{mathtools}
\begin{document}
Text
$\displaystyle
abc+\sum_{k=1}^{n}\int_{0}^{k}\sqrt{2}f(x)\,\text{d}x
$
Text
\end{document}
More Packages That Seem Related
- stix (v1.1.2-latex from 2015/04/17)
Other Related Information
- http://mirrors.ctan.org/info/Free_Math_Font_Survey/en/survey.pdf (found in one of egreg's answers, see here; 2006, May).
- http://milde.users.sourceforge.net/Matheschriften/matheschriften.xhtml (2008, August; only in German, was mentioned in one of the comments of egreg's answers)
Actual Questions
- What is the nowadays recommended way to set up a complete sans serif document? I aim for a solution that is considered state-of-the-art with a (if possible) complete set of symbols and font versions (Small Caps and do on).
- What do font packages like
sansmathfonts
do? Do they "just" make already existing fonts (or single characters / symbols) available in a convenient package (so it's "luck" if everything fits together) or did the authors create new fonts?
Background — Why Do I Want This
I one of the comments (Mico) I was asked to explain what I want do to with the sans serif fonts.
- I help a friend which just started to be a teacher.
- If we create documents that are used on any kind of projectors, then the serif fonts sometimes cause readability problems.
- With documents I mean, e. g. beamer presentations or standalone diagrams.
- I attached one of the standalone diagrams below. The pictures have the same resolution.
- So it's not for a book, article or paper.
Standard Solution with Serif Fonts (no font package loaded — I assume Computer Modern then)
Sans Serif Version — Using the avec
Package Approach from Above and Recommended by Mico
Best Answer
If the document is going to take the form of a
beamer
presentation, I recommend you -- or the colleague you're helping to get started -- do two things:issue the instruction
\usefonttheme{professionalfonts}
in the preamble, andload the
arev
package, which loads thearevtext
andarevmath
packages.In my experience, the
arev
text and math fonts are both a bit darker and more widely spaced than the corresponding CM Sans fonts. I consider both of these features to be significant pluses for the purpose of writing abeamer
-based presentation. For beginners in the business of giving presentations, a perennial and near-fatal tempatation is to try to cram too much material into any given slide. A font that's slightly more generously spaced and therefore makes it more difficult to cram too much material into a slide is highly advantageous in this regard. :-)Another thing I like about the
arev
math fonts -- however, this is clearly just a personal preference -- is that quite a few of the math-mode alphabetic glyphs actually look "italic" rather than just "slanted". This is quite apparent if one compares\textit{x}
(purely slanted) with$x$
(more "italic", not just slanted). Other glyphs that have this distinctly "italic" look in math mode area
,f
,i
,l
,u
,v
, andw
. To repeat what I stated before, though: This is clearly just a personal preference; your preferences may very well be rather different.A full MWE: