Macro Language Reference > PIs > Text > <?ruby>
  
<?ruby>
Description
Used to mark the start and end of a ruby annotation in a text stream.
 
Example 509. Start and end a ruby annotation
Here the base text is 'January, 2001' and the ruby annotation before the base text is 'Month, Year'.
<?ruby=1>January, 2001<?rt=1>Month, Year<?rt=0><?ruby=0>
This example will produce the following result:
 
It is not actually necessary to turn the <?ruby> and <?rt> commands off: they are included in the above example for the sake of completeness. If there are no more commands, PTC ALD assumes that the ruby annotation is finished. Similarly, if PTC ALD encounters another <?ruby> or <?rt> command it assumes that the previous command is finished.
Syntax
<?ruby on_off:n>
<?ruby>
[no parameter]
End of ruby annotation
on_off
0
End of ruby annotation
1
Start of ruby annotation
Additional Information
Ruby is the term used for a run of text that is associated with another run of text, referred to as the 'base' text. Ruby text is used to provide a short annotation of the associated base text. Ruby annotations are typically used in East Asian documents to indicate pronunciation or to provide a short annotation. They are frequently used in Japan in many kinds of publications, including books and magazines. Ruby is also used in China, especially in schoolbooks.
Ruby text is usually presented alongside the base text, using a smaller typeface. The name 'ruby' originated from the name of the 5.5pt font size in British printing, which is about half the 10pt font size commonly used for normal text.