#[beginner] tufte-memo template not working

12 messages · Page 1 of 1 (latest)

latent maple
#

Hi, I am trying to use the following template, but it just doesn't render. I tried placing a context around the whole document, but it just didn't work

formal bolt
#

Maybe you could share the exact document that triggers this, or a minimal version of the problem (just using the template), and the error message

formal bolt
latent maple
#

Is there any way to use margin notes outside of the template easily?

formal bolt
#

the package marginalia implements it and it works in current typst, I'm using it

#

looks like tufte-memo uses the package drafting for this purpose, you could also look at that one

#

so 2 alternatives, I guess both work (drafting was recently updated)

oblique ibex
#
#let note(dy:-2em, numbered:true, content) = context {
  if numbered {
    notecounter.step()
    text(weight:"bold",super(notecounter.display()))
  }
  text(size:9pt,font: sans-fonts,margin-note(if numbered {
    text(weight:"bold",font:"Lucida Bright",size:11pt,{
      super(notecounter.display())
      text(size: 9pt, " ")
    })
    content
  } else {
    content}
    ,dy:dy))
  }```
I edited the note function to start with a `context {` for the counter and i added `#import "@preview/drafting:0.2.2": *` to the start of the doc cuz it originally included drafting 0.2.0
mortal plank
#

I’ve been plugging marginalia for tufte-style documents. It’s got everything you need.

#

Cannot recommend enough