Markdown

This document describes the Markdown variant that KF implements. The base is CommonMark, with a few differences and additions.

Headers

Headers start with one or more # characters (up to level 6), followed by a space and the heading text.

# Chapter one

## Section

### Subsection

An optional anchor {#id} can be placed at the end of the heading line. It becomes the element's HTML id attribute and can be used as a link target within the document.

## Risk assessment {#risk}

Lists

Unordered list — lines starting with -:

- item one
- item two
  - nested item

Ordered (numbered) list — lines starting with +:

+ step one
+ step two

Task lists — add a state marker after the bullet:

- [x] completed
- [ ] open
- [/] in progress

The same markers work with + for a numbered task list.

Definition lists

A line starting with : is rendered as a definition paragraph (indented, in a distinct style).

: This is a definition or note paragraph.

Paragraphs

A paragraph is a sequence of text lines not recognised as any other construct. It ends at an empty line or at the start of a block element.

Blockquotes

A line starting with > is rendered as a highlighted quote paragraph (left-border accent).

> This is a quoted or highlighted passage.
[link text](url)
[](url)

The second form uses the URL itself as the visible text.

Images

![alt text](url)
![alt text](url width:60%)

An optional CSS string can follow the URL to control size and alignment.

Tables

A plain table — cells separated by |:

| Column A | Column B |
| a1       | b1       |
| a2       | b2       |

Add a separator row (---) to make the first row a column header:

| Column A | Column B |
| -------- | -------- |
| a1       | b1       |
| a2       | b2       |

Double the leading | (||) to make the first column a row header:

|| Column A | Column B |
| -------- | -------- |
| a1        | b1       |
| a2        | b2       |

Both can be combined for a table with both a header row and a header column.

A plain table with no separator has no header styling:

| a | d |
| b | e |
| c | f |

Code blocks

Fenced with triple backticks, with an optional language hint:

  ```go
  func main() {}
  ```

Horizontal rule

---

Text formatting

Inline formatting supported directly in Markdown:

SyntaxResult
textbold
textitalic
textunderline
textsubscript
textsuperscript
texthighlight
text
centred block

For anything else — colour, font size, custom spacing — use HTML inline.

Math

MathJax is integrated. Inline equations use \(...\) and display (centred) equations use \[...\]:

The formula \(E = mc^2\) is well known.

\[ \int_0^\infty e^{-x^2} dx = \frac{\sqrt{\pi}}{2} \]

Commands

Lines starting with . are commands processed server-side:

CommandEffect
.bpInsert a page break (for print/PDF)

Not supported

  • Automatic URL linking (write full url links explicitly)
  • HTML comments are passed through as-is; use for comments in source