diff options
author | Karl Berry <karl@freefriends.org> | 2013-04-28 23:22:15 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-04-28 23:22:15 +0000 |
commit | 8be0d7283426b03dafa322c7f11f62980f631779 (patch) | |
tree | 9845f7cdd0dc5ba6303a629a2ab44f822cb4e0c8 /Master/texmf-dist/tex/latex/sansmathfonts/sansmathfonts.sty | |
parent | f5e7ac879be880f67746b785fa8060fcc0e4d8d9 (diff) |
sansmathfonts (28apr13)
git-svn-id: svn://tug.org/texlive/trunk@30148 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/sansmathfonts/sansmathfonts.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/sansmathfonts/sansmathfonts.sty | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/sansmathfonts/sansmathfonts.sty b/Master/texmf-dist/tex/latex/sansmathfonts/sansmathfonts.sty new file mode 100644 index 00000000000..bb47e5ff753 --- /dev/null +++ b/Master/texmf-dist/tex/latex/sansmathfonts/sansmathfonts.sty @@ -0,0 +1,93 @@ +% sansmathfonts.sty +% +% Provides complete sans serif math fonts +% +% author: Ariel Barton +% +% Copyright Ariel Barton, 2013 +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either +% version 1.3 of this license or (at your option) any +% later version. +% The latest version of the license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of +% LaTeX version 2003/06/01 or later. +% +% This work has the LPPL maintenance status "author-maintained". +% +% The complete list of files considered part of this work is in +% the file `sansmathfonts.pdf' and its source code `sansmathfonts.tex'. +% + +\ProvidesPackage{sansmathfonts}[2013/03/22] + +\newif \ifmath@sansmathfonts \math@sansmathfontstrue + +\def\sfdefault@sansmathfonts{xcmss} + +\DeclareOption{notmath}{\math@sansmathfontsfalse} +\DeclareOption{I}{\def\sfdefault@sansmathfonts{cmsmf}} + +\ProcessOptions + +\ifmath@sansmathfonts + +% Turn off Beamer math replacements +\@ifpackageloaded{beamerbasefont}{\usefonttheme{professionalfonts}}{} + +% Sans serif math +% Code borrowed from fontmath.ltx +% (edited; cmr->cmsmf, cmm->cmssm, cmsy->cmsssy, cmex->cmssex) +\DeclareFontSubstitution{OML}{cmssm}{m}{it} +\DeclareFontSubstitution{OMS}{cmsssy}{m}{n} +\DeclareFontSubstitution{OMX}{cmssex}{m}{n} +\DeclareFontSubstitution{U}{\sfdefault@sansmathfonts}{m}{n} +\DeclareSymbolFont{operators} {OT1}{cmsmf} {m}{n} +\DeclareSymbolFont{letters} {OML}{cmssm} {m}{it} +\DeclareSymbolFont{symbols} {OMS}{cmsssy}{m}{n} +\DeclareSymbolFont{largesymbols}{OMX}{cmssex}{m}{n} +\SetSymbolFont{operators}{bold}{OT1}{cmsmf} {bx}{n} +\SetSymbolFont{letters} {bold}{OML}{cmssm} {b}{it} +\SetSymbolFont{symbols} {bold}{OMS}{cmsssy}{b}{n} + +% Code borrowed from concmath.sty (amsfonts/amssymb option) +\AtBeginDocument{% + \@ifpackageloaded{amsfonts}{% + \DeclareSymbolFont{AMSa}{U}{ssmsa}{m}{n} + \DeclareSymbolFont{AMSb}{U}{ssmsb}{m}{n} + }{}% + \@ifpackageloaded{esint}{% + \DeclareSymbolFont{largesymbolsA}{U}{ssesint}{m}{n} + }{} + } + +% beamer currently sets +% \mathrm to upright serif and +% \mathit to slanted sans serif. +% They should be consistent, +% and the setup should be such that if you aren't paying attention, +% then you get the font of the rest of the letters, +% that is, sans serif. + +% Code borrowed from fontmath.ltx +% (edited; cmr->cmsmf) +\DeclareSymbolFontAlphabet{\mathrm} {operators} +\DeclareSymbolFontAlphabet{\mathnormal}{letters} +\DeclareSymbolFontAlphabet{\mathcal} {symbols} +\DeclareMathAlphabet {\mathbf}{OT1}{cmsmf}{bx}{n} +\DeclareMathAlphabet {\mathsf}{OT1}{cmsmf}{m}{n} +\DeclareMathAlphabet {\mathit}{OT1}{cmsmf}{m}{it} +\DeclareMathAlphabet {\mathtt}{OT1}{cmtt}{m}{n} +\SetMathAlphabet\mathsf{bold}{OT1}{cmsmf}{bx}{n} +\SetMathAlphabet\mathit{bold}{OT1}{cmsmf}{bx}{it} + +\fi + +\DeclareMathAlphabet {\mathserif}{OT1}{cmr}{m}{n} + +% Use the improved sans family +% (provides sans serif small caps fonts) +\def\sfdefault{\sfdefault@sansmathfonts} + |