Skip to content

Live Showcase

Every example below is rendered by this documentation site itself. The complete page source is parsed by Rust through @illusions-lab/mdi, and the resulting document IR is rendered with the same HTML semantics exposed to applications. What you see is what the MDI renderer produces.

The full syntax definition lives in the MDI 2.0 specification; this page is a demonstration, not the normative reference.

私は{雪女|ゆき.おんな}を見た。
{東京|とうきょう}は雨だった。

私はゆきおんなを見た。
東京とうきょうは雨だった。

{base|reading} is group ruby; dots in the reading (ゆき.おんな) split it per base character (mono ruby).

第^12^話。令和^7^年。^OK^。

12話。令和7年。OK

^text^ composes 1–6 alphanumeric characters upright within vertical text — which is why this demo box is vertical. In horizontal writing it renders as plain text.

彼は[[em:それ]]を見た。
[[em:●:決して]]忘れない。
彼は《《それ》》を見た。(compatibility alias)

彼はそれを見た。
決して忘れない。
彼はそれを見た。

The default mark is ﹅; `:textsets any single character as the mark.is a compatibility spelling that normalizes to` on save.

[[no-break:東京都新宿区]]に住んでいます。

東京都新宿区に住んでいます。

春は曙。[[br]]
やうやう白くなりゆく山ぎは。
夏は夜。
\
\
秋は夕暮れ。

春は曙。
やうやう白くなりゆく山ぎは。

夏は夜。

秋は夕暮れ。

[[br]] is an explicit in-paragraph line break; a line containing only \ is one blank paragraph (N lines → N blank paragraphs). [[blank]] and <br> are compatibility spellings of the same construct.

その日は大安[[warichu:六曜の一つで吉日とされる]]であった。

その日は大安六曜の一つで吉日とされるであった。

彼は[[kern:-0.1em:確実]]にそう言った。
[[kern:+0.3em:沈黙]]が落ちた。

彼は確実にそう言った。
沈黙が落ちた。

Block alignment(字下げ・地付き)

Section titled “Block alignment(字下げ・地付き)”
[[indent:2]]
我輩は猫である。名前はまだ無い。
[[bottom]]
著者識
[[bottom:2]]
令和七年七月

我輩は猫である。名前はまだ無い。

著者識

令和七年七月

[[indent:N]] indents the following block by N em; [[bottom]] aligns it to the line end (地付き), [[bottom:N]] with an N-em shift.

第一章はここで終わる。
[[pagebreak]]
第二章が始まる。

Page breaks render as invisible break-after: page markers on screen — they take effect in paged output (PDF) and split the spine in EPUB. [[pagebreak:right]] / [[pagebreak:left]] request recto/verso openings (改丁).

[[em:{東京|とうきょう}]](boten wrapping ruby)
[[no-break:第^12^話]](tate-chu-yoko inside a bracket macro)

東京とうきょう
12

\{これはリテラルの中括弧\}、\^キャレット\^、\[角括弧\]。

{これはリテラルの中括弧}、^キャレット^、[角括弧]。

Vertical writing, all together(縦書き総合)

Section titled “Vertical writing, all together(縦書き総合)”

私はゆきおんなを見た。第12話、令和7年のことである。彼はそれ決して忘れない。その日は大安六曜の一つで吉日とされるであった。

In real output, vertical writing is driven by the front matter (writing-mode: vertical), which the converters apply document-wide — HTML gets writing-mode: vertical-rl on the root element, DOCX a vertical section.