iamgio

Quarkdown demo

GitHub

Quarkdown logo

Markdown with superpowers

Versatile

One source code, many use cases. Export your Quarkdown project as:

…in just one line, within your code.

.doctype {slides}
.doctype {paged}
.doctype {plain}

Same foundations…

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**.

Diving into Quarkdown

Somebody once said:

Write once, run anywhere.

…brand-new everything

Go ahead to discover Quarkdown’s capabilities.

Functions

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}
Hello, world from Giorgio!

Full layout control


.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

Multi-file project


.include {sources/other.qmd}

Hello there!

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!

File data: code


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;
    }

File data: CSV


.csv {csv/people.csv}

UsernameFavorite foodFavorite beverage
johnChickenOrange juice
iamgioPastaIced tea
danielSushiBeer

Math


.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

Scripting

Basic algorithm
.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

Scripting

Fibonacci sequence
.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__
01123581321

Document customization


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)

Intuitive error handling


.divide {x} by:{.pi}

.grid columns:{3} alignment:{right}
    Hello, world!

Error: divide

Cannot call function divide(Number a, Number by) with arguments (x, 3.141592653589793):
Not a numeric value: x

Error: grid

Cannot call function grid(...) with arguments (3, right, Hello, world!):
No such element 'right' among values [start, center, end, spacebetween, spacearound, spaceevenly]

Enhanced base Markdown

Not just functions.
The Quarkdown flavor introduces new features to the standard Markdown syntax.

TeX formulas


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

Quotation source


> 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

Image size


<!-- 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)

Quarkdown

Quarkdown

Quarkdown

Labeled figure


!(150x_)[Quarkdown](https://iamgio.eu/quarkdown/img/icon-light.png "The Quarkdown icon")

Quarkdown
The Quarkdown icon

Color preview


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.

It’s a wrap

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!

Table of Contents