-
Notifications
You must be signed in to change notification settings - Fork 11
/
fngp.sty
63 lines (54 loc) · 1.33 KB
/
fngp.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
\RequirePackage{xparse}
\ExplSyntaxOn
\def\groupstrut{\vphantom{k_g}}
\DeclareDocumentCommand\gp {o m+} {
\IfNoValueTF {#1} {
\left[
\groupstrut % manually enlarge the smallest delimiter style
#2
\right]
} {
\csname fngp_#1_l:n\endcsname[
#2
\csname fngp_#1_r:n\endcsname]
}
}
\DeclareDocumentCommand\fn {o m+} {
\mathopen{}
\IfNoValueTF {#1} {
\mathclose{
\left(
#2
\right)
}
} {
\mathclose{
\csname fngp_#1_l:n\endcsname(
#2
\csname fngp_#1_r:n\endcsname)
}
}
}
\cs_set_eq:NN \fngp_stretch_l:n \left
\cs_set_eq:NN \fngp_stretch_r:n \right
\cs_set_eq:NN \fngp_small_l:n \use:n
\cs_set_eq:NN \fngp_small_r:n \use:n
\cs_set_eq:NN \fngp_big_l:n \bigl
\cs_set_eq:NN \fngp_big_r:n \bigr
\cs_set_eq:NN \fngp_Big_l:n \Bigl
\cs_set_eq:NN \fngp_Big_r:n \Bigr
\cs_set_eq:NN \fngp_bigg_l:n \biggl
\cs_set_eq:NN \fngp_bigg_r:n \biggr
\cs_set_eq:NN \fngp_Bigg_l:n \Biggl
\cs_set_eq:NN \fngp_Bigg_r:n \Biggr
\cs_set_eq:cN {fngp_0_l:n} \use:n
\cs_set_eq:cN {fngp_0_r:n} \use:n
\cs_set_eq:cN {fngp_1_l:n} \bigl
\cs_set_eq:cN {fngp_1_r:n} \bigr
\cs_set_eq:cN {fngp_2_l:n} \Bigl
\cs_set_eq:cN {fngp_2_r:n} \Bigr
\cs_set_eq:cN {fngp_3_l:n} \biggl
\cs_set_eq:cN {fngp_3_r:n} \biggr
\cs_set_eq:cN {fngp_4_l:n} \Biggl
\cs_set_eq:cN {fngp_4_r:n} \Biggr
\ExplSyntaxOff