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 {**Quarkdown is on GitHub!**} size:{large} variant:{smallcaps}
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)
.divide {x} by:{.pi}
.grid columns:{3} alignment:{right}
Hello, world!
Cannot call function divide(Number a, Number by) with arguments (x, 3.141592653589793):
Not a numeric value: x
Cannot call function grid(...) with arguments (3, right, Hello, world!):
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> Note: did you know Quarkdown is a flexible tool to generate modern documents?
> Tip: you might want to try it out. Feedback and suggestions are welcome!
> Warning: it's a young project and some things may change in the near future.
did you know Quarkdown is a flexible tool to generate modern documents?
you might want to try it out. Feedback and suggestions are welcome!
it’s a young project and some things may change in the near future.
> 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)
<!-- 2cm height, auto width -->
!(_x2cm)[Quarkdown](img/banner.png)
<!-- 2 inches width, 100px height -->
!(2in*100)[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`.
The following are equivalent:
- `rgb(255, 0, 255)`
- `hsl(300, 100, 50)`
- `hsv(300, 100, 100)`
The color magenta’s hexadecimal representation is #FF00FF
.
The following are equivalent:
rgb(255, 0, 255)
hsl(300, 100, 50)
hsv(300, 100, 100)
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!