Void Linux workstation powered by niri, Fish and NeoVim. Contains scripts, browser extensions, custom XBPS packages, and typst plugins. git.anhgelus.world/anhgelus/dotfiles
void niri fish neovim nvim vim dotfiles linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(typst): proof callout

+26 -8
+26 -8
typst/callout/1.0.0/lib.typ
··· 15 15 ) 16 16 } 17 17 18 - #let callout(icon, title, title_content, colors, content) = { 18 + #let title(content) = text(size: 1.15em, strong(content)) 19 + 20 + #let callout(icon, title_content, colors, content) = { 19 21 emptyblock(colors)[ 20 - #text(size: 1.15em)[#icon~ #strong(title)] 22 + #text(size: 1.15em)[#icon~ #strong(title_content)] 21 23 22 24 #content 23 25 ] ··· 27 29 callout( 28 30 emoji.warning, 29 31 "Attention", 30 - title, 31 32 (oklch(25%, 35%, 52.55deg), oklch(68.9%, 44%, 52.55deg, 15%)), 32 33 body, 33 34 ) 34 35 } 35 36 36 37 #let solution(body) = { 37 - callout(emoji.checkmark.box, "Solution", 38 + callout( 39 + emoji.checkmark.box, 40 + "Solution", 38 41 (rgb("#2AA63D"), rgb("#DBFCE7"), rgb("#7AF0A8")), 39 - body) 42 + body, 43 + ) 40 44 } 41 45 42 46 #let defn(body) = { 43 47 callout( 44 48 $Delta$, 45 49 "Définition", 46 - title, 47 50 (oklch(20%, 20%, 247deg), oklch(75%, 25%, 247deg, 40%)), 48 51 body, 49 52 ) ··· 53 56 callout( 54 57 $Pi$, 55 58 "Proposition", 56 - title, 57 59 (oklch(20%, 20%, 247deg), oklch(85%, 10%, 247deg, 50%)), 58 60 body, 59 61 ) ··· 63 65 callout( 64 66 $Tau$, 65 67 "Théorème", 66 - title, 67 68 (oklch(20%, 20%, 220deg), oklch(80%, 25%, 220deg, 40%)), 68 69 body, 69 70 ) 70 71 } 72 + 73 + #let proof(body) = { 74 + set par( 75 + leading: 0.5em, 76 + first-line-indent: 0em, 77 + spacing: 1.2em, 78 + ) 79 + set text(size: 0.9em, fill: luma(70)) 80 + block( 81 + stroke: (left: 1pt + black), 82 + inset: 1em, 83 + )[ 84 + #title("Preuve") 85 + 86 + #body 87 + ] 88 + }