Template:Rubi/doc

Revision as of 02:27, 31 August 2025 by Mattk4355 (talk | contribs) (Created page with "{{Documentation/Header}} {{Lua}} {{CSS}} This template is used to input [https://www.w3schools.com/tags/tag_ruby.asp ruby] text, which helps form '''furigana''' ({{ja|{{Rubi|振|ふり|仮名|がな}}}}) in Japanese and '''Pinyin reading guide''' {{Rubi|{{zh|米哈游}}|mǐ hā yóu}} in Chinese. More information can be found [https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-ruby-element here]. ==Syntax== Pairs of text will form a "base" and "explan...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 (edit | hist).

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

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

{{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

This template is used to input ruby text, which helps form furigana in Japanese and Pinyin reading guide in Chinese. Please see the documentation page for a full explanation of the parameters.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Base Text 11

no description

Stringrequired
Explanation Text 12

no description

Stringsuggested
Base Text 23

no description

Stringoptional
Explanation Text 14

no description

Stringoptional
rpStartrpStart

the beginning denotation of the "explanation" tag (defaults to an open parenthesis)

Default
(
Stringoptional
rpEndrpEnd

the ending denotation of the "explanation" tag (defaults to an close parenthesis)

Default
)
Stringoptional
largelarge

setting this value to any non-blank value will make the "base" text 250% bigger (fixed value), and the "explanation" text smaller (fixed value)

Booleanoptional
centercenter

setting this value to any non-blank value will make the center the ruby text instead of space it out along the base text

Booleanoptional