Following repeated requests, I uploaded sfmath.sty (version 0.8) to the CTAN archives on 27 August 2007.
sfmath.sty is a simple LaTeX package for sans serif math fonts in documents.
Although it is quite simple to change the standard text font to a sans serif font, e.g. by
\renewcommand{\familydefault}{\sfdefault}
there is no simple way to change the fonts for mathematics (inline or display style) in a similar manner. The purpose of the package sfmath.sty is to provide a way to switch to a sans serif math font by adding
\usepackage{sfmath}
to the preamble of your document.
The functionality of this package is limited by the intention to work without additionally defined (virtual) fonts; instead, only standard fonts are used. This package should work with LaTeX and pdfLaTeX and, if desired, produces documents with Postscript Type 1 Fonts.
The package sfmath.sty is loaded by adding the line
\usepackage{sfmath}
or
\usepackage[OPTIONS]{sfmath}
to the preamble of your LaTeX document. Possible options are
\math*{...}
commands
(experimental option)\mathrm
command\mathbf
command\mathit
command\mathsf
commandDetailed description of options:
slantedGreek: This option is similar to the slantedGreek option in packages such as mathptmx.sty or cmbright.sty: The uppercase Greek letters, which are usually not slanted in math mode, will be displayed slanted (if slanted shapes are available).
cm, lm, helvet, cmbright, tx, or px: If none of these
options is used, sfmath.sty tries to use the same font for sans
serif maths as selected for sans serif text (i.e., \sfdefault
).
Therefore, you must include sfmath.sty after having
changed \sfdefault
, e.g., by a package such as
helvet.sty or manually.
The Latin Modern fonts (option lm) are provided only with LaTeX T1 encoding; since support for T1 encoding is experimental with sfmath.sty (see below), Latin Modern support ist experimental as well.
The package cmbright.sty already provides sans serif math fonts, so sfmath.sty is not really necessary except if the different handling of bold math fonts is desired: cmbright.sty does not provide bold maths, whereas with sfmath.sty bold (but upright) maths is provided.
The packages txfonts.sty and pxfonts.sty are reported to have several deficiencies with respect to font metrics and macro implementation; using these fonts is not recommended by author of sfmath.sty. With the option tx (or px), only the Helvetica-derived sans serif txfonts are used without loading the complete package. This may be a useful compromise if slanted bold uppercase Greek letters are required and the package helvet.sty is used for the text fonts.
T1experimental, AlphT1experimental: These experimental options use the LaTeX T1 font encoding for maths. This may be useful in combination with the LaTeX T1 text fonts (ec fonts), because there is a visual difference between the ec sans serif text fonts and the cm sans serif math fonts, especially at larger font sizes. However, instead of using these options it is recommended to include the package fix-cm.sty to reduce the ugliness of the ec sans serif fonts and the differences between the ec text fonts and the cm math fonts; add
\RequirePackage{fix-cm}
at the very beginning of you document, i.e., before
\documentclass{...}
.
mathrmOrig, mathbfOrig, mathitOrig, mathsfOrig: With these
options, the original behavior of the \mathXX
commands
is preserved.
E.g., usually \mathrm
is modified by sfmath.sty to
display a sans serif
font, but with the option mathrmOrig the original Computer Modern
Roman font is displayed.
After including the package sfmath.sty, all maths is displayed with sans serif fonts; there is no way to switch back to the original behavior. In addition some new macros are defined by sfmath.sty:
\mathsl{...}
: A new math alphabet that is by
default identical with \mathit{...}
; useful in
combination with the option mathitOrig.\upOmega
, \upDelta
:
upright versions of \Omega
and \Delta
;
useful when the option slantedGreek is selected.\mathrm
, \mathbf
,
\mathit
, ... (because
they should be part of OT1-encoded fonts but are not included
in these standard postscript fonts).\mathbb{N}
or \mathbbm{N}
(from bbm.sty) are not changed. You might like to use
\mathbbmss{N}
(also from bbm.sty).\sum
,
\prod
, probably more) and are not changed.\mathversion{sans}
?\upDelta
, \upOmega
command
(to be a little more compatible
with other packages that provide the slantedGreek option)\ldotp
«\sfdefault
is chosen.\mathrm
, \mathbf
,
\mathit
, and \mathsf
In this section, three approaches for sans serif math typesetting are compared: the packages sfmath.sty, sansmath.sty, and cmbright.sty. These packages are different in their intention and implementation; e.g., cmbright.sty provides completely new fonts whereas the sfmath.sty and sansmath.sty packages try to work with existing sans serif fonts and (at least sfmath) should be regarded rather as kludges than as well-designed solutions.
The main properties (and differences) of the three approaches in combination with other packages such as lmodern.sty, helvet.sty, or txfonts.sty (the packages txfonts.sty and pxfonts.sty seem to have several severe deficiencies with respect to glyph shapes and LaTeX macro implementation; therefore their use cannot be recommended) are summarized in the Table below. As reference, the behaviors of standard LaTeX and of LaTeX with the mathptmx.sty package are also listed (bold entries are imcompatible with the default LaTeX behavior).
mathversion: normal | mathversion: bold | ||||||||
---|---|---|---|---|---|---|---|---|---|
abAB | αβγ | ΓΔΘ | sin(3) | abAB | αβγ | ΓΔΘ | sin(3) | \mathnormal |
|
Serif maths: | |||||||||
standard LaTeX | it | it | up | up | bf, it | bf, it | bf, up | bf, up | ok |
mathptmx.sty | it | it | up | up | md, it | md, it | md, up | md, up | ok (not bold) |
Sans serif maths: | |||||||||
sfmath.sty | it | it | up | up | bf, up | bf, it | bf, up | bf, up | ok |
sfmath.sty, lmodern.sty | it | it | up | up | bf, it | bf, it | bf, up | bf, up | no capital Greeks |
sfmath.sty, helvet.sty | it | it | up | up | bf, it | bf, it | bf, up | bf, up | no capital Greeks |
sfmath.sty[tx], helvet.sty | it | it | up | up | bf, it | bf, it | bf, up | bf, up | ok |
sansmath.sty | it | it | it | up | md, it | md, it | md, it | bf, rm | rm, not sf |
sansmath.sty, lmodern.sty | rm | it | up | rm | md, rm | bf, it | md, up | bf, rm | rm, it |
sansmath.sty, helvet.sty | it | it | — | up | md, it | md, it | — | bf, rm | rm, not sf |
sansmath.sty, txfonts.sty | it | it | it | up | md, it | md, it | md, it | bf, rm | rm, not sf |
cmbright.sty | it | it | up | up | md, it | md, it | md, up | md, up | ok (not bold) |
Explanation of abbreviations: it: italic shape, up: upright shape, bf: boldface series, md: medium series, rm: Roman family, sf: Sans serif family.