|
|
行 1: |
行 1: |
| __无目录__ | | __无目录__ |
| | |
| 您可以使用维基标记符号来格式化输入的内容。这些符号包括了诸如星号、引号、等号等在维基中有特殊功能的符号,有时这些功能取决于它们所处的位置。比如为了使一个词语变为 斜体 就需要使用一对双引号将它包裹起来, 就像 <code><nowiki>''这样''</nowiki></code>. | | 您可以使用维基标记符号来格式化输入的内容。这些符号包括了诸如星号、引号、等号等在维基中有特殊功能的符号,有时这些功能取决于它们所处的位置。比如为了使一个词语变为 斜体 就需要使用一对双引号将它包裹起来, 就像 <code><nowiki>''这样''</nowiki></code>. |
|
| |
|
| == Text formatting markup == | | == 文本格式化标记== |
|
| |
|
| {| class="wikitable" | | {| class="wikitable" |
| ! Description | | !'''描述''' |
| ! width=40% | You type | | ! width="40%" |'''用户键入''' |
| ! width=40% | You get | | ! width="40%" |'''输出效果''' |
| |- | | |- |
| ! colspan="3" style="background: #ABE" | Character (inline) formatting – ''applies anywhere'' | | ! colspan="3" style="background: #ABE" |'''文字 ( 行中) 格式化 – 适用于任何地方''' |
| |- | | |- |
| | Italic text | | | 斜体文本 |
| | <pre> | | | |
| '' italic'' | | <nowiki>'' 斜体''</nowiki> |
| </pre> | |
| | | | | |
| '' italic'' | | '' 斜体'' |
| |- | | |- |
| | Bold text | | | 粗体文字 |
| | <pre> | | |<pre> |
| ''' bold''' | | ''' 粗体''' |
| </pre> | | </pre> |
| | | | | |
| ''' bold''' | | ''' 粗体''' |
| |- | | |- |
| | Bold and italic | | | 粗斜体 |
| | <pre> | | |<pre> |
| ''''' bold & italic''''' | | ''''' 粗斜体''''' |
| </pre> | | </pre> |
| | | | | |
| ''''' bold & italic''''' | | ''''' 粗斜体''''' |
| |- | | |- |
| | Escape wiki markup | | | 注释掉wiki标记 |
| | <pre> | | | |
| <nowiki> no [[wiki]] ''markup''</nowiki> | | <nowiki><nowiki> 没有 [[wiki]] '' 标记''</nowiki></nowiki> |
| </pre> | |
| | | | | |
| <nowiki>no [[wiki]] ''markup''</nowiki>
| | 没有 <nowiki>[[wiki]]</nowiki> <nowiki>''</nowiki>标记<nowiki>''</nowiki> |
| |- | | |- |
| ! colspan="3" style="background: #ABE" | Section formatting – ''only at the beginning of the line'' | | ! colspan="3" style="background: #ABE" |Section formatting – ''only at the beginning of the line'' |
| |- | | |- |
| | Section Headings of different levels | | | 不同等级的章节标题 |
| | <pre> | | |<pre> |
| | == 2级标题 == |
|
| |
|
| == Level 2 == | | === 3级标题 === |
|
| |
|
| === Level 3 === | | ==== 4级标题 ==== |
|
| |
|
| ==== Level 4 ==== | | ===== 5 级标题 ===== |
| | |
| ===== Level 5 =====
| |
| | |
| ====== Level 6 ======
| |
|
| |
|
| | ====== 6级标题 ====== |
| </pre> | | </pre> |
| ---- | | ---- |
| {{note|1=<nowiki/> | | {{note|1= 跳过1级标题,那是页面名等级。 |
| * [[<tvar|lv1>Special:MyLanguage/Help_talk:Formatting#Level_1</>|Skip Level 1]], it is page name level.
| | 不要在同一行中表示结束的等号后添加文字。 |
| * Do not put any text on the same line after the ending equal signs.
| | 一篇有4个或更多标题的文章将会自动创建一个主题列表(目录)(除非设置了魔术字__NOTOC__)。 |
| * An article with 4 or more headings automatically creates a [[wikipedia:Help:Section#Table of contents (TOC)|table of contents]] (unless setting the magic word<nowiki>__NOTOC__</nowiki>).
| |
| }} | | }} |
| | | | | |
|
| |
|
| | == 2级标题 == |
|
| |
|
| | === 3级标题 === |
|
| |
|
| <h2>Level 2</h2>
| | ==== 4级标题 ==== |
|
| |
|
| | ===== 5级标题 ===== |
|
| |
|
| <h3>Level 3</h3>
| | ====== 6 级标题 ====== |
| | |
| | |
| <h4>Level 4</h4>
| |
| | |
| | |
| <h5>Level 5</h5>
| |
| | |
| | |
| <h6>Level 6</h6>
| |
|
| |
|
| |- | | |- |
| | Horizontal rule | | | 分割线 |
| | <pre> | | |<pre> |
| Text before | | 之前文本 |
| ---- | | ---- |
| Text after | | 之后文本 |
| </pre> | | </pre> |
| | | | | |
| Text before
| | 之前文本 |
| ---- | | ---- |
| Text after
| | 之后文本 |
| |- | | |- |
| | Bullet list | | | 无序列表 |
| | | | | |
| <pre> | | <pre> |
| | | * 在行的开始 |
| | | * 使用一个星号(*) 。 |
| * Start each line | | ** 更多的星号表示 |
| * with an [[Wikipedia:asterisk|asterisk]] (*). | | *** 越来越深的层次。 |
| ** More asterisks give deeper | | 用任何其他字符在段首将停止列表。 |
| *** and deeper levels. | |
| * Line breaks <br />don't break levels.
| |
| *** But jumping levels creates empty space.
| |
| Any other start ends the list.
| |
| | |
| | |
| * combine bullet list
| |
| ** with definition
| |
| ::- definition
| |
| ** creates empty space
| |
| | |
| | |
| * combine bullet list
| |
| ** with definition
| |
| *:- definition
| |
| ** without empty spaces
| |
| | |
| | |
| *bullet list
| |
| :- definition
| |
| :* sublist that doesn't create empty
| |
| :* spaces after definition
| |
| | |
| </pre> | | </pre> |
| | | | | |
| | * 在行的开始 |
| | * 使用一个星号 (*)。 |
| | ** 更多的星号表示 |
| | *** 越来越深的层次。 |
|
| |
|
| | | 用任何其他字符在段首将停止列表。 |
| * Start each line
| |
| * with an [[Wikipedia:asterisk|asterisk]] (*).
| |
| ** More asterisks give deeper
| |
| *** and deeper levels.
| |
| * Line breaks <br />don't break levels.
| |
| *** But jumping levels creates empty space.
| |
| Any other start ends the list.
| |
| | |
| | |
| * combine bullet list
| |
| ** with definition
| |
| ::- definition
| |
| ** creates empty space
| |
| | |
| | |
| * combine bullet list
| |
| ** with definition
| |
| *:- definition
| |
| ** without empty spaces
| |
|
| |
|
|
| |
|
| *bullet list
| |
| :- definition
| |
| :* sublist that doesn't create empty
| |
| :* spaces after definition
| |
|
| |
|
| |- | | |- |
| | Numbered list | | | 有序列表 |
| | | | | |
| <pre> | | <pre> |
| | | # 在行的开始 |
| | | # 使用一个井号(#) 。 |
| # Start each line | | ## 更多的井号表示 |
| # with a [[Wikipedia:Number_sign|number sign]] (#). | | ### 越来越深 |
| ## More number signs give deeper
| | ### 的层次。 |
| ### and deeper | | 用任何其他字符在段首将停止列表。 |
| ### levels. | |
| # Line breaks <br />don't break levels.
| |
| ### But jumping levels creates empty space. | |
| # Blank lines
| |
| | |
| | |
| # end the list and start another.
| |
| Any other start also
| |
| ends the list.
| |
| | |
| </pre> | | </pre> |
| | | | | |
| | # 在行的开始 |
| | # 使用一个井号 (#)。 |
| | ## 更多的井号表示 |
| | ### 越来越深 |
| | ### 的层次。 |
|
| |
|
| | | 用任何其他字符在段首将停止列表。 |
| # Start each line
| | <br /> |
| # with a [[Wikipedia:Number_sign|number sign]] (#).
| |
| ## More number signs give deeper
| |
| ### and deeper
| |
| ### levels.
| |
| # Line breaks <br />don't break levels.
| |
| ### But jumping levels creates empty space.
| |
| # Blank lines
| |
| | |
| | |
| # end the list and start another.
| |
| Any other start also
| |
| ends the list.
| |
|
| |
|
| |- | | |- |
| | Definition list | | | 缩进文本 |
| | <pre> | | |<pre> |
| | | : 缩进1字符 |
| | | :: 缩进2字符 |
| ;item 1
| | ::::: 缩进多字符 |
| : definition 1 | |
| ;item 2
| |
| : definition 2-1 | |
| : definition 2-2 | |
| | |
| </pre>
| |
| {{note|1= If you want for the colon to be displayed, escape it by writing <tvar|1><code>&#58;</code></>.}}
| |
| |
| |
| | |
| | |
| ;item 1
| |
| : definition 1
| |
| ;item 2
| |
| : definition 2-1
| |
| : definition 2-2
| |
| | |
| |-
| |
| | Indent text
| |
| | <pre>
| |
| | |
| | |
| : Single indent | |
| :: Double indent | |
| ::::: Multiple indent | |
| | |
| </pre> | | </pre> |
| ---- | | ---- |
| {{Note|1= This workaround may harm accessibility.}} | | {{Note|1= 但是这样可能导致阅读困难。}} |
| |
| |
| | |
| | |
| : Single indent
| |
| :: Double indent
| |
| ::::: Multiple indent
| |
| | |
| |-
| |
| | Mixture of different types of list
| |
| | | | | |
| <pre>
| |
|
| |
|
| | 缩进1字符 |
|
| |
|
| # one
| | : 缩进2字符 |
| # two
| | : 缩进多字符 |
| #* two point one
| |
| #* two point two
| |
| # three
| |
| #; three item one
| |
| #: three def one
| |
| # four
| |
| #: four def one
| |
| #: this looks like a continuation
| |
| #: and is often used
| |
| #: instead <br />of <nowiki><br /></nowiki>
| |
| # five
| |
| ## five sub 1
| |
| ### five sub 1 sub 1
| |
| ## five sub 2
| |
|
| |
|
| </pre>
| |
| ----
| |
| {{note|1= The usage of <tvar|1><code>#:</code></> and <tvar|2><code>*:</code></> for breaking a line within an item may also harm accessibility.}}
| |
| |
| |
|
| |
|
|
| |
| # one
| |
| # two
| |
| #* two point one
| |
| #* two point two
| |
| # three
| |
| #; three item one
| |
| #: three def one
| |
| # four
| |
| #: four def one
| |
| #: this looks like a continuation
| |
| #: and is often used
| |
| #: instead <br />of <nowiki><br /></nowiki>
| |
| # five
| |
| ## five sub 1
| |
| ### five sub 1 sub 1
| |
| ## five sub 2
| |
|
| |
|
| |- | | |- |
| | Preformatted text | | | 预格式化文本 |
| | <pre> | | |<pre> |
| Start each line with a space.
| | <span class="mw-translate-fuzzy">在行首使用空格。文本被''' 预格式化''' |
| Text is '''preformatted''' and
| | 并且''''' 可以''''' |
| ''markups'' '''''can''''' be done. | | 使用'' 维基标记'' 。</span> |
| </pre> | | </pre> |
| ---- | | ---- |
| {{note|1= This way of preformatting only applies to section formatting. Character formatting markups are still effective.}} | | {{note|1= 这种办法常用来给文章的某部分排版。对字符进行格式化的维基标记仍然有效。}} |
| | | | | |
| Start each line with a space.
| | 在行首使用空格。文本被''' 预格式化''' 并且''''' 可以''''' 使用'' 维基标记'' 。 |
| Text is '''preformatted''' and
| |
| ''markups'' '''''can''''' be done.
| |
| |- | | |- |
| | Preformatted text blocks | | |Preformatted text blocks |
| | <pre> <nowiki> | | |<pre> <nowiki>在第一列使用空格, |
| Start with a space in the first column,
| | (在 <nowiki> 之前)。 |
| (before the <tvar|1><nowiki></>).
| |
|
| |
|
| | | 您文本块的格式将 |
| Then your block format will be
| | 保留。 |
| maintained.
| |
| | |
| | |
| This is good for copying in code blocks:
| |
| | |
| | |
| def function():
| |
| """ documentation string"""
| |
| | |
| if True:
| |
| print True
| |
| else:
| |
| print False</nowiki>
| |
| </pre> | | </pre> |
| | | | | |
| {{#tag:nowiki| | | {{#tag:nowiki| 在第一列使用空格, |
| Start with a space in the first column,
| | (在 <nowiki> 之前)。 |
| (before the <nowiki>).
| |
|
| |
|
| | | 您文本块的格式将 |
| Then your block format will be
| | 保留。}} |
| maintained.
| |
| | |
| | |
| This is good for copying in code blocks:
| |
| | |
| | |
| def function():
| |
| """ documentation string"""
| |
| | |
| if True:
| |
| print True
| |
| else:
| |
| print False
| |
| }} | |
| |} | | |} |
| | ==段落== |
|
| |
|
| | Mediawiki忽略单个换行。要想另起一段,请留空一行(两个换行)。您也可以使用HTML标记<code><nowiki><br /></nowiki></code>强制换行另起一段。 |
|
| |
|
| == Paragraphs == | | ==HTML 标记== |
| | |
| | |
| MediaWiki ignores single line breaks. To start a new paragraph, leave an empty line. You can force a line break within a paragraph with the HTML tag <code><br /></code>.
| |
| | |
| == HTML tags ==
| |
|
| |
|
| | | 在 MediaWiki 中允许使用一些HTML标记。比如<code><nowiki><code></nowiki></code>, <code><nowiki><div></nowiki></code> and <code><nowiki><span></nowiki></code> 等。这些标记将在你插入它们的地方生效。 |
| Some [[wikipedia:HTML|HTML]] tags are allowed in MediaWiki, for example <tvar|1>{{tag|code|open}}</>, <tvar|2>{{tag|div|open}}</>, and <tvar|3>{{tag|span|open}}</>. These apply anywhere you insert them.
| |
|
| |
|
| {| class="wikitable" | | {| class="wikitable" |
| ! Description | | !Description |
| ! width=40% | You type | | ! width="40%" |You type |
| ! width=40% | You get | | ! width="40%" |You get |
| |- | | |- |
| | Inserted <br />(Displays as underline in most browsers) | | | 插入标记 |
| | <pre> | | |<pre> |
| <ins> Inserted</ins> | | <ins> 插入标记</ins> |
|
| |
|
| or | | 或 |
|
| |
|
| <u> Underline</u> | | <u> 下划线</u> |
| </pre> | | </pre> |
| | | | | |
| <ins> Inserted</ins> | | <ins> 插入标记</ins> |
|
| |
|
| or | | 或 |
|
| |
|
| <u> Underline</u> | | <u> 下划线</u> |
| |- | | |- |
| | Deleted <br />(Displays as strike-through in most browsers) | | | 删除标记 |
| | <pre> | | |<pre> |
| <s> Strike-through</s> | | <s> 划掉</s> |
| | |
| or
| |
|
| |
|
| <del> Deleted</del>
| | 或 |
|
| |
|
| | <del>删除线</del> |
| </pre> | | </pre> |
| | ----{{Note}} |
| | | | | |
| <s> Strike-through</s> | | <s> 划掉</s> |
|
| |
|
| or | | 或 |
|
| |
|
| <del> Deleted</del> | | <s> 删除线</s> |
| |- | | |- |
| | Fixed width text | | | 等宽字体 |
| | <pre><code> Source code</code></pre> | | |<pre><code> 源代码</code></pre> |
| | <code> Source code</code> | | |<code> 源代码</code> |
| |- | | |- |
| | Blockquotes | | | 引用的内容 |
| | <pre> | | |<pre> |
| Text before
| | <blockquote> 引用的内容</blockquote> |
| <blockquote> Blockquote</blockquote> | |
| Text after
| |
| </pre> | | </pre> |
| | | | | |
| Text before
| | 引用的内容 |
| <blockquote> Blockquote</blockquote>
| |
| Text after
| |
| |- | | |- |
| | Quotes | | | 引号 |
| | <pre><q> This is a quotation</q></pre> | | |<pre><q> 这是一个带引号的句子(引用句)。</q></pre> |
| {{Note|1= The q element '''must not''' be used in place of quotation marks that do not represent quotes; for example, it is inappropriate to use the q element for marking up sarcastic statements.<ref>[<tvar|url>https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-q-element</> HTML Living Standard—The <tvar|q><'''q'''></> element]</ref>}}
| | |
| | <q> This is a quotation</q> | | |<q> 这是一个带引号的句子(引用句)。</q> |
| |- | | |- |
| | Comment | | | 注释 |
| | <pre> | | | |
| | | <!-- 这行是注释 --> |
| | | 注释只能编辑时在编辑区域内看到。 |
| Comments are visible only
| |
| in the edit zone.
| |
| </pre>
| |
| | | | | |
| | | 注释只能编辑时在编辑区域内看到。 |
| | |
| | |
| Comments are visible only
| |
| in the edit zone.
| |
|
| |
|
| |- | | |- |
| | Completely preformatted text | | | 完全预格式化文本 |
| | <pre> | | |<pre> |
| <pre> | | <pre>文本被'''预格式化'''并且''标记'' '''''不能''''' 起作用</pre> |
| | </pre> |
|
| |
|
| Text is '''preformatted''' and
| |
| ''markups'' '''''cannot''''' be done</pre>
| |
| </pre>
| |
| ----
| |
| {{note|1= For marking up of preformatted text, check the "Preformatted text" entry at the end of the previous table.}}
| |
| | | | | |
| <pre> | | <pre> |
| | | 文本被''' 预格式化''' 并且'' 标记'' ''''' 不能''''' 起作用 |
| Text is '''preformatted''' and
| |
| ''markups'' '''''cannot''''' be done | |
| </pre> | | </pre> |
| |- | | |- |
| | '''Customized''' preformatted text | | |''' 自定义''' 预格式化文本 |
| | <pre> | | |<pre> |
| <pre style="color: red"> | | <pre style="color: red"> 文本被某种样式''' 预格式化''' 并且'' 标记'' ''''' 不能''''' 起作用</pre> |
| | |
| Text is '''preformatted'''
| |
| with a style and
| |
| ''markups'' '''''cannot''''' be done | |
| </pre> | |
| </pre> | | </pre> |
| ---- | | ---- |
| {{note|1= A CSS style can be named within the <code>style</code> attribute.}} | | {{note|1= CSS 样式能够用<code>style</code> 属性来命名。}} |
| | | | | |
| <pre style="color: red"> | | <pre style="color: red"> |
| | | 文本被某种样式''' 预格式化''' 并且'' 标记'' ''''' 不能''''' 起作用 |
| Text is '''preformatted'''
| |
| with a style and
| |
| ''markups'' '''''cannot''''' be done | |
| </pre> | | </pre> |
| |}
| |
|
| |
|
| |
| continued:
| |
| {| class="wikitable" | style="table-layout: fixed; width: 100%"
| |
| ! Description
| |
| ! width=40% | You type
| |
| ! width=40% | You get
| |
| |- | | |- |
| | '''Default''' preformatted text has a CSS attribute (<code>white-space: pre-wrap;</code>) to wrap the text according to available width | | |''' 默认''' 预格式化文本有CSS属性(<code>white-space: pre-wrap;</code> )来根据可用宽度包裹文本 |
| | <pre> | | |<pre> |
| <pre> | | <pre> |
| This long sentence is used to demonstrate text wrapping. This additional sentence makes the text even longer. This additional sentence makes the text even longer. | | 这句长句子用来展示文本回行。这段额外句子使文本足够长。这段额外句子使文本足够长。 |
| </pre> | | </pre> |
| </pre> | | </pre> |
| | | | |<pre> |
| <pre> | | 这句长句子用来展示文本回行。这段额外句子使文本足够长。这段额外句子使文本足够长。 |
| This long sentence is used to demonstrate text wrapping. This additional sentence makes the text even longer. This additional sentence makes the text even longer. | |
| </pre> | | </pre> |
| |- | | |- |
| | '''Customized''' preformatted text with '''disabled''' text wrapping | | |''' 自定义''' 预格式化文本,带''' 被禁用的''' 文本包装 |
| | <pre> | | |<pre> |
| <pre style="white-space: pre;"> | | <pre style="white-space: pre;"> |
| This long sentence is used to demonstrate text wrapping. This additional sentence makes the text even longer. This additional sentence makes the text even longer. | | 这句长句子用来展示文本回行(为了凑足长度而加的一句话,跟英文版不同)。后面的这句话使得这段文字更长。 |
| </pre> | | </pre> |
| </pre> | | </pre> |
| | | | |<pre style="white-space: pre;"> |
| <pre style="white-space: pre;"> | | 这句长句子用来展示文本回行(为了凑足长度而加的一句话,跟英文版不同)。后面的这句话使得这段文字更长。 |
| This long sentence is used to demonstrate text wrapping. This additional sentence makes the text even longer. This additional sentence makes the text even longer. | | |
| </pre> | | </pre> |
| |} | | |} |