LaTeX sans serif math fonts with sfmath.sty

News: sfmath.sty uploaded to CTAN

Following repeated requests, I uploaded sfmath.sty (version 0.8) to the CTAN archives on 27 August 2007.

Contents:

Introduction

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.

Documentation

Usage

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

Detailed description of options:

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:

Bugs and Limitations

History/Changes

Comparison with other approaches

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).

Table: Different approaches for sans serif math.
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.


[Valid xhtml 1.1!] [Valid CSS!]