Template:ja-r/documentation

This is a wrapper for that does two things:
 * 1) automatic romanization (which is italicized here and put in l's tr parameter)
 * 2) placing of furigana aka ruby over the linked term (the term with furigana is put in l's third unnamed parameter)

The "r" stands for "ruby". This template generates content using the modules Module:ja-link and Module:ja.

Parameters

 * 1
 * The term itself that we want to link to (which is put directly into l's second unnamed parameter)


 * 2 (if the first term contains non-kana characters)
 * The term written entirely in kana with regular ASCII spaces between words (so that there will be spaces in the romanization, not relevant to the placing of furigana)


 * 3 or gloss
 * Same as the gloss field of l.


 * lit
 * Literal meaning.


 * pos
 * Part of speech.


 * linkto
 * Make the link point to this. Useful for -na adjectives or suru verbs where you want the link to point to the lemma but be displayed as the form plus suru or -na, e.g.  which displays 入手する with ruby but points to . Using   as the argument removes the link altogether, leaving just the word and its transliteration.


 * caps
 * set to any value to capitalize the first letters of each word (for proper nouns)


 * self
 * if set to, links referring to the page the link is on are displayed in bold (akin to l-self and m-self)


 * rom
 * Override the romaji. It can be set to  to disable romaji


 * hist
 * Use "romaji for the historical kana orthography", e.g..

For example, produces.

Ruby and transliteration
The following description applies to, , and all Japanese header templates.

Transliteration format

 * Use a period (full stop) between two kana to force a two consecutive vowels to be transliterated separately rather than as a long vowel.
 * &rarr;
 * &rarr;
 * Spaces and hyphens  in the kana text will appear in the transliteration as they are.
 * &rarr;
 * &rarr;
 * A caret  capitalizes the following letter.
 * &rarr;

Dividing kana between kanji
In certain cases, a manual division of kana between kanji is desired.

In such cases, use a percent sign (%) in both the kanji and kana parameters to determine which kana go above which kanji:
 * or &rarr;
 * or &rarr;

Spaces can also be used, if the corresponding kana contains a space:

The automatic placement of ruby fails in rare cases, for instance when the same kana occurs in both the parameter containing kanji and the parameter containing kana, and the parameter containing kana has two instances of this kana. (Below, the kana in question is .)


 * produces *

Use spaces or percent signs to prevent this. For example:


 * produces
 * produces

TemplateData
{	"params": { "1": {			"label": "kanji/kana", "description": "The term itself that we want to link to (which is put directly into l's second unnamed parameter)", "example": "寿司 ", "type": "wiki-page-name", "required": true },		"2": {			"label": "kana term", "type": "line", "example": "すし" },		"3": {			"aliases": [ "gloss" ],			"label": "gloss", "example": "sushi", "type": "line" },		"lit": { "label": "literal meaning", "example": "sour rice", "type": "line" },		"pos": { "label": "part of speech", "example": "noun", "type": "line" }	},	"format": "inline", "description": "Creates a link to a kanji/kana term with automatic romanization and placing ruby text (furigana) above the kanji" }