README.md
<a href="https://quarkdown.com/wiki"></a> <a href="https://quarkdown.com/docs"></a> <a href="https://github.com/iamgio/quarkdown/releases/latest"></a> <a href="https://marketplace.visualstudio.com/items?itemName=quarkdown.quarkdown-vscode"></a> <a href="https://pinterest.github.io/ktlint"></a> <a href="https://www.codefactor.io/repository/github/iamgio/quarkdown"></a>
<a href="https://trendshift.io/repositories/13945" target="_blank"></a>
<a href="https://www.producthunt.com/products/quarkdown?embed=true&utm_source=badge-featured&utm_medium=badge&utm_campaign=badge-quarkdown" target="_blank" rel="noopener noreferrer"></a>
</p> <p align="center"> <strong>Releases</strong><a href="https://github.com/iamgio/quarkdown/releases/tag/latest">Latest</a> | <strong><a href="https://github.com/iamgio/quarkdown/releases/latest">Stable</a></strong>
<hr> </p>
Quarkdown is a modern Markdown-based typesetting system designed for versatility. It allows a single project to compile seamlessly into a print-ready book, academic paper, knowledge base, or interactive presentation. All through an incredibly powerful Turing-complete extension of Markdown, ensuring your ideas flow automatically into paper.
<p align="center"> <p align="center"><em>Original credits: <a href="https://arxiv.org/abs/1706.03762v7">Attention Is All You Need</a></em></p> </p>
Born as an extension of CommonMark and GFM, the Quarkdown Flavor brings functions to Markdown, along with many other syntax extensions.
This is a function call:
.somefunction {arg1} {arg2} Body argument
Possibilities are unlimited thanks to an ever-expanding standard library, which offers layout builders, I/O, math, conditional statements and loops.
Not enough? You can still define your own functions and variables, all within Markdown. You can even create awesome libraries for everyone to use.
.function {greet} to from: **Hello, .to** from .from! .greet {world} from:{iamgio}Result: Hello, world from iamgio!
This out-of-the-box scripting support opens doors to complex and dynamic content that would be otherwise impossible to achieve with vanilla Markdown.
Combined with live preview, :zap: fast compilation speed and a powerful VS Code extension, Quarkdown simply gets the work done, whether it's an academic paper, book, knowledge base or interactive presentation.
<p align="center"> </p>
<h2 align="right">...as complex as you need.</h2> <p align="center"> </p>
HTML
Plain
Continuous flow like Notion/Obsidian, perfect for static websites and knowledge management - check out the author's personal website.
Paged <sup>via paged.js</sup>
Perfect for papers, articles and books - check out the demo document.
Slides <sup>via reveal.js</sup>
Perfect for interactive presentations.
Docs
Perfect for wikis, technical documentation and large knowledge bases - check out Quarkdown's wiki.
Plain text
The desired document type can be set by calling the .doctype function within the source itself:
.doctype {plain} (default).doctype {paged}.doctype {slides}.doctype {docs}| Quarkdown | LaTeX | Typst | AsciiDoc | MDX | |
|---|---|---|---|---|---|
| Concise and readable | :white_check_mark: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Full document control1 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: |
| Scripting | :white_check_mark: | Partial | :white_check_mark: | :x: | :white_check_mark: |
| Book/article export | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | Third-party |
| Presentation export | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | Third-party |
| Static site export | :white_check_mark: | :x: | Experimental | :white_check_mark: | :white_check_mark: |
| Docs/wiki export | :white_check_mark: | :x: | :x: | :white_check_mark: | :white_check_mark: |
| Learning curve | :green_circle: | :red_circle: | :orange_circle: | :green_circle: | :green_circle: |
| Targets | HTML, PDF, TXT | PDF, PostScript | HTML, PDF | HTML, PDF, ePub | HTML |
\tableofcontents
\section{Section}
\subsection{Subsection}
\begin{enumerate}
\item \textbf{First} item
\item \textbf{Second} item
\end{itemize}
\begin{center}
This text is \textit{centered}.
\end{center}
\begin{figure}[!h]
\centering
\begin{subfigure}[b]
\includegraphics[width=0.3\linewidth]{img1.png}
\end{subfigure}
\begin{subfigure}[b]
\includegraphics[width=0.3\linewidth]{img2.png}
\end{subfigure}
\begin{subfigure}[b]
\includegraphics[width=0.3\linewidth]{img3.png}
\end{subfigure}
\end{figure}
.tableofcontents
# Section
## Subsection
1. **First** item
2. **Second** item
.center
This text is _centered_.
.row alignment:{spacebetween}



