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.
Ruby(ルビ)
Section titled “Ruby(ルビ)”私は{雪女|ゆき.おんな}を見た。{東京|とうきょう}は雨だった。私は雪女を見た。
東京は雨だった。
{base|reading} is group ruby; dots in the reading (ゆき.おんな) split it
per base character (mono ruby).
Tate-chu-yoko(縦中横)
Section titled “Tate-chu-yoko(縦中横)”第^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.
Boten(傍点)
Section titled “Boten(傍点)”彼は[[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(改行抑止)
Section titled “No-break(改行抑止)”[[no-break:東京都新宿区]]に住んでいます。東京都新宿区に住んでいます。
Explicit line break & blank paragraphs
Section titled “Explicit line break & blank paragraphs”春は曙。[[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(割注)
Section titled “Warichu(割注)”その日は大安[[warichu:六曜の一つで吉日とされる]]であった。その日は大安六曜の一つで吉日とされるであった。
Kerning(字間調整)
Section titled “Kerning(字間調整)”彼は[[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.
Page break(改ページ)
Section titled “Page break(改ページ)”第一章はここで終わる。
[[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
(改丁).
Inline nesting
Section titled “Inline nesting”[[em:{東京|とうきょう}]](boten wrapping ruby)[[no-break:第^12^話]](tate-chu-yoko inside a bracket macro)東京
第12話
Escapes
Section titled “Escapes”\{これはリテラルの中括弧\}、\^キャレット\^、\[角括弧\]。{これはリテラルの中括弧}、^キャレット^、[角括弧]。
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.