https://github.com/rzk-lang/pygments-rzk
Pygments highlighter for Rzk language (proof assistant for synthetic ∞-categories).
https://github.com/rzk-lang/pygments-rzk
pygments pygments-lexer
Last synced: 3 months ago
JSON representation
Pygments highlighter for Rzk language (proof assistant for synthetic ∞-categories).
- Host: GitHub
- URL: https://github.com/rzk-lang/pygments-rzk
- Owner: rzk-lang
- License: bsd-3-clause
- Created: 2023-06-29T14:06:18.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-07T15:56:49.000Z (almost 2 years ago)
- Last Synced: 2025-03-05T01:36:54.686Z (4 months ago)
- Topics: pygments, pygments-lexer
- Language: Python
- Homepage: https://pypi.org/project/pygments-rzk/
- Size: 324 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pygments higlighter for Rzk
This is a simple [Pygments](https://pygments.org) higlighter for [Rzk](https://github.com/rzk-lang/rzk), which can be used with [`minted` package](https://www.ctan.org/pkg/minted) when writing rzk code in LaTeX or with [MkDocs](https://www.mkdocs.org) to highlight code in blocks when rendering literate Rzk Markdown files.
## How to use
### Install
Clone this repository, and install the highlighter using [`pip` installer](https://pip.pypa.io/en/stable/):
```sh
git clone https://github.com/rzk-lang/pygments-rzk.git
cd pygments-rzk # enter repository root
pip install . # install using pip
```### Use in MkDocs
To be done.
### Use in LaTeX (via `minted`)
In your LaTeX document:
1. Include `minted` package:
```tex
\package{minted}
```2. Use `minted` environment with `rzk` language, for example:
```tex
\begin{frame}[fragile]
\frametitle{\textsc{Rzk} highlighting in LaTeX with \texttt{minted}}A basic example:
\tiny
\begin{minted}[linenos,frame=leftline,mathescape]{rzk}
#lang rzk-1#section path-algebra
#variable A : U
#variables x y z : A-- path reversal
#define rev uses (A x y)
(p : x = y) -- A path from x to y in A.
: y = x -- The reversal will be defined by path induction on p.
:= idJ(A, x, \y' p' -> y' = x, refl, y, p)-- path composition by induction on the second path
#define concat
(p : x = y) -- A path from x to y in A.
(q : y = z) -- A path from y to z in A.
: (x = z)
:= idJ(A, y, \z' q' -> (x = z'), p, z, q)#end path-algebra
\end{minted}\end{frame}
```