Jump to content

Template:Rubi/doc

From The Petit Planet Wiki
This is the documentation page for Rubi.
It contains usage information, categories, and other content not part of the original template page.
This template uses Module:Rubi, a script written in Lua.
This template uses CSS found at MediaWiki:Rubi.css.

This template is used to input ruby text, which helps form furigana (振ふり仮名がな) in Japanese and Pinyin reading guide 米哈游mǐ hā yóu in Chinese.

More information can be found here.

Syntax

[edit source]

Pairs of text will form a "base" and "explanation" set. If there is an odd pair left out, it will be displayed as "base" text (without an "explanation" tag).

There are three named Parameters:

  • rpStart — the beginning denotation of the "explanation" tag (defaults to an open parenthesis)
  • rpEnd — the ending denotation of the "explanation" tag (defaults to an close parenthesis)
  • large — setting this value to any non-blank value will make the "base" text 250% bigger (fixed value), and the "explanation" text smaller (fixed value)
  • center — setting this value to any non-blank value will make the center the ruby text instead of space it out along the base text.

Syntax

[edit source]

{{Rubi|日本語|にほんご}} yields:
日本語にほんご
{{Rubi|米哈游|mǐ hā yóu}} yields:
米哈游mǐ hā yóu
{{Rubi|HT|HyperText|M|Markup|L|Language|large = 1}} yields:
HTHyperTextMMarkupLLanguage
{{Rubi|Very long base text that goes on and on|Short ruby|center = 1}} yields:
Very long base text that goes on and onShort ruby