Quarkdown is a Markdown parser and renderer that extends the capabilities of CommonMark and GFM with its own Quarkdown flavor.
The standout feature the flavor introduces is its support for functions, allowing users to access an extensive standard library, use conditional statements and loops, define new functions and variables - all within Markdown.
This out-of-the-box scripting support opens doors to complex and dynamic content that would be otherwise impossible to achieve with vanilla Markdown.
Markdown | LaTeX | Quarkdown | |
---|---|---|---|
Concise and readable | β | β | β |
Full document control | β | β | β |
Scripting | β | β | β |
LaTeX | Quarkdown |
---|---|
\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} |
# Section
## Subsection
1. **First** item
2. **Second** item
.center
This text is _centered_. |
HTML is currently the only supported rendering target. LaTeX rendering is a future goal.
The desired document type can be set by calling the .doctype
function within the Markdown source itself:
.doctype {slides}
.doctype {paged}
Note
Make sure to set the output directory in order to save the output to file.
This can be done by setting the command line argument --out <dir>
or -o <dir>
.
Iterative Fibonacci
.var {t1} {0}
.var {t2} {1}
.table
.foreach {0..8}
n:
| $ F_{.n} $ |
|:----------:|
| .t1 |
.var {tmp} {.sum {.t1} {.t2}}
.var {t1} {.t2}
.var {t2} {.tmp}
0 | 1 | 1 | 2 | 3 | 5 | 8 | 13 | 21 |
Recursive Fibonacci
The recursive approach is significantly slower than the iterative one.
.function {fib}
n:
.if { .islower {.n} than:{2} }
.n
.ifnot { .islower {.n} than:{2} }
.sum {
.fib { .subtract {.n} {1} }
} {
.fib { .subtract {.n} {2} }
}
.table
.foreach {0..8}
| $ F_{.1} $ |
|:----------:|
| .fib {.1} |
0 | 1 | 1 | 2 | 3 | 5 | 8 | 13 | 21 |
The project is under active development.
- Wiki, getting started guides and tutorials
- New themes
- Contribution guidelines
- Auto-generated stdlib documentation (Dokka custom plugin)
- External libraries support
- LaTeX rendering
- GUI editor / IDE plugin