yonsen_language/data/macros.typ

45 lines
740 B
Plaintext

#import "@preview/note-me:0.6.0": *
#let glyphy(
glyph,
height: 1.5em,
width: 1.5em,
inset: -0.1em,
baseline: -0.08em,
) = {
box(
height: height,
width: width,
image("svg/" + glyph + ".svg", scaling: "smooth"),
inset: inset,
baseline: baseline,
)
}
#let glinline(
glyph,
height: 0.74em,
width: 0.74em,
inset: 0em,
baseline: 0em,
) = {
box(
height: height,
width: width,
image("svg/" + glyph + ".svg", scaling: "smooth"),
inset: inset,
baseline: baseline,
)
}
#let example(body, plural: true) = {
let title = if plural [Exemples] else [Exemple]
admonition(
icon-string: read("icons/book-open.svg"),
color: color.black,
title: title,
)[
#body
]
}