I want to position notes in the page (not cell) margin. Thanks to Claude, I have the following code:
#import "@preview/drafting:0.2.2": absolute-place, set-page-properties, note-outline
#let r-margin = 3cm
#set page(margin: (right: r-margin, rest: 2cm))
#set-page-properties(margin-right: r-margin)
#let abs-margin-note(body) = context {
let pos = here().position()
absolute-place(
dx: page.width - r-margin + 4pt,
dy: pos.y,
block(
width: r-margin - 8pt,
text(size: 8pt, fill: gray.darken(30%), body)
)
)
}
#note-outline()
Some normal body text. #abs-margin-note[Works in body!]
#table(
columns: (auto, 1fr),
[Row 1], [Content #abs-margin-note[Works in table!]],
[Row 2], [More content #abs-margin-note[Also works!]],
)
This works, but #note-outline() no longer prints anything.