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
Once pygments-rzk is installed in the same Python environment as MkDocs,
Pygments will recognise rzk fenced code blocks automatically. The only thing
your MkDocs project needs is a Markdown extension that routes code blocks
through Pygments — the built-in codehilite extension is enough:
# mkdocs.yml
site_name: My Rzk docs
markdown_extensions:
- codehilite
Then write Rzk in fenced blocks tagged rzk (see
demo/mkdocs/docs/index.md for a full example):
```rzk
#lang rzk-1
...
```
A runnable demo lives in demo/mkdocs/ — cd demo/mkdocs && mkdocs serve.
Use in Command Line (Terminal)
You can simply pass text to pygmentize -l rzk, e.g.:
cat demo/demo.rzk | pygmentize -l rzk
Use in LaTeX (via minted)
In your LaTeX document:
- Include
mintedpackage:
\package{minted}
- Use
mintedenvironment withrzklanguage, for example (see demo/demo.tex for full example):
\begin{minted}[linenos,frame=leftline,mathescape]{rzk}
...
\end{minted}
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pygments_rzk-0.1.6.tar.gz.
File metadata
- Download URL: pygments_rzk-0.1.6.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4a0c4e4db782955149414d919060512728572c5888eea755c04c2289ee2600a
|
|
| MD5 |
e642ed845500ea5853e0e9d8fc8ead58
|
|
| BLAKE2b-256 |
41873003f8464dae748b64d05d61a34a1cf9834c6d43c4ec8f634decde51749d
|
File details
Details for the file pygments_rzk-0.1.6-py3-none-any.whl.
File metadata
- Download URL: pygments_rzk-0.1.6-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1252278b2e069d2c725487bf165d5560b1270a0c7521871d8774ba7a444b59a
|
|
| MD5 |
064ea14dfe2dacb61d5f8ea1ffc6b4f1
|
|
| BLAKE2b-256 |
742fcd8c6e4dc02b7a6e8cb71101955c44a48ea58613dea3b519447daba69d15
|