How to annotate text in margins?

I’m a new but happy typst user, so far I’ve managed to completely typeset two books of around 50k words each, and produced some variations on journal/diary text blocks for hand binding.

Out on the horizon I have some projects coming up where I would like to have a block of original text occupying most of the page but with additional paragraphs in the left and right margins (which will be wide) that comment on, translate, or add information on that area of main text. A well known example of this would be something like the Baring-Gould Annotated Sherlock Holmes (The annotated Sherlock Holmes Volume 1 : Doyle, Arthur Conan, 1859-1930 : Free Download, Borrow, and Streaming : Internet Archive) which looks like it is in two columns but the text on the left column on the left page and the right column on the right page is completely separate from the text in the central columns but spaced so it is close to relevant areas.

I think I can do this with minipage in latex, but I really don’t want to use latex.

Is there any way this could be achieved with typst?

Hello @Andy_Dwelly, welcome to the Forum, perhaps a package like marginalia – Typst Universe would do?

2 Likes

My goodness. That looks extremely promising. Many thanks.

1 Like

Glad it looks promising. It’s only one of the multiple options that you can find on Typst Universe. Let us know what you end up choosing :slight_smile:

Hello @Andy_Dwelly, if marginalia does not meet your requirements, you can always take a look at 📖 How to typeset two texts in parallel on pairs of facing pages? - #5 by sijo.

1 Like

Thanks everyone for these helpful suggestions. I will both methods a try and report back here.

The package looks great. I tried the following, and I see one minor problem. A small blue point appears at the beginning of the main text on the left which is not what I want. How to remove it in the output? Thank you.

#import "@preview/marginalia:0.2.3" as marginalia: note

#set par(justify: true)

#note(block-style:(fill: oklch(90%, 0.06, 140deg), outset: (left: 10pt, rest: 4pt), width: 100%, radius: 4pt))[#lorem(20)] #lorem(90)

#lorem(90)

The blue dots serve as “footnote markers”, you can get rid of them by using numbering: none on the notes.

Also, i recommend using marginalia.setup to give yourself some wider margins.

For more details, see the manual: typst-marginalia/Marginalia.pdf at v0.2.3 · nleanba/typst-marginalia · GitHub

2 Likes

Thank you for your feedback.