diff options
Diffstat (limited to 'macros/latex/contrib/physics2/tex/phy-common.sty')
-rw-r--r-- | macros/latex/contrib/physics2/tex/phy-common.sty | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/macros/latex/contrib/physics2/tex/phy-common.sty b/macros/latex/contrib/physics2/tex/phy-common.sty new file mode 100644 index 0000000000..1b0776a807 --- /dev/null +++ b/macros/latex/contrib/physics2/tex/phy-common.sty @@ -0,0 +1,67 @@ +%% +%% This is file `phy-common.sty', +%% the `common' module of `physics2' package. +%% +%% ****************************************************** +%% * This work may be distributed and/or modified under * +%% * the conditions of the LaTeX Project Public License * +%% * * +%% * http://www.latex-project.org/lppl.txt * +%% * * +%% * either version 1.3c of this license or any later * +%% * version. * +%% ****************************************************** +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Zhang Tingxuan. +%% +\ProvidesFile{phy-common.sty} + [2023/1/25 `common' module of `physics2.sty'] +% Check if `unicode-math' loaded and (re)define the vert symbols. +% The `\relax'es here are for \ifx to compare. +\AtBeginDocument{\ifcsname symrm\endcsname + \protected\def\|{\Udelimiter 0 \symoperators "2016 }% + \protected\def\vert{\Udelimiter 0 \symoperators "007C\relax}% + \protected\def\Vert{\Udelimiter 0 \symoperators "2016\relax}% + \protected\def\mid{\Udelimiter 3 \symoperators "007C }% +\fi} +\protected\def\Vert{\delimiter"026B30D\relax} +\protected\def\mid{\delimiter"326A30C } +% \delopen and \delclose, make inner subformulae delimited by +% \left and \right behave as an open plus a close atom. +\DeclareRobustCommand\delopen{\mathopen{}\mathclose\bgroup\left} +\DeclareRobustCommand\delclose{\aftergroup\egroup\right} +% Extension to the 2e kernel biggggg commands. +\DeclareRobustCommand\biggg[1]{\leavevmode@ifvmode + {\hbox{$\left#1\vbox to20.5\p@{}\right.\n@space$}}} +\DeclareRobustCommand\Biggg[1]{\leavevmode@ifvmode + {\hbox{$\left#1\vbox to23.5\p@{}\right.\n@space$}}} +\DeclareRobustCommand\bigggl{\mathopen\biggg} +\DeclareRobustCommand\bigggm{\mathrel\biggg} +\DeclareRobustCommand\bigggr{\mathclose\biggg} +\DeclareRobustCommand\Bigggl{\mathopen\Biggg} +\DeclareRobustCommand\Bigggm{\mathrel\Biggg} +\DeclareRobustCommand\Bigggr{\mathclose\Biggg} +% \phy@mathvphantom, does the same job as \vphantom in math mode actually. +\def\phy@mathvphantom#1{\setbox\phy@tempboxa=\hbox{}% + \mathchoice% + {\setbox\@tempboxa\hbox{$\displaystyle#1$}% + \ht\phy@tempboxa=\ht\@tempboxa% + \dp\phy@tempboxa=\dp\@tempboxa% + \box\phy@tempboxa}% + {\setbox\@tempboxa\hbox{$\textstyle#1$}% + \ht\phy@tempboxa=\ht\@tempboxa% + \dp\phy@tempboxa=\dp\@tempboxa% + \box\phy@tempboxa}% + {\setbox\@tempboxa\hbox{$\scriptstyle#1$}% + \ht\phy@tempboxa=\ht\@tempboxa% + \dp\phy@tempboxa=\dp\@tempboxa% + \box\phy@tempboxa}% + {\setbox\@tempboxa\hbox{$\scriptscriptstyle#1$}% + \ht\phy@tempboxa=\ht\@tempboxa% + \dp\phy@tempboxa=\dp\@tempboxa% + \box\phy@tempboxa}% +} +\endinput +%% End of file `phy-common.sty'. |