2023-05-18 14:23:22 +08:00

54 lines
1.5 KiB
Typst

#import "template.typ": *
#let pagebreak_until_odd() = {
// TODO: Issue #939 (https://github.com/typst/typst/issues/939)
pagebreak()
}
#let italic(body) = text(style: "italic", body)
#let type_icon(name, color) = square(size: 40pt, fill: rgb(color))[
#set text(20pt, white, font: labelfont, weight: "regular")
#set align(center + horizon)
#name
]
#let combinatorics_icon = type_icon("C", "FBC02D")
#let algebra_icon = type_icon("Al", "EC407A")
#let analysis_icon = type_icon("An", "FFA000")
#let number_thoery_icon = type_icon("N", "2E7D32")
#let logic_icon = type_icon("L", "000000")
#let geometry_icon = type_icon("G", "283593")
#let bf(x) = {$upright(bold(#x))$}
#let hypergeometric-func(ax, bx, x) = {$upright(F)lr((lr(mat(delim: #none, ax;bx)|)#x))$}
#let transpose = {$upright(sans(T))$}
#let frange = {$op("range")$}
#let dimrange = {$op("dim range")$}
#let fnull = {$op("null")$}
#let dimnull = {$op("dim null")$}
#let theme_blue = rgb("29B6F6")
#let theme_red = rgb("FF7043")
#let theme_border = rgb("616161")
#let theme_black = rgb("212121")
#let math_numbering(body) = {
set math.equation(numbering: "(1)")
body
}
#let inprod(a,b) = {$angle.l #a,#b angle.r$}
#let trig = sym.triangle.stroked.t
#let ii = {$upright(i)$}
#let mtext(body) = text(font: cnmainfont, weight: "regular", body)
#let thoerem_box(name, c) = {
identp
box(baseline: 4pt, inset: 4pt, fill: c, text(font: cnfont, fill: white, weight: "semibold", name))
}
#let lemma_icon = thoerem_box([引理], theme_blue)