Pygments lexer for Rzk language (of proof assistant for synthetic ∞-categories).
Project description
Pygments higlighter for Rzk
This is a simple Pygments higlighter for Rzk, which can be used with minted
package when writing rzk code in LaTeX or with MkDocs 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:
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:
- Include
minted
package:
\package{minted}
- Use
minted
environment withrzk
language, for example:
\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}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pygments-rzk-0.1.4.tar.gz
(322.6 kB
view details)
Built Distribution
File details
Details for the file pygments-rzk-0.1.4.tar.gz
.
File metadata
- Download URL: pygments-rzk-0.1.4.tar.gz
- Upload date:
- Size: 322.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef10b6db2241ca4de55d38e770aa963c0539e93cc775230cd38abf1774ae73a5 |
|
MD5 | b00e4143ec8b24b19a20e370db5a8055 |
|
BLAKE2b-256 | e6a836e7256cdbf6cd213cd4cfea89373aac81c3f1b838f67f9d8f0921466381 |
File details
Details for the file pygments_rzk-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: pygments_rzk-0.1.4-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a9bb216ada0f68b976552bfa4f84e3dd36a9985bbbd224562de5ae602f4183e |
|
MD5 | 97ddecbc66b656d4e14158c52d74aeda |
|
BLAKE2b-256 | 3fb59f627622224be6cc772dac1fdd0b765df4a94e51a2a62089c0c2ede6fdcc |