Zulip Chat Archive

Stream: general

Topic: Getting Lean highlighting and proof state for a blog


l1mey (Dec 21 2025 at 10:02):

I have an existing blog implemented using pandoc, with a lot of functionality implemented using Lua. Pandoc doesn't currently support Lean highlighting, but I'm looking to find a way to get syntax highlighting, types, and (possibly) proof state as per verso.

Is there a low level library I can use to feed it Lean code and have it return to me the HTML code? This can be easily automated and put as a Lua script in Pandoc.

l1mey (Dec 21 2025 at 10:05):

What I am seeing right now is the subverso library and subverso-extract-mod, but to get HTML it seems I'll need to hook into the verso library.

Henrik Böving (Dec 21 2025 at 10:11):

Why would you not just use verso directly?

l1mey (Dec 21 2025 at 10:13):

It doesn't seem there is a nice way to use it without basing my entire website around verso, I just want to use it for short code snippets that I can get HTML to inject into my website using some Lua scripts in pandoc.

l1mey (Dec 21 2025 at 10:13):

I don't want to pull in the entirety of verso, just enough to get some HTML out.

Hagb (Junyu Guo) (Jan 11 2026 at 12:13):

l1mey said:

I have an existing blog implemented using pandoc, with a lot of functionality implemented using Lua. Pandoc doesn't currently support Lean highlighting, but I'm looking to find a way to get syntax highlighting, types, and (possibly) proof state as per verso.

Is there a low level library I can use to feed it Lean code and have it return to me the HTML code? This can be easily automated and put as a Lua script in Pandoc.

There's a KDE syntax definition for Lean, which can be used by pandoc to support highlighting Lean: #general > KDE syntax highlighting definition for Lean? @ 💬


Last updated: Feb 28 2026 at 14:05 UTC