yonsen_language/data/macros.typ

47 lines
786 B
Plaintext

#import "@preview/note-me:0.6.0": *
#let glyphy(
glyph,
size: 2em,
inset: 0em,
baseline: 0.0em,
) = {
box(
height: size,
width: size,
inset: inset,
baseline: baseline,
)[
#align(center + horizon)[
#image("svg/" + glyph + ".svg", scaling: "smooth")
]]
}
#let glinline(
glyph,
size: 0.74em,
inset: 0em,
baseline: 0em,
) = {
box(
height: size,
width: size,
inset: inset,
baseline: baseline,
)[
#align(center + horizon)[
#image("svg/" + glyph + ".svg", scaling: "smooth")
]]
}
#let example(body, plural: true) = {
let title = if plural [Exemples] else [Exemple]
admonition(
icon-string: read("icons/book-open.svg"),
color: color.gray,
title: title,
)[#set text(size: 9pt,)
#body
]
}