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}
Metadata
Release files for pygments-rzk 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pygments_rzk-0.1.6.tar.gz | 9.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pygments_rzk-0.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.9 kB
Release files / pygments_rzk-0.1.6.tar.gz
| Download URL | pygments_rzk-0.1.6.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f4a0c4e4db782955149414d919060512728572c5888eea755c04c2289ee2600a
|
|
BLAKE2b-256 checksum How to use checksums |
41873003f8464dae748b64d05d61a34a1cf9834c6d43c4ec8f634decde51749d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / pygments_rzk-0.1.6-py3-none-any.whl
| Download URL | pygments_rzk-0.1.6-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f1252278b2e069d2c725487bf165d5560b1270a0c7521871d8774ba7a444b59a
|
|
BLAKE2b-256 checksum How to use checksums |
742fcd8c6e4dc02b7a6e8cb71101955c44a48ea58613dea3b519447daba69d15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|