quarkdown README

The project's README from github.com/iamgio/quarkdown. As one markdown file: README.md.

Quarkdown banner
Wiki Docs Release Visual Studio Code Extension Version FMT: Ktlint CodeFactor

iamgio%2Fquarkdown | Trendshift iamgio%2Fquarkdown | Trendshift
Quarkdown - Markdown with superpowers: from ideas to stunning documents. | Product Hunt

Releases
Latest   |   Stable 


Table of contents

  1. About
  2. Demo
  3. Editor extensions
  4. Targets
  5. Comparison
  6. Getting started
    1. Installation
    2. Quickstart
    3. Creating a project
    4. Compiling
  7. Mock document
  8. Contributing
  9. Sponsors
  10. Concept
  11. License

 

About

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.

 

Paper demo

Original credits: Attention Is All You Need


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 great editor support, Quarkdown simply gets the work done, whether it's an academic paper, book, knowledge base or interactive presentation.

 

Live preview

 

In a nutshell, Quarkdown is...

 


Looking for something?

Check out the wiki to get started and learn more about the language and its features!


 

As simple as you expect...

Paper code demo

Inspired by: X-ray flashes from a nearby supermassive black hole accelerate mysteriously

 

...as complex as you need.

Chart code demo

Editor extensions

 

Targets

The desired document type can be set by calling the .doctype function within the source itself:

 

Comparison

Quarkdown LaTeX Typst AsciiDoc MDX
Concise and readable :white_check_mark: :x: :white_check_mark: :white_check_mark: :white_check_mark:
Full document control[^control] :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, MD, TXT PDF, PostScript HTML, PDF HTML, PDF, ePub HTML

[^control]: The ability to customize the properties of the document and of its output artifact through the language itself.

LaTeX Quarkdown
\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}
    ![Image 1](img1.png)

    ![Image 2](img2.png)
    
    ![Image 3](img3.png)

 

Getting started

Installation

Install script (Linux/macOS)

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.
The browser required for PDF export is installed automatically.

For more installation options, check out get-quarkdown.

Homebrew (Linux/macOS)

brew install quarkdown-labs/quarkdown/quarkdown

Install script (Windows)

irm https://raw.githubusercontent.com/quarkdown-labs/get-quarkdown/refs/heads/main/install.ps1 | iex

Scoop (Windows)

scoop bucket add quarkdown https://github.com/quarkdown-labs/scoop-quarkdown; scoop install quarkdown

GitHub Actions

See setup-quarkdown to easily integrate Quarkdown into your GitHub Actions workflows.

Manual installation

Instructions for manual installation

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:

  • (Only for PDF export) A Chromium-family browser, such as chrome-headless-shell. See PDF export for details.

 

Quickstart

New user? You'll find everything you need in the Quickstart guide to bring your first document to life!

 

Creating a project

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.

 

Compiling

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.

Options

The most commonly used options are:

[!TIP] Combine -p -w to achieve live preview!

For the full list of options, check out the CLI options wiki page.

 


 

Mock document

 

Mock document demo

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.

Contributing

Contributions are welcome! Please check CONTRIBUTING.md to know how contribute via issues or pull requests.

Sponsors

A special thanks to all the sponsors who supported this project!

Falconer

RayOffiah

vitto4 aaditkamat

LunaBluee  dcopia Pallandos imogenxingren serkonda7

Concept

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.

Quarkdown icon

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.

License

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.

Footnotes

quarkdown (iamgio/quarkdown)

Searching Database…

16.3K ·GitHub
这是什么?Quarkdown 是一个基于 Markdown 的排版系统:你只需写一份 Markdown 源文件,它就能编译成适合印刷的书、学术论文、知识库、网站或交互式演示文稿。
那它就是纯 Markdown 吗,还是我得学一套新语法?它就是 Markdown:Quarkdown Flavor 从 CommonMark 和 GFM 出发,扩展了函数调用、变量、条件判断和循环,把 Markdown 变成了一种图灵完备的语言。
我怎么安装它并编译第一个文档?在 Linux/macOS 上通过脚本或 Homebrew 安装,Windows 上用脚本或 Scoop,也可以用 setup-quarkdown GitHub Action。然后 'quarkdown create' 会通过向导帮你创建项目,'quarkdown c file.qd' 负责编译。
导出 PDF 的话,我电脑上还需要装别的东西吗?只需要一个 Chromium 内核的浏览器,比如 chrome-headless-shell。Linux/macOS 的安装脚本会自动帮你装好浏览器;手动安装的话就得自己准备。
它在 Windows 上也能用吗,和 Mac、Linux 一样?可以——这是一个跨平台的命令行工具,为 Linux 和 macOS 提供了专门的安装方式(脚本、Homebrew),Windows 也有(脚本、Scoop),另外还有 GitHub Actions 集成可用于 CI 构建。
Quarkdown 文档里可以放代码——那我下载的 .qd 文件会不会乱动我的系统?不能随便动:有一套权限系统限制文档对系统资源的操作,而且默认就是开启的。
它真的可以免费使用吗,还是在许可协议上有什么坑?默认采用 GPLv3,完全免费开源;CLI 和 Language Server 模块及其二进制文件则是 AGPLv3。没有任何付费版本。
一份文档到底能编译成哪些东西?四种模式的 HTML——类似 Notion/Obsidian 的普通连续页面流、通过 paged.js 实现的分页排版(适合论文、文章和书)、通过 reveal.js 做的幻灯片,以及适合 wiki 的 docs 模式——用 .doctype {plain|paged|slides|docs} 选择。所有 HTML 输出还都能导出为 PDF,另外也支持导出 GFM Markdown 或纯文本。
我写的时候有实时预览吗?有:把 -p(自动刷新)和 -w(文件变动时重新编译)一起用,就能实时预览,而且速度很快——官方那 100 多个子文档组成的 wiki 大约 2 秒就能编译完。还有交互式 REPL,用 'quarkdown repl' 启动。
它和 LaTeX、Typst 比怎么样?按 README 里的对比表,Quarkdown 是这一组工具中唯一同时做到这些的:语法是简洁的 Markdown 风格,支持完整的脚本功能,并且能导出 HTML、PDF、Markdown 和纯文本全部格式——还包括 LaTeX 做不了的演示文稿和 docs/wiki 输出。它的学习曲线介于 AsciiDoc 和 Typst 之间。
它对编辑器和 AI 编程工具有配套支持吗?有——有一个 VS Code 扩展、一个非官方的 IntelliJ IDEA 插件,还有一个内置的 skill,能让 AI 编程助手写出地道的 Quarkdown,README 里甚至链接了相关的评测。
Creator
iamgio
Size
35.2 MB
Stars
16.3K
Age
2y
Commits · 90 Days