无编辑摘要 |
无编辑摘要 |
||
| 第1行: | 第1行: | ||
{{ | <ruby class="templateruby {{#if:{{{large|}}}|large}}" {{#if:{{{style|{{{css|}}}}}}|style="{{{style|{{{css|}}}}}}"}}>{{{1}}}<rp>(</rp><rt>{{{2}}}</rt><rp>)</rp></ruby><noinclude> | ||
<noinclude>{{template doc}}[[Category:维基百科模板]]</noinclude> | |||
2025年5月10日 (六) 20:32的最新版本
{{{1}}}
这是从Wikipedia:zh:Template:Ruby引用的通用旁注标记模板。
用法[编辑源代码]
一般语法
{{ruby|文字|注音|文字语言|注音语言}}
文字语言与注音语言为可选参数
示例:
- {{ruby|飞机|fēijī}}{{ruby|场|chǎng}}
- {{ruby|妹達|シスターズ|ja}}
- {{ruby|祝贺您|Congratulations|zh|en}}
对应的输出结果为:
- 飞机场
- 妹達
- 祝贺您
|可将该处文字放大 250%。|可将该处文字放大 300%。
若浏览器不支持,标音会显示在文字后方。wikipedia:Firefox(34.0-37.0版)的用户可以通过访问 about:config 页面,将 layout.css.ruby.enabled 改为 true 启用原生的支持。
模板数据[编辑源代码]
{{wikipedia: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>