This is the first release of the library I designed over the past 18 months while using it for my lecture notes.
It provides you with frames around whatever you like. I designed it with theorems, definitions, … in mind, but you freely define the variations, supplements and colors at the start of your document. By default, it ships with two different styles.
Through the concept of tags and titles, you can style your frames in a lot of diverse end expressive ways.
I spent a lot of effort to design the syntax as expressive and easy as possible.
#import "@preview/frame-it:1.0.0"
#let (example, feature, variant, syntax) = make-frames(
// This identifies the counter used for all theorems in this definition
"counter-id",
theorem: ("Theorem",),
// For each frame kind, you have to provide its supplement title to be displayed
definition: ("Definition",),
// You can provide a color or leave it out and it will be generated
example: ("Example", gray),
// You can add as many as you want
corollary: ("Corollary",),
)
And here is how you would use it to get a frame as shown above
#example[Optional Title][Optional Tags][...][
Body, i.e. large content block for the frame.
]
If these stylings are not enough, you can create your own style function which receives all the information available and can return whatever content it likes.
The default stylings are implemented without magic using this system.
All these screenshots are taken from the README which explains everything in much greater detail.
If you’ve been looking for something like this before, go check out the README. If you have questions, I would be glad about feedback and opinions. Also feel free to submit an issue on GitHub :)