帮助:风格/空格
< 帮助:风格
本文定义了在文章源代码中使用空白字符的标准。示例中使用的风格应被视为规则的组成部分。
通用规则
- 在同一段落中,使用单个空格分隔句子(即句点之后)。
- 避免使用多个空行来分隔段落或章节。
- 用单个空格字符分隔章节标题和
=字符。 - 用空行分隔章节标题和章节正文。
- 模板名称、模板参数、链接标题和替代链接文本周围不应有空格。
- 用空格分隔列表字符 (
*、#、;和:) 与列表项。当用于缩进时,:后的空格是可选的。 - 各个列表项不能用空行分隔,否则 wiki 解析器将为每个项目启动一个新列表。
- 文章标题元素(魔术字、分类 和 跨语言链接)之间,以及标题与正文文本或标记的第一行之间,不应有空行。
- 在文章正文中,用空行将特殊块(相关条目框、列表、代码块、文章状态模板、注意、提示、警告 等)与普通文本分隔开。
主命名空间、分类命名空间、ArchWiki 命名空间、帮助命名空间
示例
[[Category:Example A]]
[[Category:Example B]]
[[es:Article]]
[[zh-hans:Article]]
{{Expansion|Example status template}}
{{Related articles start}}
{{Related|Related article A}}
{{Related|Related article B}}
{{Related articles end}}
Example introduction.
== Section 1 ==
Example section body.
=== Section 1.1 ===
Example section body with [[Related article|link]].
== Section 2 ==
=== Section 2.1 ===
Example section body with {{Template|Parameter 1|2=Parameter 2}}.
* List item
** List item
* List item
=== Section 2.2 ===
Single-line code example
{{bc|
Multiline code example
1
2
3
}}
{{bc|1=
Multiline code example
1
2
3
}}
{{bc|<nowiki>
Multiline code example
1
2
3
</nowiki>}}
=== Section 2.3 ===
Paragraph text
{{Note|
* first note
* second note
}}
Second paragraph
{{Tip|some useful tip}}
讨论命名空间、*_talk 命名空间
用空行分隔不同的回复。
示例
== Discussion 1 == First post, paragraph 1. First post, paragraph 2. -- ~~~~ :Reply 1, single paragraph. -- ~~~~ ::Reply 2, paragraph 1. ::Reply 2, paragraph 2. ::-- ~~~~ == Discussion 2 == First post, single paragraph. -- ~~~~ :Reply 1, paragraph 1. :Reply 1, paragraph 2. :-- ~~~~ ::Reply 2, single paragraph. -- ~~~~