-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheumesymath.sty
44 lines (39 loc) · 1.29 KB
/
eumesymath.sty
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
\usepackage{amsmath,amssymb,mathtools}
% define \mathboldface
\newcommand{\mathboldface}{}
\def\useboldmathmathboldface{%
\renewcommand{\mathboldface}[1]{\mbox{\boldmath $##1$}}
}
\def\useboldsymbolmathboldface{%
\renewcommand{\mathboldface}[1]{\boldsymbol{##1}}
}
\def\usemathbfmathboldface{% e.g., unicode-math w/mathbf=sym option
\renewcommand{\mathboldface}[1]{\mathbf{##1}}
}
\usemathbfmathboldface
% define \VEC
\def\usemathboldfacevec{%
\newcommand{\VEC}[1]{\mathboldface{##1}}
}
\usemathboldfacevec
% \newcommand{\VEC}[1]{\mathboldface{#1}}
\DeclareMathOperator*{\argmax}{arg\,max}
\DeclareMathOperator*{\argmin}{arg\,min}
% define \abs and \norm with mathtools
% h/t https://tex.stackexchange.com/questions/43008/absolute-value-symbols
\DeclarePairedDelimiter\abs{\lvert}{\rvert}
\DeclarePairedDelimiter\norm{\lVert}{\rVert}
% Swap the definition of (\abs and \abs*) and (\norm and \norm*),
% so that \abs and \norm resizes the size of the brackets, and the starred version does not.
\makeatletter
\let\oldabs\abs
\def\abs{\@ifstar{\oldabs}{\oldabs*}}
\let\oldnorm\norm
\def\norm{\@ifstar{\oldnorm}{\oldnorm*}}
\makeatother
% :=
% ---
% when not using txfonts or pxfonts, use \coloneqq with mathtools
% ref. https://ctan.org/pkg/mathtools
% ---
% \newcommand{\defeq}{:=}