Agda pdf files with color

I use lhs2TeX for my literate Agda files, and I would like them to be highlighted with syntax. I know that I can achieve some highlighting with %format instructions, but that's too much. I tried using lhs2Tex-hl as stated in http://foswiki.cs.uu.nl/foswiki/pub/FPOld/CourseLiterature/presentation.pdf , but to no avail.

If someone can help with getting PDF from Agda color, it will be appreciated!

Edit

Agda latex backing is excellent, but has some problems. The biggest problem is spec-environment. It says that the specification is undefined, so to make it a synonym for code you need to fix it: \newenvironment{spec}{\begin{code}}{\end{code}} , but instead it now causes problems with type checking and missing $ errors. Using sed to remove spec blocks results in missing $ errors; similar to \newenvironment{spec}{\verbatim}{\endverbatim} . A similar problem using |...| . Also, I honestly liked the %format from lhs2tex ...

+5
source share

Source: https://habr.com/ru/post/1241865/


All Articles