Markdown with superpowers
One source code, many use cases. Export your Quarkdown project as:
beautiful slides for your next presentation, just like this one.
powered by reveal.js
a distinguished book.
powered by paged.js
a plain document.
…in just one line, within your code.
.doctype {slides}
.doctype {paged}
.doctype {plain}
Quarkdown’s base features follow CommonMark and GitHub Flavored Markdown specifications,
so that you’ll feel at home typing code you’re comfortable typing.
### Diving into _Quarkdown_
Somebody once said:
> Write once, run **anywhere**.
Somebody once said:
Write once, run anywhere.
Go ahead to discover Quarkdown’s capabilities.
Call any function from the extensive standard library from your Markdown code.
.somefunction {argument1} {argument2}
Body argument
Or define your own:
.function {greet}
to from:
**Hello, .to** from .from!
.greet {world} from:{Giorgio}
.row alignment:{center} gap:{1cm}
!(150x150)[Quarkdown](img/icon.png)
.column cross:{start}
.text size:{large} variant:{smallcaps}
**Quarkdown is on GitHub!**
https://github.com/iamgio/quarkdown
.include {sources/other.qmd}
This content was included from another source.
Functions declared in included files are imported as well.
Use it to your advantage to make awesome libraries!
The constructor of the class `Point` is as follows:
.code {java}
.read {code/Point.java} lines:{5..8}
The constructor of the class Point
is as follows:
public Point(int x, int y) {
this.x = x;
this.y = y;
}
.csv {csv/people.csv}
Username | Favorite food | Favorite beverage |
---|---|---|
john | Chicken | Orange juice |
iamgio | Pasta | Iced tea |
daniel | Sushi | Beer |
.var {radius} {8}
If we try to calculate the **surface** of a circle of **radius .radius**,
we'll find out it's **.multiply {.pow {.radius} to:{2}} by:{.pi}**
If we try to calculate the surface of a circle of radius 8, we’ll find out it’s 201.06194
.row alignment:{spacearound}
.repeat {10}
n:
.if {.iseven {.n}}
**.n** is even
2 is even
4 is even
6 is even
8 is even
10 is even
.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}
__QD_INLINE_MATH__$F_{0}$__QD_INLINE_MATH__ | __QD_INLINE_MATH__$F_{1}$__QD_INLINE_MATH__ | __QD_INLINE_MATH__$F_{2}$__QD_INLINE_MATH__ | __QD_INLINE_MATH__$F_{3}$__QD_INLINE_MATH__ | __QD_INLINE_MATH__$F_{4}$__QD_INLINE_MATH__ | __QD_INLINE_MATH__$F_{5}$__QD_INLINE_MATH__ | __QD_INLINE_MATH__$F_{6}$__QD_INLINE_MATH__ | __QD_INLINE_MATH__$F_{7}$__QD_INLINE_MATH__ | __QD_INLINE_MATH__$F_{8}$__QD_INLINE_MATH__ |
---|---|---|---|---|---|---|---|---|
0 | 1 | 1 | 2 | 3 | 5 | 8 | 13 | 21 |
Metadata
.docname {Quarkdown demo}
.docauthor {iamgio}
.doctype {slides}
.doclang {english}
Layout and aesthetics
.theme {darko} layout:{minimal}
.pageformat {A4} orientation:{landscape}
.slides transition:{zoom} speed:{fast}
Fixed content on each page
.footer
.docauthor
**.docname**
[GitHub](https://github.com/iamgio/quarkdown)
.sum {3} {x}
.grid columns:{3} alignment:{right}
Hello, world!
Cannot call function sum(Number a, Number b) with arguments (3, x): expected type Number for parameter 'b', but DynamicValue found
Cannot call function grid(Int columns, optional MainAxisAlignment alignment, optional CrossAxisAlignment cross, optional Size gap, MarkdownContent body): No such element 'right' among values [start, center, end, spacebetween, spacearound, spaceevenly]
Not just functions.
The Quarkdown flavor introduces new features to the standard Markdown syntax.
Let $ F(u) $ be the ***Fourier Transform*** of the function $ f(x) $:
$ F(u) = \int^{+\infty}_{-\infty} f(x) e^{-i 2\pi x} dx $
Let __QD_INLINE_MATH__$F(u)$__QD_INLINE_MATH__ be the Fourier Transform of the function __QD_INLINE_MATH__$f(x)$__QD_INLINE_MATH__:
__QD_BLOCK_MATH__$F(u) = \int^{+\infty}_{-\infty} f(x) e^{-i 2\pi x} dx$__QD_BLOCK_MATH__powered by MathJax> To be, or not to be, that is the question.
> - William Shakespeare, Hamlet
To be, or not to be, that is the question.
William Shakespeare, Hamlet
<!-- 200px width, auto height -->
!(200x_)[Quarkdown](img/banner.png)
<!-- 80px height, auto width -->
!(_x80)[Quarkdown](img/banner.png)
<!-- 200px width, 100px height -->
!(200x100)[Quarkdown](img/banner.png)
!(150x_)[Quarkdown](https://iamgio.eu/quarkdown/img/icon-light.png "The Quarkdown icon")
The color magenta's hexadecimal representation is `#FF00FF`.
`rgb(255, 0, 255)` is also a valid one.
The color magenta’s hexadecimal representation is #FF00FF
.rgb(255, 0, 255)
is also a valid one.
You’ve seen the key features of Quarkdown — the door to making stunning documents is now open.
The project is open source, still in development and open to feedback and contributions!
The source code of this presentation is available here.
Future plans include tutorials, wikis and docs. But for now, happy coding!