curl -fsSL https://raw.githubusercontent.com/quarkdown-labs/get-quarkdown/refs/heads/main/install.sh | sudo env "PATH=$PATH" bash
Root privileges let the script install Quarkdown into /opt/quarkdown and its wrapper script into /usr/local/bin/quarkdown.
If missing, Java 17, Node.js and npm will be installed automatically using the system's package manager.
For more installation options, check out get-quarkdown.
brew install quarkdown-labs/quarkdown/quarkdown
irm https://raw.githubusercontent.com/quarkdown-labs/get-quarkdown/refs/heads/main/install.ps1 | iex
scoop bucket add java
scoop bucket add quarkdown https://github.com/quarkdown-labs/scoop-quarkdown
scoop install quarkdown
See setup-quarkdown to easily integrate Quarkdown into your GitHub Actions workflows.
Download quarkdown.zip from the latest stable release and unzip it,
or build it with gradlew installDist.
Optionally, adding <install_dir>/bin to your PATH allows you easier access Quarkdown.
Requirements:
New user? You'll find everything you need in the Quickstart guide to bring life to your first document!
quarkdown create [directory] will launch the prompt-based project wizard, making it quicker than ever
to set up a new Quarkdown project, with all metadata and initial content already present.
For more information about the project creator, check out its wiki page.
Alternatively, you may manually create a .qd source file and start from there.
Running quarkdown c file.qd will compile the given file and save the output to file.
If the project is composed by multiple source files, the target file must be the root one, i.e. the one that includes the other files.
If you would like to familiarize yourself with Quarkdown instead, quarkdown repl lets you play with an interactive REPL mode.
The most commonly used options are:
-p or --preview: enables automatic content reloading after compiling.
-w or --watch: recompiles the source every time a file from the source directory is changed.
[!TIP] Combine
-p -wto achieve live preview!
--pdf: produces a PDF file. Learn more in the wiki's PDF export page.For the full list of options, check out the CLI options wiki page.
<p align="center"> </p>
Mock, written in Quarkdown, is a comprehensive collection of visual elements offered by the language, making it ideal for exploring and understanding its key features — all while playing and experimenting hands-on with a concrete outcome in the form of pages or slides.
mock directory, and can be compiled via quarkdown c mock/main.qd -p.generated repo.Contributions are welcome! Please check CONTRIBUTING.md to know how contribute via issues or pull requests.
A special thanks to all the sponsors who supported this project!
<p align="center"> <a href="https://falconer.com"></a> </p> <p align="center"> <a href="https://github.com/RayOffiah"></a> </p> <p align="center"> <a href="https://github.com/vitto4"></a> </p> <p align="center"> <a href="https://github.com/LunaBluee"></a> <a href="https://github.com/dcopia"></a> <a href="https://github.com/Pallandos"></a> <a href="https://github.com/imogenxingren"></a> <a href="https://github.com/serkonda7"></a> </p>The logo resembles the original Markdown icon, with focus on Quarkdown's completeness, richness of features and customization options, emphasized by the revolving arrow all around the sphere.
<p align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/iamgio/quarkdown/project-files/images/ticon-light.svg"> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/iamgio/quarkdown/project-files/images/ticon-dark.svg"> </picture> </p>What could be mistaken for a planet is actually a quark or, more specifically, a down quark, an elementary particle that is a major constituent of matter: they give life to every complex structure we know of, while also being one of the lightest objects in existence.
This is, indeed, the concept Quarkdown is built upon.
By default, Quarkdown and its modules are licensed under GNU GPLv3, except for modules that include their own LICENSE file:
the CLI (quarkdown-cli) and Language Server (quarkdown-lsp) modules and binaries are licensed under GNU AGPLv3.
The ability to customize the properties of the document and of its output artifact through the language itself. ↩