Forum News

Markdown support

mikeday
The Prince pre-release builds now support Markdown documents!
prince mydoc.md -o output.pdf

Markdown supports embedded HTML snippets and also math notation in $inline$ or $$block$$ syntax (rendered using KaTeX). There are several new options:
--markdown-superscript      Enable superscript syntax in Markdown (^text^).
--markdown-subscript        Enable subscript syntax in Markdown (~text~).
--no-markdown-smart-typography Disable smart quotes, dashes, and ellipses.
--no-markdown-math          Disable automatic math rendering in Markdown.

Markdown documents can begin with metadata sections in YAML or TOML format:
---
title: Test Document
author: Jane Smith
lang: en
subject: Testing YAML front matter metadata
keywords: markdown, front matter, metadata, prince
date: 2026-01-15
---

+++
title = "TOML Front Matter Test"
date = 2026-01-26T11:36:15+10:00
+++

Markdown is converted to HTML so you can style it with CSS and even process it with JavaScript before typesetting. Please let us know if you have any comments or feedback on this exciting new feature! :D
howcome
It works wonderfully!

Here is a quick guide:

https://css4.pub/2026/markdown/

I suggest having superscript/subscript on by default, and renaming the corresponding command-line switches to negatives: --no-markdown-superscript, --markdown-subscript

Edited by howcome

Johann
We have experimented with the new Markdown feature and find it very useful.

Could you please add an option that exports the intermediate HTML to a file? This would be helpful for the following reasons:
  • Document Comparison: We can compare HTML documents with a difference tool to generate a separate difference document.
  • Code Block Inspection: It reveals how class attributes are added to code blocks, which is necessary for later conversion to highlighted code or PlantUML diagrams via JavaScript.
  • CSS Development: It helps when adding and debugging CSS styles for the document.

- - -
Johann