These are rough notes on how to use ruby markup and styling to replicate the ruby-related requirements of the Ruby and Emphasis section of the document Requirements for Japanese Text Layout.
There are three main types of ruby:
- mono ruby (character-by-character annotation)
- group ruby (a single ruby text annotation spanning more than one base character; you cannot break a line in the middle)
- jukugo ruby (ruby text for a compound noun in Japanese where ruby text is normally character-by-character, as for mono-ruby, but when there are more than two ruby characters per base character, the ruby text for one base character can spill over an adjacent base character, if space is available; you can also break a line in the middle of jukugo-ruby)
To mark up mono-ruby
Use simple ruby markup, eg.
Mono-ruby, single kanji
Mono-ruby, compound word, simple markup
Mono-ruby, compound word, complex markup
My test cases
Mono-ruby, simple ruby markup