Tip
The new quickstart guide for beginners is available! Check it out in the wiki: Quickstart
Main features and changes
This version brings enhancements in the area of element numbering.
Cross-references
It's now possible to reference sections, figures, tables, equations, code blocks and custom elements across the document.
The Quarkdown logo is shown in .ref {logo}.
 {#logo}

Code block numbering and captions
Code blocks can now be numbered and captioned.
.numbering
- code: 1.1
```python "Fibonacci function"
def fibonacci(n):
if n <= 1:
return n
return fibonacci(n - 1) + fibonacci(n - 2)
```

Numbered equations
Math blocks with a cross-reference ID are now numbered.
If you want to number an equation without referencing it, you can conventionally use _
as the ID.
.numbering
- equations: (1)
$ f(x) = x^3 $ {#cubic}
$$$ {#_}
f(x) = \begin{cases}
x^2, & \text{if } x \ge 0 \\
-x, & \text{if } x < 0
\end{cases}
$$$
.ref {cubic} is a cubic function.

Changed .numbering
default behavior [Breaking change]
The .numbering
function now merges the new configuration by default.
Consider the following:
.doctype {paged}
.numbering
- figures: a
# Title

The paged
document type comes with its own default numbering for most element types.
Prior to this update, setting a new numbering format (e.g. figures: a
) would completely reset the current numbering,
leaving headings, tables and other elements unnumbered.
Starting with this update, the current and new configurations are merged, resulting in a
for figures, and the original defaults for the rest.
To stick with the original behavior, set merge:{no}
.
Tables are now always numbered [Breaking change]
In earlier versions, a table is numbered only if it contains a caption, even if empty, as long as an active table numbering format is applied.
From now on, a caption is no longer required: having a table numbering format will be enough to number all tables in the document.
Fixed missing trailing symbols in numbering formats
Fixed an issue in .numbering
formats that would cause trailing non-counting symbols to be cut off.
For instance, the format (1.1)
would wrongly output (1.1
.
Fixed wrong inline math tokenization
Fixed an issue that would cause multiple inline math expressions on the same line to be wrongly tokenized as a single math block,
if the line started with an inline math expression and ended with another one.
Added French localization
French is now supported. Thanks @Pallandos!
Changelog
- feat!: let
.numbering
merge by default. addmerge
parameter by @iamgio in #202 - feat: add french translations by @Pallandos in #204
- [dev] refactor: make
DocumentInfo
and sub-properties immutable by @iamgio in #205 - feat: add cross-reference by @iamgio in #208
- feat!: number all tables, no longer require caption by @iamgio in #209
- feat: add captions to code blocks by @iamgio in #210
- feat: add numbering and cross-reference to math blocks by @iamgio in #212
- fix(lexer): fix multiple inline math that could be tokenized as a single block by @iamgio in #213
New Contributors
- @Pallandos made their first contribution in #204
Full Changelog: v1.9.2...v1.10.0
Sponsors
Shout out to our new sponsor: @RayOffiah 🎉