summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-01-17 23:48:18 +0000
committerKarl Berry <karl@freefriends.org>2018-01-17 23:48:18 +0000
commit49363496d112c5542ae9ca4fc48a96ae2c0ac6d9 (patch)
tree8d4f8f50b3a8a18443b39403008cc682b06e949e /Master/texmf-dist/tex/latex
parentc3ad965169a16576b7214e764b9226ae7dd293f1 (diff)
mathfixs (17jan18)
git-svn-id: svn://tug.org/texlive/trunk@46365 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/mathfixs/mathfixs.sty257
1 files changed, 257 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/mathfixs/mathfixs.sty b/Master/texmf-dist/tex/latex/mathfixs/mathfixs.sty
new file mode 100644
index 00000000000..b41b5734d74
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/mathfixs/mathfixs.sty
@@ -0,0 +1,257 @@
+%%
+%% This is file `mathfixs.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% mathfixs.dtx (with options: `package')
+%%
+%% Copyright (C) 2018 Niklas Beisert
+%%
+%% 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 this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+\NeedsTeXFormat{LaTeX2e}[1996/12/01]
+\ProvidesPackage{mathfixs}[2018/01/17 v1.0 various fixes for math mode]
+
+\RequirePackage{keyval}
+
+\expandafter\def\expandafter\mafx@bfseries\expandafter
+ {\bfseries\ifmmode\else\boldmath\fi}
+\expandafter\def\expandafter\mafx@mdseries\expandafter
+ {\mdseries\ifmmode\else\unboldmath\fi}
+\expandafter\def\expandafter\mafx@normalfont\expandafter
+ {\normalfont\ifmmode\else\unboldmath\fi}
+
+\define@key{mafx@}{autobold}[]{%
+ \let\bfseries=\mafx@bfseries
+ \let\mdseries=\mafx@mdseries
+ \let\normalfont=\mafx@normalfont
+}
+
+\DeclareMathAlphabet{\mafx@mathbold}{OML}{cmm}{b}{it}
+
+\define@key{mafx@}{mathbold}[\mathbold]{\let#1=\mafx@mathbold}
+
+\ifdefined\@@over\else\let\@@over=\over\fi
+
+\def\mafx@frac@class{\mathinner}
+\def\mafx@frac@delimclass{\mathopen{}\mathclose}
+
+\DeclareRobustCommand{\mafx@frac}[2]{%
+ \mafx@frac@class{\begingroup#1\endgroup\@@over#2}}
+
+\def\mafx@@genfrac#1#2#3#4#5{\begingroup%
+ \ifx#2\@@overwithdelims\let\mafx@frac@class\mafx@frac@delimclass\fi%
+ \ifx#2\@@abovewithdelims\let\mafx@frac@class\mafx@frac@delimclass\fi%
+ \ifx#2\@@atopwithdelims\let\mafx@frac@class\mafx@frac@delimclass\fi%
+ \mafx@frac@class{#1{\begingroup#4\endgroup#2#3\relax#5}}%
+ \endgroup}
+
+\define@key{mafx@}{frac}[]{%
+ \let\frac=\mafx@frac
+ \let\@genfrac=\mafx@@genfrac
+}
+
+\define@key{mafx@}{fracclass}{\def\mafx@frac@class{#1}}
+\define@key{mafx@}{fracdelimclass}{\def\mafx@frac@delimclass{#1}}
+
+\DeclareRobustCommand{\mafx@rfrac}[2]{{\mathchoice%
+ {\textstyle{\begingroup#1\endgroup\@@over#2}}%
+ {\begingroup#1\endgroup\@@over#2}%
+ {\begingroup#1\endgroup\@@over#2}%
+ {\begingroup#1\endgroup\@@over#2}}}
+
+\define@key{mafx@}{rfrac}[\rfrac]{\let#1=\mafx@rfrac}
+
+\def\mafx@vfrac@class{\mathinner}
+\def\mafx@vfrac@preskip{\thinmuskip}
+\def\mafx@vfrac@postskip{0.6667\thinmuskip}
+\newcommand{\mafx@vfrac}[2]{\ifmmode%
+ \mafx@vfrac@class{\textstyle%
+ ^{#1}\mkern-\mafx@vfrac@preskip/\mkern-\mafx@vfrac@postskip_{#2}}%
+ \else$\mafx@vfrac{#1}{#2}$\fi}
+
+\define@key{mafx@}{vfrac}[\vfrac]{\let#1=\mafx@vfrac}
+
+\define@key{mafx@}{vfracclass}{\def\mafx@vfrac@class{#1}}
+\define@key{mafx@}{vfracskippre}{\def\mafx@vfrac@preskip{#1}}
+\define@key{mafx@}{vfracskippost}{\def\mafx@vfrac@postskip{#1}}
+
+\let\mafx@root@close=\@empty
+\def\mafx@root@class{}
+\def\mafx@root@endskip{0.6667\thinmuskip}
+\def\mafx@root@preskip{0mu}
+\def\mafx@root@postskip{0.3333\thinmuskip}
+
+\DeclareRobustCommand\mafx@sqrt{\@ifnextchar[\@sqrt{\@sqrt[]}}
+\def\mafx@@sqrt[#1]{\root#1\of}
+
+\def\mafx@root#1\of{
+ \setbox\rootbox\hbox{$\m@th\scriptscriptstyle{%
+ \gdef\mafx@gleftroot{0}\gdef\mafx@guproot{0}%
+ \def\leftroot##1{\gdef\mafx@gleftroot{##1}}%
+ \def\uproot##1{\gdef\mafx@guproot{##1}}%
+ #1}$}%
+ \let\mafx@leftroot=\mafx@gleftroot%
+ \let\mafx@uproot=\mafx@guproot%
+ \mathpalette\r@@t}
+
+\def\mafx@r@@t#1#2{\mafx@root@class{%
+ \ifx#1\scriptstyle\let\mafx@tmp@fontsel=\scriptfont\else%
+ \ifx#1\scriptscriptstyle\let\mafx@tmp@fontsel=\scriptscriptfont\else%
+ \let\mafx@tmp@fontsel=\textfont\fi\fi%
+ \sbox\z@{$\m@th#1\nulldelimiterspace=\z@\radical\z@{#2}$}%
+ \setlength\dimen@{\ht\z@}%
+ \ifx#1\displaystyle
+ \addtolength\dimen@{-\fontdimen8\textfont3}%
+ \addtolength\dimen@{-0.25\fontdimen5\textfont2}%
+ \else
+ \addtolength\dimen@{-1.25\fontdimen8\mafx@tmp@fontsel3}%
+ \fi
+ \setbox\z@=\hbox{$\m@th#1\sqrtsign{%
+ \vrule width0pt height\dimen@ depth\dp\z@}$}%
+ \setlength\dimen@{-\wd\rootbox}%
+ \addtolength\dimen@{0.6\wd\z@}%
+ \ifdim\dimen@>0pt\else\setlength\dimen@{0pt}\fi%
+ \kern\dimen@%
+ \setlength\dimen@{0.6\ht\z@}\addtolength\dimen@{-0.6\dp\z@}%
+ \setbox\@ne\hbox{$\m@th#1\mskip\mafx@uproot mu$}%
+ \addtolength\dimen@{\wd\@ne}%
+ \mkern-\mafx@leftroot mu%
+ \raise\dimen@\copy\rootbox%
+ \mkern\mafx@leftroot mu%
+ \kern-0.6\wd\z@%
+ \mkern\mafx@root@preskip\sqrtsign{#2\mskip\mafx@root@endskip}%
+ \ifx\mafx@root@close\@empty\else%
+ \setlength\dimen@{\fontdimen8\mafx@tmp@fontsel3}%
+ \lower\dimen@\hbox{%
+ \vrule width\dimen@ height\ht\z@ depth -\mafx@root@close\ht\z@}%
+ \fi%
+ \mkern\mafx@root@postskip}}
+
+\define@key{mafx@}{root}[]{
+ \let\sqrt=\mafx@sqrt
+ \let\@sqrt=\mafx@@sqrt
+ \let\root=\mafx@root
+ \let\r@@t=\mafx@r@@t
+}
+
+\define@key{mafx@}{rootclose}[0.8]{\def\mafx@root@close{#1}}
+\define@key{mafx@}{rootclass}{\def\mafx@root@class{#1}}
+\define@key{mafx@}{rootskipend}{\def\mafx@root@endskip{#1}}
+\define@key{mafx@}{rootskippre}{\def\mafx@root@preskip{#1}}
+\define@key{mafx@}{rootskippost}{\def\mafx@root@postskip{#1}}
+
+\let\mafx@old@dot=\.
+\def\mafx@dot@skip{\thinmuskip}
+\def\mafx@dot{\mskip\mafx@dot@skip}
+\def\mafx@per@dot{\begingroup\ifmmode\def\mafx@tmp{\mafx@dot}\else%
+ \def\mafx@tmp{\mafx@old@dot}\fi\expandafter\endgroup\mafx@tmp}
+
+\define@key{mafx@}{multskip}[\thinmuskip]{%
+ \let\.=\mafx@per@dot
+ \def\mafx@dot@skip{#1}%
+}
+
+\DeclareMathSymbol{\mafx@Gamma}{\mathalpha}{letters}{0}
+\DeclareMathSymbol{\mafx@Delta}{\mathalpha}{letters}{1}
+\DeclareMathSymbol{\mafx@Theta}{\mathalpha}{letters}{2}
+\DeclareMathSymbol{\mafx@Lambda}{\mathalpha}{letters}{3}
+\DeclareMathSymbol{\mafx@Xi}{\mathalpha}{letters}{4}
+\DeclareMathSymbol{\mafx@Pi}{\mathalpha}{letters}{5}
+\DeclareMathSymbol{\mafx@Sigma}{\mathalpha}{letters}{6}
+\DeclareMathSymbol{\mafx@Upsilon}{\mathalpha}{letters}{7}
+\DeclareMathSymbol{\mafx@Phi}{\mathalpha}{letters}{8}
+\DeclareMathSymbol{\mafx@Psi}{\mathalpha}{letters}{9}
+\DeclareMathSymbol{\mafx@Omega}{\mathalpha}{letters}{10}
+
+\define@key{mafx@}{greekcaps}[]{%
+ \expandafter\let\csname #1Gamma\endcsname=\mafx@Gamma
+ \expandafter\let\csname #1Delta\endcsname=\mafx@Delta
+ \expandafter\let\csname #1Theta\endcsname=\mafx@Theta
+ \expandafter\let\csname #1Lambda\endcsname=\mafx@Lambda
+ \expandafter\let\csname #1Xi\endcsname=\mafx@Xi
+ \expandafter\let\csname #1Pi\endcsname=\mafx@Pi
+ \expandafter\let\csname #1Sigma\endcsname=\mafx@Sigma
+ \expandafter\let\csname #1Upsilon\endcsname=\mafx@Upsilon
+ \expandafter\let\csname #1Phi\endcsname=\mafx@Phi
+ \expandafter\let\csname #1Psi\endcsname=\mafx@Psi
+ \expandafter\let\csname #1Omega\endcsname=\mafx@Omega
+}
+
+\DeclareMathSymbol{\mafx@alpha}{\mathalpha}{letters}{11}
+\DeclareMathSymbol{\mafx@beta}{\mathalpha}{letters}{12}
+\DeclareMathSymbol{\mafx@gamma}{\mathalpha}{letters}{13}
+\DeclareMathSymbol{\mafx@delta}{\mathalpha}{letters}{14}
+\DeclareMathSymbol{\mafx@epsilon}{\mathalpha}{letters}{15}
+\DeclareMathSymbol{\mafx@zeta}{\mathalpha}{letters}{16}
+\DeclareMathSymbol{\mafx@eta}{\mathalpha}{letters}{17}
+\DeclareMathSymbol{\mafx@theta}{\mathalpha}{letters}{18}
+\DeclareMathSymbol{\mafx@iota}{\mathalpha}{letters}{19}
+\DeclareMathSymbol{\mafx@kappa}{\mathalpha}{letters}{20}
+\DeclareMathSymbol{\mafx@lambda}{\mathalpha}{letters}{21}
+\DeclareMathSymbol{\mafx@mu}{\mathalpha}{letters}{22}
+\DeclareMathSymbol{\mafx@nu}{\mathalpha}{letters}{23}
+\DeclareMathSymbol{\mafx@xi}{\mathalpha}{letters}{24}
+\DeclareMathSymbol{\mafx@pi}{\mathalpha}{letters}{25}
+\DeclareMathSymbol{\mafx@rho}{\mathalpha}{letters}{26}
+\DeclareMathSymbol{\mafx@sigma}{\mathalpha}{letters}{27}
+\DeclareMathSymbol{\mafx@tau}{\mathalpha}{letters}{28}
+\DeclareMathSymbol{\mafx@upsilon}{\mathalpha}{letters}{29}
+\DeclareMathSymbol{\mafx@phi}{\mathalpha}{letters}{30}
+\DeclareMathSymbol{\mafx@chi}{\mathalpha}{letters}{31}
+\DeclareMathSymbol{\mafx@psi}{\mathalpha}{letters}{32}
+\DeclareMathSymbol{\mafx@omega}{\mathalpha}{letters}{33}
+\DeclareMathSymbol{\mafx@varepsilon}{\mathalpha}{letters}{34}
+\DeclareMathSymbol{\mafx@vartheta}{\mathalpha}{letters}{35}
+\DeclareMathSymbol{\mafx@varpi}{\mathalpha}{letters}{36}
+\DeclareMathSymbol{\mafx@varphi}{\mathalpha}{letters}{39}
+\DeclareMathSymbol{\mafx@varrho}{\mathalpha}{letters}{37}
+\DeclareMathSymbol{\mafx@varsigma}{\mathalpha}{letters}{38}
+
+\define@key{mafx@}{greeklower}[]{%
+ \expandafter\let\csname #1alpha\endcsname=\mafx@alpha
+ \expandafter\let\csname #1beta\endcsname=\mafx@beta
+ \expandafter\let\csname #1gamma\endcsname=\mafx@gamma
+ \expandafter\let\csname #1delta\endcsname=\mafx@delta
+ \expandafter\let\csname #1epsilon\endcsname=\mafx@epsilon
+ \expandafter\let\csname #1zeta\endcsname=\mafx@zeta
+ \expandafter\let\csname #1eta\endcsname=\mafx@eta
+ \expandafter\let\csname #1theta\endcsname=\mafx@theta
+ \expandafter\let\csname #1iota\endcsname=\mafx@iota
+ \expandafter\let\csname #1kappa\endcsname=\mafx@kappa
+ \expandafter\let\csname #1lambda\endcsname=\mafx@lambda
+ \expandafter\let\csname #1mu\endcsname=\mafx@mu
+ \expandafter\let\csname #1nu\endcsname=\mafx@nu
+ \expandafter\let\csname #1xi\endcsname=\mafx@xi
+ \expandafter\let\csname #1pi\endcsname=\mafx@pi
+ \expandafter\let\csname #1rho\endcsname=\mafx@rho
+ \expandafter\let\csname #1sigma\endcsname=\mafx@sigma
+ \expandafter\let\csname #1tau\endcsname=\mafx@tau
+ \expandafter\let\csname #1upsilon\endcsname=\mafx@upsilon
+ \expandafter\let\csname #1phi\endcsname=\mafx@phi
+ \expandafter\let\csname #1chi\endcsname=\mafx@chi
+ \expandafter\let\csname #1psi\endcsname=\mafx@psi
+ \expandafter\let\csname #1omega\endcsname=\mafx@omega
+ \expandafter\let\csname #1varepsilon\endcsname=\mafx@varepsilon
+ \expandafter\let\csname #1vartheta\endcsname=\mafx@vartheta
+ \expandafter\let\csname #1varpi\endcsname=\mafx@varpi
+ \expandafter\let\csname #1varphi\endcsname=\mafx@varphi
+ \expandafter\let\csname #1varrho\endcsname=\mafx@varrho
+ \expandafter\let\csname #1varsigma\endcsname=\mafx@varsigma
+}
+
+\newcommand{\ProvideMathFix}[1]{\setkeys{mafx@}{#1}}
+
+\DeclareOption*{\expandafter\ProvideMathFix\expandafter{\CurrentOption}}
+\ProcessOptions
+
+\endinput
+%%
+%% End of file `mathfixs.sty'.