Skip to main content

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:

  1. Include minted package:
\package{minted}
  1. Use minted environment with rzk 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}

Rendering rzk code in LaTeX (demo).

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.5.tar.gz (322.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pygments_rzk-0.1.5-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file pygments_rzk-0.1.5.tar.gz.

File metadata

  • Download URL: pygments_rzk-0.1.5.tar.gz
  • Upload date:
  • Size: 322.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for pygments_rzk-0.1.5.tar.gz
Algorithm Hash digest
SHA256 618a931356437ddf5959259b4e1c1c3eb76ad89e62041b45c31c04f0eca4e807
MD5 692fcab775feb99ce5588be90a0cd322
BLAKE2b-256 7214f81f3712c11f5598ed3e22f3413b5d72337128156dcd6391ea5d275dec16

See more details on using hashes here.

File details

Details for the file pygments_rzk-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: pygments_rzk-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for pygments_rzk-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 1eb855d14c8fce846a2ba6f97fdf19469be8af58af91da7a03ff7596a273a19c
MD5 ebfc902ee7e5d402689e4332ee847cf2
BLAKE2b-256 8c48366365b165f41c63f080f0432e622e1f35bf9ba81655674c65093da789d8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page