-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmath.typ
More file actions
38 lines (38 loc) · 759 Bytes
/
math.typ
File metadata and controls
38 lines (38 loc) · 759 Bytes
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
#import "@preview/quick-maths:0.2.1":shorthands
#let ee=$bb(e)$
#let ii=$bb(i)$
#let sgn=$op("sgn")$
#let arccot=$op("arccot")$
#let arsinh=$op("arsinh")$
#let arcosh=$op("arcosh")$
#let artanh=$op("artanh")$
#let mod=math.class("binary",math.mod)
#let cases(..args)=math.cases(
gap:.6em,
..args.named(),
..args.pos().map(it=>{
if it.has("children"){
let arr=()
for elem in it.children{
if repr(elem)=="align-point()"{
arr.push(math.display(sym.space))
}
arr.push(math.display(elem))
}
arr.join()
}
else{
math.display(it)
}
}),
)
#let math-shorthands(body)={
show:shorthands.with(
($+-$,$plus.minus$),
($-+$,$minus.plus$),
($++$,$class("binary",+)$),
($--$,$class("binary",-)$),
($<-$,$< -$),
)
body
}