I am using the marginalia package and I am having problems customizing of the margin notes.
I want to change the font size. According to the documentation, note has a text-style argument. When I try to change it using a set rule, the document compiles with an error:
#set note(
text-style: (size: 8pt)
)
error: only element functions can be used in set rules
Is there a better solution than to wrap the note function in my custom function?
Both note() and notefigure() accept a text-style and par-style parameter…
using the function note() itself for the configuration seems to be your only option. Instead redefining it you can however just change the default value of text-style with with(). You will still have access to the other parameters and you can even override the text-style.
A note regarding the compilation error. Set rules for custom elements/functions are not (yet) available. There is an experimental package called elembic that introduces custom elements and types. This does however not help you here since marginalia does not use this.