Bản mẫu:Ruby

Văn thư lưu trữ mở Wikisource

Tài liệu bản mẫu[xem] [sửa] [lịch sử] [làm mới]

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:

(trước)(đèn)(xem)(chuyện)西(Tây)(minh)/𡄎(ngẫm)(cười)𠄩(hai)𡦂(chữ)(nhân)(tình)(éo)𠻗(le)

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}}
(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}}
𢚸(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ở}}
(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.)

Vertical text is also supported via the {{Khải thư/đ}} and {{Khải thư/c}} templates:

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


(trước)(đèn)(xem)(chuyện)西(Tây)(minh)
𡄎(ngẫm)(cười)𠄩(hai)𡦂(chữ)(nhân)(tình)(éo)𠻗(le)