Ruby character
From Free net encyclopedia
- For the telenovela, see Rubí.
Ruby characters are small, annotative characters that can be placed above or to the side of a character when writing logographic languages such as Chinese or Japanese to show the pronunciation. Typically called just ruby or rubi, such annotations are usually used as a pronunciation guide for relatively obscure characters.
Contents |
Examples
The following example uses tables to render Japanese ruby characters (called furigana) above the kanji for Tokyo ("東京"):
hiragana | katakana | romaji | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
Note: The font size has been increased to show details.
Most furigana (Japanese ruby characters) are written with the hiragana syllabary, but katakana and romaji are also occasionally used.
Here is an example of the Chinese ruby characters for Beijing ("北京"):
bopomofo | pinyin | ||||||||
---|---|---|---|---|---|---|---|---|---|
|
|
Uses of ruby
Ruby may be used for different reasons:
- because the character is rare and the pronunciation unknown to many — personal name characters often fall into this category;
- because the character has more than one pronunciation, and the context is insufficient to determine which to use;
- because the intended readers of the text are still learning the language and are not expected to always know the pronunciation and/or meaning of a term;
- because the author is using a nonstandard pronunciation for the characters — for example, comic books often employ ruby to emphasize puns (dajare, 駄洒落).
Also, ruby may be used to show the meaning, rather than pronunciation, of a possibly-unfamiliar (usually foreign) or slang word. This is generally used with spoken dialogue and applies only to Japanese publications. The most common form of ruby is called furigana or yomigana and is found in Japanese instructional books, newspapers, comics and books for children.
In Japanese, certain characters, such as the small tsu (っ) that indicates a pause before the consonant it precedes, are normally written at about half the size of normal characters. When written as ruby, however, such characters are usually the same size as other ruby characters.
In Chinese, the practice of providing phonetic cues via ruby is rare, but does occur systematically in grade-school level text books or dictionaries. The Chinese have no special name for this practice, as it is not as widespread as in Japan. In Taiwan, it is known as Zhuyin, from the name of the phonetic system employed for this purpose there. It is virtually always used vertically, because publications are normally in a vertical format, and Zhuyin is not as easy to read when presented horizontally. Where Zhuyin is not used, other Chinese phonetic systems like the Hanyu Pinyin are employed.
Ruby is sometimes used to provide word-for-word translations of a document to aid a reader who may not know the original language well, but can read another language well. Such word-for-word translations should be viewed with caution, since all natural languages include idioms (where combinations of words have a different meaning than the individual words), the relationship of non-adjacent words is often hard to capture, and usually there is no exact and unique translation for a given word. There are also challenges if the original and translated languages have a different direction (e.g., English reads left to right, but Hebrew reads right to left). A common example of this use involves the Christian bible, which was originally written in koine Greek, Hebrew, and some Aramaic. Only a small percentage of people can read these original languages proficiently. Thus, many publications of the Christian bible in its original languages incorporate ruby text with word-by-word translations to another language, such as English, as an aid. Such documents are often termed interlinear documents (where the emphasis is on providing translated text "between the lines"), and often they also include a separate full translation of the text.
Ruby annotation can also be used in handwriting.
History
Ruby was originally the name of a British 5.5-point typeface originally used for annotations in printed documents. In Japanese, rather than referring to the name of a typeface, the word came to refer to typeset furigana. When translated back into English, the word was rendered by some as "rubi", which is the typical romanization of the Japanese word ルビ. However, the spelling "ruby" has become more common since a W3C recommendation for ruby markup was published.
In the U.S., it had been called "agate" at least before the 1950s:
- agate An old name for a size of type slightly smaller than five and one-half points, ... . Called ruby in England. (Marjorie E. Skillin, et el., Words into Type, 1948, p. 538).
Ruby in Unicode
Unicode and its companion standard, the Universal Character Set, support ruby via these interlinear annotation characters:
- Code point FFF9 (hex) - Interlinear annotation anchor - marks start of annotated text
- Code point FFFA (hex) - Interlinear annotation separator - marks start of annotating character(s)
- Code point FFFB (hex) - Interlinear annotation terminator - marks end of annotated text
Unicode Technical Report #20 clarifies that these characters are not intended to be exposed to users of markup languages and software applications. It suggests that ruby markup be used instead, where appropriate.
Ruby markup
In 2001, the W3C published the Ruby Annotation specification for supplementing XHTML with ruby markup. Ruby markup is not a standard part of HTML 4.01 or any of the XHTML 1.0 specifications (XHTML-1.0-Strict, XHTML-1.0-Transitional, and XHTML-1.0-Frameset), but was incorporated into the XHTML 1.1 specification.
Support for ruby markup in web browsers is limited, as XHTML 1.1 is not yet widely implemented. Ruby markup is partially supported by Microsoft Internet Explorer (5.0+) for Windows and Macintosh, but is not supported by Mozilla, Firefox, Safari/Konqueror or Opera.
For these browsers, Ruby support is most easily added by using CSS rules such as can be found on the web [1].
Ruby markup support can also be added to some browsers that support custom extensions. For example, an unofficial extension that allows Netscape 7, Mozilla, and Firefox to properly render ruby markup, under certain circumstances, is available [2].
Ruby markup is structured such that a fallback rendering, consisting of the ruby characters in parentheses immediately after the main text, will appear if the browser does not have support for ruby.
Ruby markup examples
The hiragana and bopomofo examples from above are repeated below, using ruby markup.
The markup is shown first, and the rendered markup is shown next. Your browser will either render it with the correct size and positioning as shown in the table-based examples above, or will use the fallback rendering with the ruby characters in parentheses:
<ruby><rb>東</rb><rp>(</rp><rt>とう</rt><rp>)</rp></ruby> <ruby><rb>京</rb><rp>(</rp><rt>きょう</rt><rp>)</rp></ruby>
<ruby><rb>北</rb><rp>(</rp><rt>ㄅㄟˇ</rt><rp>)</rp></ruby> <ruby><rb>京</rb><rp>(</rp><rt>ㄐㄧㄥ</rt><rp>)</rp></ruby>
Complex ruby markup is also possible, but it is not supported by Wikipedia.
Special characters
External links
- W3C: Ruby Annotation specification
- W3C: CSS3 Ruby Module
- W3C: XHTML 1.1 Specification
- Web Specifications supported in Opera
- CSS Ruby Support — Works in all modern browsers
- XHTML Ruby Support — An extension to add ruby markup support to Netscape 7, Mozilla, and Firefoxca:Caràcter ruby
de:Ruby-Markup eo:Tipo Ruby fr:Ruby (linguistique) ja:ルビ pl:Ruby (znaki) sv:Ruby (tecken) zh:Ruby字元 ru:Агат (кегль)