← ClaudeAtlas

ruby-markuplisted

Authoritative authoring rules for CJK ruby annotation markup — Zhuyin (注音, Mandarin Phonetic Symbols, MPS), Hanyu Pinyin, Japanese furigana (振り仮名), Cantonese Jyutping (粵拼), romanization, and gloss ruby — in any HTML / Markdown / JSX / Svelte / docs / test fixture / LLM output. Use whenever writing, reviewing, transforming, or generating ruby-annotated CJK text. Triggers include: any ruby element, class tokens like `zhuyin`, `mps`, `pinyin`, `jyutping`, an `rt` containing ㄅㄆㄇ or kana or romanization, "注音 ruby", "Zhuyin ruby", 拼音, 粵拼, furigana, "ruby markup", "字間注", "行間注", "聲調定位", or any request to add phonetic annotation or glosses to Chinese / Japanese / Korean text. Apply even when the request only says "add zhuyin to X" or "add pinyin to X" — the strict rules below override convenience.
hanzipro/ruby-markups · ★ 2 · Data & Documents · score 63
Install: claude install-skill hanzipro/ruby-markups
# CJK Ruby Markup Rules These rules describe how to author **CJK ruby annotation markup** (`<ruby>`) so that the browser's **native** ruby engine renders correct line-breaking, kinsoku (標點避頭尾), and annotation layout. They are organized in two tiers: - **Universal rules (Rules 1–5)** bind *every* annotation type — Zhuyin, Hanyu Pinyin, furigana, Jyutping, romanization, glosses. - **Per-type sections** bind only their own type. Zhuyin (注音 / MPS) — the one CJKV annotation type that can render inter-character (字間注) — is the most constrained type and gets the deepest section (Rules 6–8); other types are lighter and grow as needed. 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://hanzi.pro), which ships the Zhuyin web font, the inter-character CSS fallback, and the `transpileRuby` down-leveler 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 spec governs how `<ruby>` markup is *written*. It does not govern rendering implementation — fonts, CSS fallbacks, and engine behavior belong to consumers such as Han.css. Layout differences (inter-character 字間注 vs interlinear 行間注, horizontal vs vertical) are the consumers' problem; the markup rul