zhuyin-ruby-markuplisted
Install: claude install-skill hanzipro/ruby-markups
# Zhuyin Ruby Markup Rules
These rules describe how to author **Zhuyin (注音 / MPS)** ruby markup so that the browser's **native** `<ruby>` engine — together with a Zhuyin OpenType web font that GPOS-positions tone marks — renders correct line-breaking, kinsoku (標點避頭尾), and inter-character字旁直書 layout.
The rules apply to **all** hand-authored or AI-generated source: prose, demos, test fixtures, JSDoc snippets, playground HTML, anything.
> **Reference implementation.** These rules are extracted from [Han.css](https://css.hanzi.pro), which ships the Zhuyin web font, the inter-character CSS fallback, and the legacy-conversion helper referenced below. Han.css is the canonical consumer, but the markup rules here are engine-agnostic — nothing on this page requires Han.css specifically. See [`examples/`](./examples/) for openable demonstrations.
**Scope.** This skill governs **only** `<ruby class="zhuyin">` and `<ruby class="mps">`. Other ruby uses — Hanyu Pinyin, Latin romanization, English glosses, Japanese furigana, classical 旁註 — are *not* inter-character layouts and are *not* constrained by these rules. They may use whatever HTML5-conforming pattern fits.
---
## Rule 1 — One base character per `<ruby class="zhuyin">` (recommended; required when CSS fallback is in play)
Each Zhuyin ruby should contain **exactly one** base character (one CJK ideograph) and **exactly one** `<rt>` with that character's full zhuyin reading (initials + medials + finals + tone, in canonical order)