Files
Typstfile/template.typ
T
2024-05-02 19:23:24 +02:00

62 lines
2.2 KiB
Typst

#let question = counter("questions")
#show heading : it => {
if it.body == [] or it.level >= 3 [#parbreak() #linebreak() #counter(heading).display() #it.body] else [#parbreak() #linebreak() #counter(heading).display() #it.body]
}
#let nonumeq = math.equation.with(block: true, numbering: none)
#let dm(x) = box[#nonumeq[#x]]
#let dfrac(x, y) = math.frac(dm(x), dm(y))
#let lbar(..args) = math.display(math.cases(delim: "|", ..args))
#let ubar(body, col: red) = rect(
inset: 0pt,
outset: (bottom: 3pt, rest: 0pt),
stroke: (bottom: (0.5pt + col), rest: 0pt),
)[#body]
#let frame(x) = rect(stroke: 1pt + red, outset: (x: -2pt, y: 2pt))[#x]
#let dframe(x) = frame(dm(x))
#let donc = "donc" + h(3pt)
#let Donc = "Donc" + h(3pt)
#let onA = "On a" + h(3pt)
#let tq = "tel que" + h(3pt)
#let et = "et" + h(3pt)
#let dt = math.dif + "t"
#let Id(n) = math.mat(..for x in range(n){
let l = ()
for y in range(n){
if y == x {
l.push(1)
} else { l.push(0) }
}
(l,)
})
#let tend(n, val) = $limits(-->)_(#n -> #val)$
#let undermath(body, col: red)= {
style(styles => {
let size = measure(dm(body), styles);
let size2 = measure(body, styles);
let offshet = ((size.height) - (size2.height)) / 1.1 + 1.3pt;
box(stroke: (bottom: col + 1pt), outset: (bottom: offshet), body);
})
}
#let th = "th"
#let t(x) = for i in range(x) {
h(1em)
}
#let cv = "converge" + h(3pt)
#let bi = math.beta.alt
#let soitn(body, ens) = [soit $#body in #ens$]
#let soietn(body, ens) = [soient $#body in #ens$]
#let Soitn(body, ens) = [Soit $#body in #ens$]
#let Soietn(body, ens) = [Soient $#body in #ens$]
#let ssi = "si et seulement si" + h(1pt)
#let calC = text(font: "Wedding")[C]
#let vect(body) = "Vect("+ body + ")"
#let ateb = math.beta.alt
#let Ker(body) = if (body.fields().keys() == ("text",)) {[Ker #body]} else {[Ker(#body) ]}
#let Im(body) = if (body.fields().keys() == ("text",)) {[Im #body]} else {[Im(#body) ]}
#let Vect = "Vect"
#let ou = "ou" + h(3pt)
#let C(k) = $#text(font: "FreeSerif")[#str.from-unicode(0x1D49E)]#h(1.7pt)^#k$
#let G = $#text(font: "FreeSerif")[#str.from-unicode(0x1D4A2)]$+ h(1.7pt)
#let ar(body) = $arrow(#body)$
#let ve(..body) = {grid(columns: 1,row-gutter: 3pt ,grid.vline(), ..body)}