Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/liesnikov/literate-agda-markdown
a tiny pandoc filter to transform agda code blocks into literate agda code blocks
https://github.com/liesnikov/literate-agda-markdown
Last synced: about 1 month ago
JSON representation
a tiny pandoc filter to transform agda code blocks into literate agda code blocks
- Host: GitHub
- URL: https://github.com/liesnikov/literate-agda-markdown
- Owner: liesnikov
- License: bsd-3-clause
- Created: 2024-05-08T13:03:56.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-05-09T09:34:39.000Z (8 months ago)
- Last Synced: 2024-05-09T10:37:17.752Z (8 months ago)
- Language: Nix
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Literate Agda Markdown filter
A very simple [pandoc filter](https://pandoc.org/filters.html) to tranlate literate Agda markdown files to literate Agda TeX files.
This enables the pipeline: literate markdown -> literate tex -> pdf with highighting.
Which might be possible to do somehow with pure Agda but I couldn't find it immediately.## Syntax example
Everything but `agda` codeblocks is left as is.
```agda {.hide}
module README where
```gets translated to
```latex
\begin{code}[hide]
...
\end{code}
```which will be typechecked by agda, but not visible in the final pdf.
```agda
data Nat : Set where
zero : Nat
suc : Nat → Nat
```will be tranlated to
```latex
\begin{code}
...
\end{code}
```which will be visible.
## Usage example
1. `pandoc --from markdown --to latex -s input.lagda.md -o input.lagda.tex`
2. `agda --latex input.lagda.tex`
3. `pdflatex input.tex`## TODOs and notes
* `{.hide}` attributes break agda-mode and code blocks which aren't annotated get checked by agda too
* adding an lhs filter would be good too