Skip to content

Latest commit

 

History

History
58 lines (41 loc) · 1.63 KB

README.md

File metadata and controls

58 lines (41 loc) · 1.63 KB

Katla: LaTeX & HTML code listing generator for Idris2

Pre-alpha version. Interface might change as the command line interface generator library Collie evolves.

Dependencies:

Usage

To generate a document, a corresponding ttm file is required along with the idr file. After a successful build, you will find them in build/ttc/{ttc_version}. ttc_version depends on your environment.

To generate an HTML:

$ katla html path/to/src/Foo.idr path/to/ttm/Foo.ttm > Foo.html

To generate a TeX file and a PDF:

$ katla latex path/to/src/Foo.idr path/to/ttm/Foo.ttm > Foo.tex
$ pdflatex Foo.tex

Generated TeX files may have dependencies. Currently, they require the following packages:

  • inconsolata
  • fancyvrb
  • xcolor

You can investigate potential dependencies by searching the code:

$ grep usepackage src/Katla/LaTeX.idr

Active examples of using Katla can be found in the main repository of Idris2:
https://github.com/idris-lang/Idris2/blob/main/.github/scripts/katla.sh

Demo

See example tests.

PRs welcome!

Wishlist:

  • Error handling
  • Batch mode
  • Separate into a library + driver module (so we could write Idris programs that generate such sources)