打开/关闭菜单
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

RIA Wiki 已更新到 1.41!部分 CSS 在新版本下可能有不同的表现,请编辑者注意检查和修改。 目前wiki关闭了自行注册账号的功能,如需注册账号,请查阅Help:注册账号

模板:Markup:修订间差异

来自RIA | Wiki
Aunst留言 | 贡献
建立内容为“<includeonly><!-- --><templatestyles src="Template:Markup/styles.css" /><table class="template-markup" {{#if:{{{width|}}}{{{margin-left|}}}{{{style|}}}|style="{{#…”的新页面
 
Aunst留言 | 贡献
简化
 
(未显示同一用户的1个中间版本)
第1行: 第1行:
<includeonly><!--
<includeonly><templatestyles src="Template:Markup/styles.css" />
--><templatestyles src="Template:Markup/styles.css" /><table class="template-markup" {{#if:{{{width|}}}{{{margin-left|}}}{{{style|}}}|style="{{#if:{{{width|}}}|width:{{{width}}};|}} {{#if:{{{margin-left|}}}|margin-left:{{{margin-left|}}};|}} {{{style|}}}|}}">
<table class="template-markup" {{#if:{{{width|}}}{{{margin-left|}}}{{{style|}}}|style="{{#if:{{{width|}}}|width:{{{width}}};|}} {{#if:{{{margin-left|}}}|margin-left:{{{margin-left|}}};|}} {{{style|}}}|}}">
{{#if:{{{title|}}} |<caption>{{{title}}}</caption>}}
{{#if:{{{title|}}} |<caption class="template-markup-title">{{{title}}}</caption>}}
{{#if:{{{noheaders|}}}{{{notitle|}}} |
{{#if:{{{noheaders|}}}{{{notitle|}}} |
   |<tr>
   |<tr>
<th scope="col" class="template-markup-colheader" {{#if:{{{colheaderstyle|}}}{{{col1headerstyle|}}}|style="{{{colheaderstyle|}}}{{{col1headerstyle|}}}"|}}>{{{col1|{{{t1|标记}}}}}}</th>
<th scope="col" class="template-markup-colheader" {{#if:{{{colheaderstyle|}}}{{{col1headerstyle|}}}|style="{{{colheaderstyle|}}}{{{col1headerstyle|}}}"|}}>{{{col1|{{{t1|源代码}}}}}}</th>
<th scope="col" class="template-markup-colheader" {{#if:{{{colheaderstyle|}}}{{{col2headerstyle|}}}|style="{{{colheaderstyle|}}}{{{col2headerstyle|}}}"|}}>{{{col2|{{{t2|呈现为}}}}}}</th>
<th scope="col" class="template-markup-colheader" {{#if:{{{colheaderstyle|}}}{{{col2headerstyle|}}}|style="{{{colheaderstyle|}}}{{{col2headerstyle|}}}"|}}>{{{col2|{{{t2|显示}}}}}}</th>
</tr>}}
</tr>}}
{{for loop||call=format item|pc1n=template|pc1v=Markup/row|pc2n=c1style|pc2v={{{col1style|{{{codestyle|{{{markupstyle|}}}}}}}}}|pc3n=c2style|pc3v={{{col2style|{{{outputstyle|}}}}}}|pv=item|{{item|c1={{{1|}}}|c2={{{2|}}}}}|{{item|c1={{{3|}}}|c2={{{4|}}}}}|{{item|c1={{{5|}}}|c2={{{6|}}}}}|{{item|c1={{{7|}}}|c2={{{8|}}}}}|{{item|c1={{{9|}}}|c2={{{10|}}}}}|{{item|c1={{{11|}}}|c2={{{12|}}}}}|{{item|c1={{{13|}}}|c2={{{14|}}}}}|{{item|c1={{{15|}}}|c2={{{16|}}}}}|{{item|c1={{{17|}}}|c2={{{18|}}}}}|{{item|c1={{{19|}}}|c2={{{20|}}}}}|{{item|c1={{{21|}}}|c2={{{22|}}}}}|{{item|c1={{{23|}}}|c2={{{24|}}}}}|{{item|c1={{{25|}}}|c2={{{26|}}}}}|{{item|c1={{{27|}}}|c2={{{28|}}}}}|{{item|c1={{{29|}}}|c2={{{30|}}}}}|{{item|c1={{{31|}}}|c2={{{32|}}}}}|{{item|c1={{{33|}}}|c2={{{34|}}}}}|{{item|c1={{{35|}}}|c2={{{36|}}}}}|{{item|c1={{{37|}}}|c2={{{38|}}}}}|{{item|c1={{{39|}}}|c2={{{40|}}}}}}}
{{for loop||call=format item|pc1n=template|pc1v=Markup/row|pc2n=c1style|pc2v={{{col1style|{{{codestyle|{{{markupstyle|}}}}}}}}}|pc3n=c2style|pc3v={{{col2style|{{{outputstyle|}}}}}}|pv=item|{{item|c1={{{1|}}}|c2={{{2|}}}}}|{{item|c1={{{3|}}}|c2={{{4|}}}}}|{{item|c1={{{5|}}}|c2={{{6|}}}}}|{{item|c1={{{7|}}}|c2={{{8|}}}}}|{{item|c1={{{9|}}}|c2={{{10|}}}}}|{{item|c1={{{11|}}}|c2={{{12|}}}}}|{{item|c1={{{13|}}}|c2={{{14|}}}}}|{{item|c1={{{15|}}}|c2={{{16|}}}}}|{{item|c1={{{17|}}}|c2={{{18|}}}}}|{{item|c1={{{19|}}}|c2={{{20|}}}}}|{{item|c1={{{21|}}}|c2={{{22|}}}}}|{{item|c1={{{23|}}}|c2={{{24|}}}}}|{{item|c1={{{25|}}}|c2={{{26|}}}}}|{{item|c1={{{27|}}}|c2={{{28|}}}}}|{{item|c1={{{29|}}}|c2={{{30|}}}}}|{{item|c1={{{31|}}}|c2={{{32|}}}}}|{{item|c1={{{33|}}}|c2={{{34|}}}}}|{{item|c1={{{35|}}}|c2={{{36|}}}}}|{{item|c1={{{37|}}}|c2={{{38|}}}}}|{{item|c1={{{39|}}}|c2={{{40|}}}}}}}
</table><!--
</table></includeonly><noinclude>
--></includeonly><!--
--><noinclude>
{{Documentation}}
{{Documentation}}
</noinclude>
</noinclude>

2024年7月31日 (三) 14:16的最新版本

模板文档

该模板用于并排展示一段wikitext和它的输出。

使用

第一列 ( "标记" ) 中的每个单元格都使用<pre>保留换行符和空格, 但样式设置为允许内容包含在其中。通常希望转义这些单元格的内容, 以便通过将标记包装在<nowiki>中来显示标记。从技术上讲, 不可能将此功能添加到模板中。

第二列 ( "显示为" ) 中的每个单元通常是从前一个相应的 "标记" 单元复制的未转义标记 (输出) 。在某些情况下, 这可能会有所不同:

  • 若第一行包含必须在行首使用的标记 (如 #, *; ), 则在新行前添加 <nowiki>; 参见下面的示例。
  • 标题标记 == 将会使标题显示在页面目录中; 请使用 {{Fake heading}}替代。

局限性

<nowiki>

如果您没有将标记单元格的内容写在<nowiki>中, 那么任何模板标记都不会被转义, 它将被解析。

此示例显示了 {{tl|tag}}:

显示为 预期显示为
{{[[Template:tag|tag]]}}

{{tl|tag}}

HTML实体

HTML实体在标记单元格中进行解析:

已包裹在nowiki中的内容显示为 预期显示为
 –

&nbsp;&ndash;

要解决这个问题, 将 & 替换为 &amp;, 因此, &amp;nbsp; 将会显示为 &nbsp;

示例

简单

源代码 显示
'''粗体文本'''

粗体文本

''斜体文本''

斜体文本

更加复杂

注意: 此处的 {{Markup}} 的第二个参数使用 {{fake heading}}。

源代码 显示
敏捷的棕狐狸跳过了懒狗。{{#tag:ref|一个脚注.<ref>脚注的引用.</ref>|group=nb}} 牛跳上了月亮。

== 脚注 ==
<references group="nb" />

== 参考 ==
<references />

敏捷的棕狐狸跳过了懒狗。[nb 1] 牛跳上了月亮

脚注
  1. 一个脚注.[1]
参考
  1. 脚注的引用.

多行

源代码 显示
敏捷的棕狐狸越过懒狗。

敏捷的棕狐狸越过懒狗。

敏捷的棕狐狸越过懒狗。

敏捷的棕狐狸越过懒狗。

敏捷的棕狐狸越过懒狗。

敏捷的棕狐狸越过懒狗。

敏捷的棕狐狸越过懒狗。

敏捷的棕狐狸越过懒狗。

敏捷的棕狐狸越过懒狗。

敏捷的棕狐狸越过懒狗。

有标题

狐狸和狗
源代码 显示
敏捷的棕狐狸越过懒狗。

敏捷的棕狐狸越过懒狗。

模板数据

这是用于新版可视化编辑器及其他工具的模板数据文档。

Markup模板数据

该模板用于并排展示一段wikitext和它的输出。

模板参数[编辑模板数据]

此模板有自定义格式。

参数描述类型状态
左边距margin-left

在表格的左侧设置边距。

默认值
0
字符串可选
宽度width

设置表格的整体宽度。

默认值
100%
字符串可选
CSS 样式style

修改表格整体外观的CSS样式。

字符串可选
禁用标题noheaders

设置 (例如noheaders = on) 以禁止显示列标题和表格标题。

字符串可选
标题title

表格上的标题

wikitext片段可选
列标题 CSS样式colheaderstyle

用以修改列标题的外观的CSS样式。

字符串可选
列标题 1 CSS样式col1headerstyle

用以修改第1列标题外观的CSS样式。覆盖 (但不替代) «colheaderstyle»。

字符串可选
列 1 标题col1

第一列 (标记/代码) 的标题。

默认值
"Markup"
wikitext片段可选
列标题 2 CSS样式col2headerstyle

用以修改第2列标题外观的CSS样式。覆盖 (但不替代) «colheaderstyle»。

字符串可选
列 2 标题col2

第二列 (输出) 的标题。

默认值
"Renders as"
wikitext片段可选
codestylecodestyle markupstyle

作用于第一列 (标记/代码) 内容的CSS样式 (例如: 较小的 font-size)。

字符串可选
列 2 CSS样式outputstyle

作用于第二列 (输出) 内容的CSS样式。

字符串可选
11

[n=«name», ceil(x) 为向上取整] 行 ceil(n÷2), 列 1 (标记/代码) 的内容

内容可选
22

[n=«name», ceil(x) 为向上取整] 行 ceil(n÷2), 列 2 (输出) 的内容

内容可选
33

[n=«name», ceil(x) 为向上取整] 行 ceil(n÷2), 列 1 (标记/代码) 的内容

内容可选
44

[n=«name», ceil(x) 为向上取整] 行 ceil(n÷2), 列 2 (输出) 的内容

内容可选
3939

[n=«name», ceil(x) 为向上取整] 行 ceil(n÷2), 列 1 (标记/代码) 的内容

内容可选
4040

[n=«name», ceil(x) 为向上取整] 行 ceil(n÷2), 列 2 (输出) 的内容

内容可选

脚注