diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/sansmathfonts/sansmathfonts.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/sansmathfonts/sansmathfonts.sty | 64 |
1 files changed, 57 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/latex/sansmathfonts/sansmathfonts.sty b/Master/texmf-dist/tex/latex/sansmathfonts/sansmathfonts.sty index bb47e5ff753..3c2dfd41b87 100644 --- a/Master/texmf-dist/tex/latex/sansmathfonts/sansmathfonts.sty +++ b/Master/texmf-dist/tex/latex/sansmathfonts/sansmathfonts.sty @@ -21,17 +21,46 @@ % the file `sansmathfonts.pdf' and its source code `sansmathfonts.tex'. % -\ProvidesPackage{sansmathfonts}[2013/03/22] +\ProvidesPackage{sansmathfonts}[2021/06/22] \newif \ifmath@sansmathfonts \math@sansmathfontstrue +\newif \iftext@sansmathfonts \text@sansmathfontstrue +\newif \ifI@sansmathfonts \I@sansmathfontsfalse -\def\sfdefault@sansmathfonts{xcmss} - -\DeclareOption{notmath}{\math@sansmathfontsfalse} -\DeclareOption{I}{\def\sfdefault@sansmathfonts{cmsmf}} +\DeclareOption{notmath} {\math@sansmathfontsfalse} +\DeclareOption{onlytext}{\math@sansmathfontsfalse} +\DeclareOption{onlymath}{\text@sansmathfontsfalse} +\DeclareOption{nottext} {\text@sansmathfontsfalse} +\DeclareOption{I}{\I@sansmathfontstrue} \ProcessOptions +\def\OTOne@sansmathfonts{OT1} +\def\TOne@sansmathfonts{T1} +\def\U@sansmathfonts{U} + +\ifx\OTOne@sansmathfonts \f@encoding \else +\ifx\U@sansmathfonts \f@encoding \else + \I@sansmathfontsfalse + \PackageWarning{sansmathfonts} + {The [I] package option is only compatible with the OT1 and U + font encodings. I will ignore the [I] package option.} + \ifx\TOne@sansmathfonts \f@encoding \else + \text@sansmathfontsfalse + \PackageWarning{sansmathfonts} + {Sans serif text fonts are only provided for OT1, T1, and U font + encodings. I will not change the sans serif text font.} + \fi +\fi\fi + +\let\sfdefault@sansmathfonts\sfdefault +\iftext@sansmathfonts + \def\sfdefault@sansmathfonts{xcmss} + \ifI@sansmathfonts + \def\sfdefault@sansmathfonts{cmsmf}% + \fi +\fi + \ifmath@sansmathfonts % Turn off Beamer math replacements @@ -61,6 +90,27 @@ \@ifpackageloaded{esint}{% \DeclareSymbolFont{largesymbolsA}{U}{ssesint}{m}{n} }{} + % + \ifx\OTOne@sansmathfonts \f@encoding \else + \ifx\U@sansmathfonts \f@encoding \else + \ifI@sansmathfonts + \PackageError{sansmathfonts} + {The [I] package option is only compatible with + the OT1 and U font encodings.} + {Please do not use the [I] option for the sansmathfonts + package, or select your font encoding before you load + the sansmathfonts package.} + \fi + \ifx\TOne@sansmathfonts \f@encoding \else + \iftext@sansmathfonts + \PackageError{sansmathfonts} + {Sans serif text fonts are only + provided for OT1, T1, and U font encodings.} + {Please use the [onlymath] option for the sansmathfonts + package, or select your font encoding before you + load the sansmathfonts package.} + \fi \fi + \fi \fi } % beamer currently sets @@ -77,7 +127,6 @@ \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} @@ -86,8 +135,9 @@ \fi \DeclareMathAlphabet {\mathserif}{OT1}{cmr}{m}{n} +\DeclareMathAlphabet {\mathsf}{OT1}{cmsmf}{m}{n} % Use the improved sans family % (provides sans serif small caps fonts) -\def\sfdefault{\sfdefault@sansmathfonts} +\let\sfdefault\sfdefault@sansmathfonts |