summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/physics2/phy-common.sty
blob: e587c02bec9681ad84fba05a9466519beb7937ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
%% 
%% 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/03/29 `common' module of `physics2.sty']
% Check if unicode-math loaded and (re)define the vert symbols.
% The \relax's here are for \ifx to compare.
% unicode-math sets these symbols in \fam1, \symoperators is set 1 in 2e kernel.
\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'.