Tufte helpers
When the tufte layout is enabled (tufte: true in #bookly.with, see Layout), several customizations adapt the appearance of figures, tables and equations to the Tufte style. Bookly also provides the following functions, based on the marginalia package, to place content in the margins.
Side notes
#note(..note-args)Arguments of the note function of the marginalia package.
Bookly customizes the marginalia note function as follows:
#let note = note.with(
counter: states.sidenotecounter,
numbering: (..i) => super(numbering("1", ..i)),
keep-order: true,
)Side figures
#notefigure(..notefigure-args)Arguments of the notefigure function of the marginalia package.
Bookly slightly customizes the marginalia notefigure function as follows:
#let notefigure = notefigure.with(keep-order: true)Side citations
#notecite cites a reference in the text and displays the full reference in the margin.
#notecite(
key,
supplement: none,
dy: 0em,
alignment: "baseline",
)Key of the reference to cite.
Supplement of the citation (e.g., a page number).
Vertical adjustment of the side citation.
Alignment of the side citation. Possible values are:
"top": align the top of the note with the reference;"caption-top": align the top of the note with the main text baseline;"bottom": align the bottom of the note with the reference;"baseline"(default): align the baseline of the note with the main text baseline.
#notecite requires a bibliography in the document. Otherwise, the compilation stops with an error.Wide blocks
#wideblock extends a block over the margin.
#wideblock(side: auto)[...]Side over which the block is extended. Possible values are:
auto: same as"outer";"outer": outer side of the page;"inner": inner side of the page;"left": left side of the page;"right": right side of the page;"both": both sides of the page.
Example: full-width figure
#wideblock[
#figure(image("images/figure.png"), caption: [Full width figure])
]tufte layout, use #wide-if-tufte instead of #wideblock. It takes the same arguments, but only creates a wide block when the tufte layout is enabled. Otherwise, it simply returns its content.