yonsen_language/data/macros.typ

43 lines
697 B
Plaintext

#import "@preview/note-me:0.6.0": *
#let glyphy(
glyph,
size: 1.5em,
inset: -0.1em,
baseline: -0.08em,
) = {
box(
height: size,
width: size,
image("svg/" + glyph + ".svg", scaling: "smooth"),
inset: inset,
baseline: baseline,
)
}
#let glinline(
glyph,
size: 0.74em,
inset: 0em,
baseline: 0em,
) = {
box(
height: size,
width: size,
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
]
}