diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/sansmath/sansmath.sty (renamed from Master/texmf-dist/tex/latex/ltxmisc/sansmath.sty) | 51 |
1 files changed, 38 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/ltxmisc/sansmath.sty b/Master/texmf-dist/tex/latex/sansmath/sansmath.sty index bc757537179..cca83737096 100644 --- a/Master/texmf-dist/tex/latex/ltxmisc/sansmath.sty +++ b/Master/texmf-dist/tex/latex/sansmath/sansmath.sty @@ -1,13 +1,16 @@ % LaTeX package sansmath: typeset sans-serif math using `text' fonts. % -\ProvidesPackage{sansmath}[2006/11/10 \space ver 0.7 Donald Arseneau] +\ProvidesPackage{sansmath}[2007/02/28 \space ver 1.1 Donald Arseneau] % % Donald Arseneau, asnd@triumf.ca, Vancouver, Canada. % -% This package is released to the public domain by the original -% author, who does not support it, and requests that it be adopted -% and supported by someone who actually knows something about math -% font issues in LaTeX. +% This package is released to the public domain by me, Donald Arseneau, +% the original author, who disclaims all rights. I do not support it, +% and request that it be adopted and supported by someone who knows +% more about math font issues in LaTeX. +% +% The point of this package is to allow sans-serif math in the absence +% of proper sans math fonts. % % The author was persuaded to use the name `sansmath' in hopes of % working with various text sans fonts (indicated by \sfdefault) @@ -18,9 +21,9 @@ % ~~~~~~~~~~~~ % Load this package by inserting `\usepackage{sansmath}' in the % document preamble. This will define a new math version `sans' -% and a command `\sansmath', much like `\boldmath'. Note that -% NO `\unsansmath' is defined, so if math is to be sans-serif for -% just part of a document, one should declare `\sansmath' in a local +% and a command `\sansmath', much like `\boldmath'. There is also +% an `\unsansmath' defined, but if math is to be sans-serif for +% a region of a document, one should declare `\sansmath' in a local % group (perhaps with \begin{sansmath}...\end{sansmath}). % Within the scope of the \sansmath declaration, math characters % will be taken from the text sans-serif family as much as possible. @@ -58,6 +61,7 @@ \let\EulGreek\relax \let\EuUCGreek\relax +\let\NonEulGreek\relax \DeclareOption{EULERGREEK}{ \ExecuteOptions{eulergreek} \def\EuUCGreek{% @@ -66,14 +70,25 @@ }} \DeclareOption{eulergreek}{ \def\EulGreek{% - \ifnum\alpha<\@eugreekOffset - \@eug\alpha \@eug\beta \@eug\gamma \@eug\delta \@eug\epsilon - \@eug\zeta \@eug\eta \@eug\theta \@eug\iota \@eug\kappa \@eug\lambda + \ifnum\alpha<\@eugreekOffset % avoid multi-mapping when repeated + \EulGreekList + \EuUCGreek + \let\varrho\rho \let\varsigma\sigma % Euler's missing variants + \fi +} +\def\EulGreekList{\@eug\alpha \@eug\beta \@eug\gamma \@eug\delta + \@eug\epsilon \@eug\zeta \@eug\eta \@eug\theta \@eug\iota \@eug\kappa + \@eug\lambda \@eug\mu \@eug\nu \@eug\xi \@eug\pi \@eug\rho \@eug\sigma \@eug\tau \@eug\upsilon \@eug\phi \@eug\chi \@eug\psi \@eug\omega \@eug\varepsilon \@eug\vartheta \@eug\varpi \@eug\varphi +} +\def\NonEulGreek{% Reverse previous mapping + \ifnum\alpha>\@eugreekOffset % avoid multi-mapping when repeated + \@eugreekOffset=-\@eugreekOffset \@euGREEKOffset=-\@euGREEKOffset + \EulGreekList \EuUCGreek - \let\varrho\rho \let\varsigma\sigma % Euler's missing variants + \@eugreekOffset=-\@eugreekOffset \@euGREEKOffset=-\@euGREEKOffset \fi }} @@ -128,6 +143,7 @@ \advance\@eugreekOffset-\alpha \def\@eug#1{\@tempcnta#1\advance\@tempcnta\@eugreekOffset + %\message{Change \string#1 from \number#1 to \number\@tempcnta}% \mathchardef#1\@tempcnta} \ifx\EuUCGreek\relax\else @@ -174,18 +190,27 @@ } \def\sansmath{% + \ifx\mnorm@mathbf\mathbf\else \let\mnorm@mathbf\mathbf \fi \mathversion{sans}% \let\mathbf\mathsfbf \let\sansm@every@math\sfMathSwitch \EulGreek } +\def\unsansmath{% + \mathversion{normal}% + \let\mathbf\mnorm@mathbf + \let\sansm@every@math\relax + \NonEulGreek +} + \expandafter\def\expandafter\check@mathfonts\expandafter{\check@mathfonts \sansm@every@math} \let\sansm@every@math\relax +\let\mnorm@mathbf\mathbf -% Repair of a LaTeX bug that has not been fixed in 5 years. +% Repair of a LaTeX bug that has not been fixed in 6 years. % Latex bug: latex/3357 \def \@fontswitch #1#2{% |