Fonts and styles\sf

\sfCommand

Legacy math-mode declaration for switching subsequent symbols in the current group to sans-serif.

x \sf y
Available in
base, textmacros
Kind
declarative
Allowed mode
math, text
Frequency
0.19% of corpus formulasrank 90 of 263
Commonality
low
Tags
presentation, discouraged
Renderer support
PackageMathJaxKaTeXXeTeX
baseMathJax: FullKaTeX: FullXeTeX: Full
textmacrosMathJax: FullKaTeX: FullXeTeX: Full
About the test scope

Syntax#

\sf

Takes no arguments. Same argspec in base and textmacros. Reading argspecs

Examples#

base

{x \sf y} z

textmacros

\text{\sf x}

Package variants#

PackageSignatureAllowed modeNotes
basemathLegacy math-mode declaration for switching subsequent symbols in the current group to sans-serif.
textmacrostextLegacy declaration that switches following text to sans-serif styling until the current group ends.

In TeXForm#

TeXForm parses this entry as declarative syntax; the package determines its argument specification.

Equivalent forms#

  • \mathsf{#1}approximate

    Prefix command alternative for math mode

  • \textsf{...}approximate

    \textsf is a command with arguments, whereas \sf is declarative.

  • {\sffamily ...}exact

See also#

Test cases#

base
InputCaseMathJaxKaTeXXeTeX
{\sf a}Positive · baselinePassPassPass
textmacros
InputCaseMathJaxKaTeXXeTeX
{\sf a}Positive · baselinePassPassPass
All 80 in Fonts and styles