Jump to content

速查表

From mediawiki.org
This page is a translated version of the page Cheatsheet and the translation is 100% complete.

wiki 使用诸如星号、单引号、方括号和大括号等符号来格式化元素,例如将文字转换成其他网站或文章的链接,或创建表格布局,并将划分标题文本。 这种在 MediaWiki(维基百科)项目中使用的文本标记称为“wikitext”。

下面是一个最常用的 wikitext 格式的表格,中间列是你在“编辑模式”(点击页面顶部的编辑链接后)输入到文章中的内容,右侧列显示了在正常查看文章时会出现的结果。 有关编辑和 wikitext 的更详细信息,请参阅帮助:wikitext。

说明 输入的内容 输出的效果
適用於任何位置
斜体文本 ''italic'' italic
 
粗体文本 '''bold''' bold
 
粗斜体文本 '''''bold & italic''''' bold & italic
 
内部链接(位于 wiki 内的普通页面)
[[name of page]]

[[name of page|display text]]

name of page

display text

内部链接(位于 wiki 内的分类页面) [[:Category:name of category]] Category:name of category
跨維基連結 [[w:name of article]]

[[wiki:name of article]]
[[wiki:name of article|display text]]

w:name of article

wiki:name of article
display text

red links mean the page doesn't exist yet
 
外部链接(位于外部其他网站) [http://www.example.com]

[http://www.example.com display text]
http://www.example.com
[mailto:jane@example.com Jane's email]

[1]

display text
http://www.example.com
Janes's email

 
重定向 #redirect [[Target page]]
  1. redirect Target page
 
签名 ~~~

~~~~
~~~~~

J.Doe
J.Doe 02:41, 7 October 2026 (UTC)reply
02:41, 7 October 2026 (UTC)

 
排除 wiki 格式标记 with ''markup''

<nowiki>without ''markup''</nowiki>

with markup

without ''markup''

只在行首生效
不同层级的章节标题
== level 1 ==
=== level 2 ===
==== level 3 ====
===== level 4 =====
将 __NOTOC__ 放到一个页面中,将移除此页面的目录(table of content)

Level 1

Level 2

Level 3

Level 4
 
Outline numbered headings
# one
# two
## two point one
# three
  1. one
  2. two
    1. two point one
  3. three
 
无序列表
* one
* two
** two point one
* three
  • one
  • two
    • two point one
  • three
 
定义列表
; Definition
: item 1
: item 2
Definition
item 1
item 2
 
缩略图 [[File:Example.jpg|thumb|Caption text]]
图片描述文本