summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-05-28 20:20:35 +0000
committerKarl Berry <karl@freefriends.org>2022-05-28 20:20:35 +0000
commitcd07033f2f7b85fd835256ddb322fb95ae8340a7 (patch)
tree17a42f9b1e5d31141f811450c189932941f6b8fc /Master/texmf-dist/tex
parent8e5d7958406ba072f48f63a11a62ea4785b26cc6 (diff)
fixdif (28may22)
git-svn-id: svn://tug.org/texlive/trunk@63426 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/fixdif/fixdif.sty118
1 files changed, 118 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/fixdif/fixdif.sty b/Master/texmf-dist/tex/latex/fixdif/fixdif.sty
new file mode 100644
index 00000000000..3431ca9d12b
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/fixdif/fixdif.sty
@@ -0,0 +1,118 @@
+%%
+%% This is file `fixdif.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% fixdif.dtx (with options: `package')
+%%
+%% Copyright (C) 2022 by Zhang Tingxuan <alphaztx@163.com>
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3c 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.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Zhang Tingxuan.
+%%
+%% This work consists of the files fixdif.dtx,
+%% and the derived files fixdif.ins,
+%% fixdif.sty,
+%% fixdef.pdf,
+%% and README.md.
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{fixdif}[2022/05/26 Interface for defining the differential operator.]
+\@ifpackageloaded{unicode-math}{
+ \Umathcode`\/="4 "0 "002F
+ \Umathcode"2044="4 "0 "2044
+ \Umathcode"2215="4 "0 "2215
+ \Umathcode"2F98="4 "0 "2F98
+ \Umathcode`\\="4 "0 "005C
+ \Umathcode"2216="4 "0 "2216
+ \Umathcode"29F5="4 "0 "29F5
+ \Umathcode"29F9="4 "0 "29F9
+}{
+ \mathcode`\/="413D
+ \mathcode`\\="426E % \backslash
+ \def\backslash{\delimiter"426E30F\relax}
+}
+\def\mup@tch{\mathchoice{\mskip-\thinmuskip}{\mskip-\thinmuskip}{}{}}
+\def\s@beforep@tch{\mathchoice{}{}{\mbox{}}{\mbox{}}}
+\DeclareOption{rm}{\@ifpackageloaded{unicode-math}
+ {\def\@@dif{\symrm{d}}}{\def\@@dif{\mathrm{d}}}}
+\DeclareOption{normal}{\def\@@dif{d}}
+\DeclareOption{partial}{\def\fixdif@partial@bool{1}}
+\DeclareOption{nopartial}{\def\fixdif@partial@bool{0}}
+\ExecuteOptions{rm,partial}
+\ProcessOptions\relax
+\def\fixdif@partial@true{1}
+\ifx\fixdif@partial@bool\fixdif@partial@true
+ \AtEndOfPackage{\letdif{\partial}{partial}}
+\fi
+\gdef\resetdfont#1{\let\@@dif\relax%
+ \def\@@dif{#1{d}}}
+\def\@dif{\ifmmode%
+ \mathinner{\@@dif}\mup@tch%
+\fi}
+\let\d@accent\d
+\gdef\d{\ifmmode\@dif\else\expandafter\d@accent\fi}
+\def\@letdif#1#2{\AtBeginDocument{
+ \ifcsname #2@old\endcsname\else
+ \expandafter\let\csname #2@old\expandafter\endcsname%
+ \csname #2\endcsname
+ \fi
+ \gdef#1{\mathinner{\csname #2@old\endcsname}\mup@tch}
+}}
+\def\s@letdif#1#2{\AtBeginDocument{
+ \ifcsname #2@old\endcsname\else
+ \expandafter\let\csname #2@old\expandafter\endcsname%
+ \csname #2\endcsname
+ \fi
+ \gdef#1{\mathinner{\s@beforep@tch\csname #2@old\endcsname\mbox{}}\mup@tch}
+}}
+\def\letdif{\@ifstar\s@letdif\@letdif}
+\long\def\@newdif#1#2{\AtBeginDocument{
+ \ifdefined#1
+ \PackageError{fixdif}{\string#1 is already defined.}
+ {Try another command instead of \string#1.}
+ \else
+ \long\gdef#1{\mathinner{#2}\mup@tch}
+ \fi
+}}
+\long\def\s@newdif#1#2{\AtBeginDocument{
+ \ifdefined#1
+ \PackageError{fixdif}{\string#1 is already defined.}
+ {Try another command instead of \string#1.}
+ \else
+ \long\gdef#1{\s@beforep@tch\mathinner{#2\mbox{}}\mup@tch}
+ \fi
+}}
+\def\newdif{\@ifstar\s@newdif\@newdif}
+\long\def\@renewdif#1#2{\AtBeginDocument{
+ \ifdefined#1
+ \long\gdef#1{\mathinner{#2}\mup@tch}
+ \else
+ \PackageError{fixdif}{\string#1 has not been defined yet.}
+ {You should use \string\newdif instead of \string\renewdif.}
+ \fi
+}}
+\long\def\s@renewdif#1#2{\AtBeginDocument{
+ \ifdefined#1
+ \long\gdef#1{\s@beforep@tch\mathinner{#2\mbox{}}\mup@tch}
+ \else
+ \PackageError{fixdif}{\string#1 has not been defined yet.}
+ {You should use \string\newdif instead of \string\renewdif.}
+ \fi
+}}
+\def\renewdif{\@ifstar\s@renewdif\@renewdif}
+\endinput
+%%
+%% End of file `fixdif.sty'.