第1行:
第1行:
+
<includeonly><!-- 在這裡加入模板的保護標識 --></includeonly><noinclude>{{template doc page viewed directly}}</noinclude>
+
<!-- 在本行下編輯模板說明 -->
+
{{模板样式|Template:Ruby/styles.css}}
+
== 注释 ==
+
'''通用[[旁注标记]]模板。'''针对具体语言推荐使用下列模板:
+
*汉语
+
**汉语拼音 [[Template:ruby-py]]
+
**注音符号 [[Template:ruby-zy]]
+
*日语 [[Template:ruby-ja]]
+
+
注意:含有旁注标记的条目(包括使用本模板的条目)须添加 {{tl|Ruby notice}} 模板。
+
+
== 用法 ==
+
一般语法
+
<pre>{{ruby|文字|注音|文字语言|注音语言}}</pre>
+
文字语言与注音语言为可选参数
+
+
示例:
+
# <nowiki>{{ruby|飞机|fēijī}}{{ruby|场|chǎng}}</nowiki>
+
# <nowiki>{{ruby|妹達|シスターズ|ja}}</nowiki>
+
# <nowiki>{{ruby|祝贺您|Congratulations|zh|en}}</nowiki>
+
+
对应的输出结果为:
+
# {{ruby|飞机|fēijī}}{{ruby|场|chǎng}}
+
# {{ruby|妹達|シスターズ|ja}}
+
# {{ruby|祝贺您|Congratulations|zh|en}}
+
+
{{para|large|yes}} 可将该处文字放大 250%。
+
{{para|larger|yes}} 可将该处文字放大 300%。
+
+
若浏览器不支持,标音会显示在文字后方。[[Firefox]](34.0-37.0版)的用户可以通过访问 <code>about:config</code> 页面,将 <code>layout.css.ruby.enabled</code> 改为 <code>true</code> 启用原生的支持。
+
+
==模板数据==
+
{{TemplateDataHeader}}
+
<templatedata>
+
{
+
"params": {
+
"1": {
+
"description": "需要用旁注标记标注的文字",
+
"type": "content",
+
"required": true
+
},
+
"2": {
+
"description": "用旁注标记注音",
+
"required": true,
+
"type": "content"
+
},
+
"3": {
+
"description": "给需要用旁注标记标注的文字标注语言,通常使用 ISO 936-1 语言代码。如有必要,可以添加 ISO 15924 代码来表示书写体系。",
+
"type": "string"
+
},
+
"4": {
+
"description": "给注音部分标注语言,通常使用 ISO 936-1 语言代码。如有必要,可以添加 ISO 15924 代码来表示书写体系。",
+
"type": "string"
+
},
+
"large": {
+
"description": "输入任意参数值可将文字放大 250%。"
+
},
+
"larger": {
+
"description": "输入任意参数值可将文字放大 300%。"
+
},
+
"style": {
+
"description": "全局 CSS 样式",
+
"type": "string",
+
"aliases": [
+
"css"
+
]
+
},
+
"rtc": {
+
"description": "使用此参数会使 <rtc> 标签被激活,从而添加其他形式的注文。",
+
"type": "unbalanced-wikitext"
+
},
+
"rtcstyle": {
+
"description": "<rtc> 标签被激活以后可在此处加入的 CSS 样式。",
+
"type": "string",
+
"aliases": [
+
"rtccss"
+
]
+
}
+
},
+
"description": "通用旁注标记模板。"
+
}
+
</templatedata>
+
+
== 参见 ==
+
* {{tl|Ruby notice}}——使用了<nowiki>{{Ruby}}</nowiki>的條目應掛上此模板。
+
* {{tl|zy}}
+
* {{tl|标音}}——功能更为强大,可对一个字同时标拼音、注音、粤语发音等。
+
* {{tl|overset}}——具有相同作用的[[:分类:数学格式模板|数学格式模板]]。
+
<includeonly>
+
<!-- 本行下加入模板的分類 -->
+
[[Category:多语言支持模板]]
+
</includeonly>