Home

Awesome

codelst (v2.0.2)

codelst is a Typst package for rendering sourcecode with line numbers and some other additions.

Usage

Import the package from the typst preview repository:

#import "@preview/codelst:2.0.2": sourcecode

After importing the package, simply wrap any fenced code block in a call to #sourcecode():

#import "@preview/codelst:2.0.2": sourcecode

#sourcecode[```typ
#show "ArtosFlow": name => box[
  #box(image(
    "logo.svg",
    height: 0.7em,
  ))
  #name
]

This report is embedded in the
ArtosFlow project. ArtosFlow is a
project of the Artos Institute.
```]

Further documentation

See manual.pdf for a comprehensive manual of the package.

See example.typ for some quick usage examples.

Development

The documentation is created using Mantys, a Typst template for creating package documentation.

To compile the manual, Mantys needs to be available as a local package. Refer to Mantys' manual for instructions on how to do so.

Changelog

v2.0.1

This version makes codelst compatible to Typst 0.11.0. Version 2.0.1 now requires Typst 0.11.0, since there are some breaking changes to the way counters work.

Thanks to @kilpkonn for theses changes.

v2.0.0

Version 2 requires Typst 0.9.0 or newer. Rendering is now done using the new raw.line elements get consistent line numbers and syntax highlighting (even if showrange is used). Rendering is now done in a #table.

v1.0.0

v0.0.5

v0.0.4

v0.0.3

v0.0.2

v0.0.1