Quarkdown: Markdown grown into a Turing-complete typesetting language

Translated by a model; the original is in Russian.

· Linux and open source
Italian developer iamgio has unveiled Quarkdown — a Markdown extension with functions, loops and variables, from which one and the same source compiles into a book, a scientific paper, a presentation or a knowledge-base site.

cover.svg

The Markdown everyone knows is great for notes, but it stumbles when serious layout is called for. The Quarkdown project sets out to close that gap, turning the markup into a full-fledged, Turing-complete typography language. The idea is at once simple and ambitious: write just as easily as in ordinary Markdown, yet get a printed book, an academic paper, an interactive presentation or a complete knowledge base as output — all from the very same source.

Markdown with functions

Quarkdown grew out of CommonMark and GFM, but added to them what the markup always lacked — function calls. A construct like .somefunction {arg1} {arg2} pulls in elements from an extensible standard library: page layout, input/output, math, conditionals and loops. If they wish, users can describe their own functions and variables right inside the document, and even assemble them into libraries for others to use. That is how real scripting appears inside Markdown, making it possible to build dynamic content unattainable in "vanilla" markup.

One source — four targets

The desired document type is set right in the text via .doctype. Four modes are supported: a continuous flow in the spirit of Notion or Obsidian (plain), paginated layout for articles and books on the paged.js engine (paged), slides on reveal.js (slides), and a documentation mode for wikis and large knowledge bases (docs). All of this exports to HTML, as well as to PDF, Markdown and plain text.

In the README the authors are not shy about comparing themselves with LaTeX, Typst, AsciiDoc and MDX, and they give a vivid example: a cumbersome LaTeX construct with figure and subfigure environments for three pictures in a row collapses in Quarkdown into a few lines of .row with ordinary image references. The learning curve, meanwhile, is promised to be gentle — the syntax stays recognizably Markdown-like.

Aiming at tools and agents

The project also bets on a comfortable workflow: a low-latency live preview, fast compilation (the official wiki of more than a hundred documents, according to the authors, builds in about two seconds), and extensions for VS Code and IntelliJ IDEA. "Agent-friendliness" is singled out separately — a built-in skill for coding assistants ships with it. Security by default is claimed too: a restrictive permission system curbs access to system resources.

Quarkdown is distributed under GPLv3 (the CLI and language server under AGPLv3), and is installed via a script or through Homebrew, Scoop and GitHub Actions; the browser for PDF export is pulled in automatically. Even the name is in keeping with the style: the logo depicts not a planet but a down quark — one of the lightest elementary particles from which all complex matter is assembled. It is precisely this image, in the authors' conception, that captures the philosophy of the project.


Source: Lobsters

Comments

Sign in, to comment.

  • No comments yet.