miestrode / sourcerer

Typst package for displaying stylized source code blocks, with some extra features.
MIT License
3 stars 0 forks source link

Sourcerer

Sourcerer is a Typst package for displaying stylized source code blocks, with some extra features. Main features include:

Usage

First, import the package via:

#import "@preview/sourcerer:0.2.1": code

Then, display custom code blocks via the code function, like so:

#code(
  lang: "Typst",
  ```typ
  Woah, that's pretty #smallcaps(cool)!
  That's neat too.

)



This results in:

<p align="center">
  <img src="https://github.com/miestrode/sourcerer/raw/main/assets/sourcerer.png" width="750"/>
</p>

To view all of the options of the `code` function, consult the [documentation](DOCS.md).