Bản mẫu:Ruby

Văn thư lưu trữ mở Wikisource
Jump to navigation Jump to search

[sửa] Tài liệu

This template displays the given Hán or Nôm text, with the given quốc ngữ annotations as ruby text above it. Use the following syntax:

{{ruby|畧畑䀡傳西銘/𡄎唭𠄩𡦂人情喓𠻗|trước đèn xem chuyện Tây minh / ngẫm cười hai chữ nhân tình éo le}}

which produces:


There should be the same number of Han characters as quốc ngữ words. If the page title appears in the string of Han characters, each occurrence is highlighted using the HTML5 <mark> tag. Alternatively, the character to mark may be specified in the mark parameter:

{{ruby|畧畑䀡傳西銘/𡄎唭𠄩𡦂人情喓𠻗|mark=𡦂|trước đèn xem chuyện Tây minh / ngẫm cười hai chữ nhân tình éo le}}

Because very few Nôm characters have been encoded into the Unicode standard, it is often necessary to give an image or Unicode ideographic description sequence in lieu of the actual character. In the first parameter, place an asterisk where the character would be. Then specify the replacement content in the alts parameter:

{{ruby|𢚸蹺仍渚𧡊𠊛/𨖲髙氽𣅶*爲𨋣車|alts=⿰竜望|lòng theo nhưng chửa thấy người / lên cao mấy lúc trông vời bánh xe}}
{{ruby|餅*|alts=[[File:Nom_Character_V04-5055.svg|20px|alt=⿰米頗]]|bánh phở}}

In the event that multiple replacements are needed, use a single asterisk for each in the first parameter, and specify all the replacements in the alts parameter, separated by spaces. (Use underscores instead of spaces in image names.)