Skip to content

JulianJM45/codedis

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CODEDIS - Simple CODE DISplay for Typst

Used to display code files in Typst. Main feature is that it displays code blocks over multiple pages in a way that implies the code block continues onto the next page. Also a simple and intuitive syntax for displaying code blocks.

Usage:

// IMPORT PACKAGE
#import "@preview/codedis:0.2.0": code

// READ IN CODE
#let codeblock-1 = read("some_code.py")
#let codeblock-2 = read("some_code.cpp")

#set page(numbering: "1")
#v(80%)

// DEFAULT LANGUAGE IS Python ("py")
#code(codeblock-1)
#code(codeblock-2, lang: "cpp")

Renders to:

image

It is very basic and limited, but it does what I need it too, and hope that it may be of help to others. I'm most likely not going to develop it further than this.

About

A simple package for displaying codeblocks in Typst.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Typst 100.0%