“OdooVhelp”的版本间的差异

来自Odoo大V社-odoo中文开发手册
跳转至: 导航搜索
(创建页面,内容为“<languages /> {{TNT|PD Help Page}} <translate> <!--T:1--> You can format your text by using wiki markup. This consists of normal characters like asterisks, apostroph...”)
 
 
(未显示同一用户的3个中间版本)
第1行: 第1行:
<languages />
+
您可以使用维基标记符号来格式化输入的内容. 这些符号包括了诸如星号, 引号, 等号等在维基中有特殊功能的符号, 有时这些功能取决于它们所处的位置. 比如为了使一个词语变为 ''斜体'' 就需要使用一对双引号将它包裹起来, 就像 <code><nowiki>''这样''</nowiki></code>.
{{TNT|PD Help Page}}
+
<translate>
+
<!--T:1-->
+
You can format your text by using wiki markup. This consists of normal characters like asterisks, apostrophes or equal signs which have a special function in the wiki, sometimes depending on their position. For example, to format a word in ''italic'', you include it in two pairs of apostrophes like <code><nowiki>''this''</nowiki></code>.
+
  
== Text formatting markup == <!--T:2-->
+
== 文本格式化标记 ==
</translate>
+
 
{| class="wikitable"
 
{| class="wikitable"
! <translate><!--T:3-->
+
! 描述
Description</translate>
+
! width=40% | 用户键入
! width=40% | <translate><!--T:4-->
+
! width=40% | 输出效果
You type</translate>
+
! width=40% | <translate><!--T:5-->
+
You get</translate>
+
 
|-
 
|-
! colspan="3" style="background: #ABE" | <translate><!--T:6-->
+
! colspan="3" style="background: #ABE" | 文字 (行中) 格式化 – '''适用于任何地方'''
Character (inline) formatting – ''applies anywhere''</translate>
+
 
|-
 
|-
| <translate><!--T:7-->
+
| 斜体文本
Italic text</translate>
+
 
| <pre>
 
| <pre>
''<translate><!--T:8-->
+
''斜体''
italic</translate>''
+
 
</pre>
 
</pre>
 
|
 
|
''<translate><!--T:9-->
+
''斜体''
italic</translate>''
+
 
|-
 
|-
| <translate><!--T:10-->
+
| 粗体文字
Bold text</translate>
+
 
| <pre>
 
| <pre>
'''<translate><!--T:11-->
+
'''粗体'''
bold</translate>'''
+
 
</pre>
 
</pre>
 
|
 
|
'''<translate><!--T:12-->
+
'''粗体'''
bold</translate>'''
+
 
|-
 
|-
| <translate><!--T:13-->
+
| 粗斜体
Bold and italic</translate>
+
 
| <pre>
 
| <pre>
'''''<translate><!--T:14-->
+
'''''粗斜体'''''
bold & italic</translate>'''''
+
 
</pre>
 
</pre>
 
|
 
|
'''''<translate><!--T:15-->
+
'''''粗斜体'''''
bold & italic</translate>'''''
+
 
|-
 
|-
| <translate><!--T:19-->
+
| 注释掉wiki标记
Escape wiki markup</translate>
+
 
| <pre>
 
| <pre>
&lt;nowiki&gt;<translate><!--T:20-->
+
&lt;nowiki&gt;没有''标记''&lt;/nowiki&gt;
no ''markup''</translate>&lt;/nowiki&gt;
+
 
</pre>
 
</pre>
 
|
 
|
<translate><!--T:155-->
+
<nowiki>没有''标记''</nowiki>
<nowiki>no ''markup''</nowiki></translate>
+
 
|-
 
|-
! colspan="3" style="background: #ABE" | <translate><!--T:24-->
+
! colspan="3" style="background: #ABE" | 章节格式化-''只能放在一行的开头''
Section formatting – ''only at the beginning of the line''</translate>
+
 
|-
 
|-
| <translate><!--T:25-->
+
| 不同等级的标题
Headings of different levels</translate>
+
 
| <pre>
 
| <pre>
<translate>
+
== 2级标题 ==
== Level 2 == <!--T:26-->
+
  
=== Level 3 === <!--T:27-->
+
=== 3级标题 ===
  
==== Level 4 ==== <!--T:28-->
+
==== 4级标题 ====
  
===== Level 5 ===== <!--T:29-->
+
===== 5级标题 =====
  
====== Level 6 ====== <!--T:30-->
+
====== 6级标题 ======
</translate>
+
 
</pre>
 
</pre>
 
----
 
----
 
{{note|
 
{{note|
* <translate><!--T:31-->
+
* [[Special:MyLanguage/Help_talk:Formatting#Level_1|跳过1级标题]],那是页面名等级。
[[<tvar|lv1>Special:MyLanguage/Help_talk:Formatting#Level_1</>|Skip Level 1]], it is page name level.</translate>
+
* 一篇有4个或更多标题的文章将会自动创建一个[[wikipedia:Wikipedia:Section#Table of contents (TOC)|主题列表(目录)]]
* <translate><!--T:33-->
+
An article with 4 or more headings automatically creates a [[wikipedia:Wikipedia:Section#Table of contents (TOC)|table of contents]].</translate>
+
 
}}
 
}}
 
|
 
|
 
<!-- using HTML markup to avoid creating new sections -->
 
<!-- using HTML markup to avoid creating new sections -->
<translate>
+
<!-- 使用 HTML 标记来防止创建新的章节 -->
<!--T:35-->
+
<h2>2级标题</h2>
<h2>Level 2</h2>
+
  
<!--T:36-->
+
<h3>3级标题</h3>
<h3>Level 3</h3>
+
  
<!--T:37-->
+
<h4>4级标题</h4>
<h4>Level 4</h4>
+
  
<!--T:38-->
+
<h5>5级标题</h5>
<h5>Level 5</h5>
+
  
<!--T:39-->
+
<h6>6级标题</h6>
<h6>Level 6</h6>
+
</translate>
+
 
|-
 
|-
| <translate><!--T:40-->
+
| 分割线
Horizontal rule</translate>
+
 
| <pre>
 
| <pre>
<translate><!--T:41-->
+
之前文本
Text before</translate>
+
 
----
 
----
<translate><!--T:42-->
+
之后文本
Text after</translate>
+
 
</pre>
 
</pre>
 
|
 
|
<translate><!--T:43-->
+
之前文本
Text before</translate>
+
 
----
 
----
<translate><!--T:44-->
+
之后文本
Text after</translate>
+
 
|-
 
|-
| <translate><!--T:45-->
+
| 无序列表
Bullet list</translate>
+
 
|
 
|
 
<pre>
 
<pre>
<translate>
+
* 在行的开始
<!--T:46-->
+
* 使用一个 [[Wikipedia:asterisk|星号]] (*)
* Start each line
+
** 更多的星号表示
* with an [[Wikipedia:asterisk|asterisk]] (*).
+
*** 越来越深的层次。
** More asterisks give deeper
+
* 换行标记 <br />不会停止列表。
*** and deeper levels.
+
*** 但是越级将产生一个空行。
* Line breaks <br />don't break levels.
+
用任何其他字符在段首将停止列表。
*** But jumping levels creates empty space.
+
Any other start ends the list.
+
  
<!--T:160-->
+
* 结合无序列表
* combine bullet list
+
** 带定义
** with definition
+
::- 定义
::- definition
+
** 创建空档
** creates empty space
+
  
<!--T:161-->
+
* 结合无序列表
* combine bullet list
+
** 带定义
** with definition
+
*:- 定义
*:- definition
+
** 没有空档
** without empty spaces
+
  
<!--T:162-->
+
*无序列表
*bullet list
+
:- 定义
:- definition
+
:* 不创建空白的子列表
:* sublist that doesn't create empty
+
:* 定义后的空格
:* spaces after definition
+
</translate>
+
 
</pre>
 
</pre>
 
|
 
|
<translate>
+
* 在行的开始
<!--T:47-->
+
* 使用一个 [[Wikipedia:asterisk|星号]] (*)
* Start each line
+
** 更多的星号表示
* with an [[Wikipedia:asterisk|asterisk]] (*).
+
*** 越来越深的层次。
** More asterisks give deeper
+
* 换行标记 <br />不会停止列表。
*** and deeper levels.
+
*** 但是越级将产生一个空行。
* Line breaks <br />don't break levels.
+
用任何其他字符在段首将停止列表。
*** But jumping levels creates empty space.
+
Any other start ends the list.
+
  
<!--T:163-->
+
* 结合无序列表
* combine bullet list
+
** 带定义
** with definition
+
::- 定义
::- definition
+
** 创建空档
** creates empty space
+
  
<!--T:164-->
+
* 结合无序列表
* combine bullet list
+
** 带定义
** with definition
+
*:- 定义
*:- definition
+
** 没有空档
** without empty spaces
+
  
<!--T:165-->
+
*无序列表
*bullet list
+
:- 定义
:- definition
+
:* 不创建空白的子列表
:* sublist that doesn't create empty
+
:* 定义后的空格
:* spaces after definition
+
</translate>
+
 
|-
 
|-
| <translate><!--T:48-->
+
| 有序列表
Numbered list</translate>
+
 
|
 
|
 
<pre>
 
<pre>
<translate>
+
# 在行的开始
<!--T:49-->
+
# 使用一个 [[Wikipedia:Number_sign|井号]] (#)
# Start each line
+
## 更多的井号表示
# with a [[Wikipedia:Number_sign|number sign]] (#).
+
### 越来越深
## More number signs give deeper
+
### 的层次。
### and deeper
+
# 换行标记 <br /> 不会停止列表。
### levels.
+
### 但是越级将产生一个空行。
# Line breaks <br />don't break levels.
+
# 空行
### But jumping levels creates empty space.
+
# Blank lines
+
  
<!--T:50-->
+
# 将结束列表并开始一个新的列表。
# end the list and start another.
+
用任何其他字符在段首将停止列表。
Any other start also
+
ends the list.
+
</translate>
+
 
</pre>
 
</pre>
 
|
 
|
<translate>
+
# 在行的开始
<!--T:51-->
+
# 使用一个 [[Wikipedia:Number_sign|井号]] (#)
# Start each line
+
## 更多的井号表示
# with a [[Wikipedia:Number_sign|number sign]] (#).
+
### 越来越深
## More number signs give deeper
+
### 的层次。
### and deeper
+
# 换行标记 <br /> 不会停止列表。
### levels.
+
### 但是越级将产生一个空行。
# Line breaks <br />don't break levels.
+
# 空行
### But jumping levels creates empty space.
+
# Blank lines
+
  
<!--T:52-->
+
# 将结束列表并开始一个新的列表。
# end the list and start another.
+
用任何其他字符在段首将停止列表。
Any other start also
+
ends the list.
+
</translate>
+
 
|-
 
|-
| <translate><!--T:53-->
+
| 定义
Definition list</translate>
+
 
| <pre>
 
| <pre>
<translate>
+
;事物一
<!--T:54-->
+
: 事物一的定义
;item 1
+
;事物二
: definition 1
+
: 事物二的第一种定义
;item 2
+
: 事物二的第二种定义
: definition 2-1
+
: definition 2-2
+
</translate>
+
 
</pre>
 
</pre>
 
|
 
|
<translate>
+
;事物一
<!--T:55-->
+
: 事物一的定义
;item 1
+
;事物二
: definition 1
+
: 事物二的第一种定义
;item 2
+
: 事物二的第二种定义
: definition 2-1
+
: definition 2-2
+
</translate>
+
 
|-
 
|-
| <translate><!--T:56-->
+
| 缩进文本
Indent text</translate>
+
 
| <pre>
 
| <pre>
<translate>
+
:缩进1字符
<!--T:57-->
+
:: 缩进2字符
: Single indent
+
::::: 缩进多字符
:: Double indent
+
::::: Multiple indent
+
</translate>
+
 
</pre>
 
</pre>
 
----
 
----
{{Note|<translate><!--T:58-->
+
{{Note|但是这样可能导致阅读困难。}}
This workaround may harm accessibility.</translate>}}
+
 
|
 
|
<translate>
+
:缩进1字符
<!--T:59-->
+
:: 缩进2字符
: Single indent
+
::::: 缩进多字符
:: Double indent
+
::::: Multiple indent
+
</translate>
+
 
|-
 
|-
| <translate><!--T:60-->
+
| 列表的混合使用
Mixture of different types of list</translate>
+
 
|
 
|
 
<pre>
 
<pre>
<translate>
+
# 第一条
<!--T:61-->
+
# 第二条
# one
+
#* 第二条第一点
# two
+
#* 第二条第二点
#* two point one
+
# 第三条
#* two point two
+
#; 第三条事物一
# three
+
#: 第三条事物一的定义
#; three item one
+
# 第四条
#: three def one
+
#: 第四条定义
# four
+
#: 这种缩进列表不会换行
#: four def one
+
#: 并且常用来
#: this looks like a continuation
+
#: 替换&lt;nowiki><br />&lt;/nowiki>之中的<br />
#: and is often used
+
# 第五条
#: instead <br />of &lt;nowiki><br />&lt;/nowiki>
+
## 第五条第一款
# five
+
### 第五条第一款第一项
## five sub 1
+
## 第五条第二款
### five sub 1 sub 1
+
## five sub 2
+
</translate>
+
 
</pre>
 
</pre>
 
----
 
----
{{note|<translate><!--T:62-->
+
{{note|使用了<code>#:</code> 或者 <code>*:</code> 来换行常常带来阅读困难(显示问题)。}}
The usage of <code>#:</code> and <code>*:</code> for breaking a line within an item may also harm accessibility.</translate>}}
+
 
|
 
|
<translate>
+
# 第一条
<!--T:63-->
+
# 第二条
# one
+
#* 第二条第一点
# two
+
#* 第二条第二点
#* two point one
+
# 第三条
#* two point two
+
#; 第三条事物一
# three
+
#: 第三条事物一的定义
#; three item one
+
# 第四条
#: three def one
+
#: 第四条定义
# four
+
#: 这种缩进列表不会换行
#: four def one
+
#: 并且常用来
#: this looks like a continuation
+
#: 替换&lt;nowiki><br />&lt;/nowiki>之中的<br />
#: and is often used
+
# 第五条
#: instead <br />of <nowiki><br /></nowiki>
+
## 第五条第一款
# five
+
### 第五条第一款第一项
## five sub 1
+
## 第五条第二款
### five sub 1 sub 1
+
## five sub 2{{anchor|pre}}
+
</translate>
+
 
|-
 
|-
| <translate><!--T:64-->
+
| 预格式化文本
Preformatted text</translate>
+
 
| <pre>
 
| <pre>
<translate>
+
  在行首使用空格。文本被'''预格式化'''
<!--T:65-->
+
  并且'''''可以'''''
Start each line with a space.
+
使用''维基标记''
  Text is '''preformatted''' and
+
  ''markups'' '''''can''''' be done.
+
</translate>
+
 
</pre>
 
</pre>
 
----
 
----
{{note|<translate><!--T:66-->
+
{{note|这种办法常用来给文章的某部分排版。对字符进行格式化的维基标记仍然有效。}}
This way of preformatting only applies to section formatting. Character formatting markups are still effective.</translate>}}
+
 
|
 
|
<translate>
+
  在行首使用空格。文本被'''预格式化'''并且'''''可以'''''使用''维基标记''
  <!--T:67-->
+
Start each line with a space.
+
Text is '''preformatted''' and
+
''markups'' '''''can''''' be done.
+
</translate>
+
 
|-
 
|-
| <translate><!--T:68-->
+
| 预格式化文本块
Preformatted text blocks</translate>
+
| <pre> <nowiki><nowiki>在第一列使用空格,
| <pre> <translate><!--T:69-->
+
(在 <nowiki> 之前)。
<nowiki><nowiki>Start with a space in the first column,
+
(before the <nowiki>).
+
  
<!--T:70-->
+
您文本块的格式将保留。
Then your block format will be
+
 
    maintained.
+
这个功能对于拷贝代码块很有用:
+
This is good for copying in code blocks:
+
  
<!--T:71-->
 
 
def function():
 
def function():
 
     """documentation string"""
 
     """documentation string"""
  
     <!--T:72-->
+
     if True:
if True:
+
 
         print True
 
         print True
 
     else:
 
     else:
         print False</nowiki></nowiki></translate>
+
         print False</nowiki></nowiki>
 
</pre>
 
</pre>
 
|
 
|
  <translate><!--T:73-->
+
  <nowiki>在第一列使用空格,
<nowiki>Start with a space in the first column,
+
(在 <nowiki> 之前)。
(before the <nowiki>).
+
  
<!--T:74-->
+
您文本块的格式将保留。
Then your block format will be
+
    maintained.
+
  
<!--T:75-->
+
对于源代码的拷贝很有帮助:
This is good for copying in code blocks:
+
  
<!--T:76-->
 
 
def function():
 
def function():
 
     """documentation string"""
 
     """documentation string"""
  
     <!--T:77-->
+
     if True:
if True:
+
 
         print True
 
         print True
 
     else:
 
     else:
         print False</nowiki></translate>
+
         print False</nowiki></nowiki>
 
|}
 
|}
<translate>
+
== 段落 ==
== Paragraphs == <!--T:78-->
+
  
<!--T:79-->
+
Mediawiki忽略单个换行。要想另起一段,请留空一行(两个换行)。您也可以使用HTML标记<code>&lt;br /></code>强制换行另起一段。
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>&lt;br /></code>.
+
  
== HTML tags == <!--T:80-->
+
== HTML 标记 ==
  
<!--T:81-->
+
在 MediaWiki 中允许使用一些[[wikipedia:zh:HTML|HTML]]标记。比如<code>&lt;code></code>, <code>&lt;div></code>, <code><nowiki><span></nowiki></code> and <code><nowiki><font></nowiki></code>等。这些标记将在你插入它们的地方生效。
Some [[wikipedia:HTML|HTML]] tags are allowed in MediaWiki, for example <code>&lt;code></code>, <code>&lt;div></code>, <code><nowiki><span></nowiki></code> and <code><nowiki><font></nowiki></code>. These apply anywhere you insert them.
+
</translate>
+
 
{| class="wikitable"
 
{| class="wikitable"
! <translate><!--T:82-->
+
! 描述
Description</translate>
+
! width=40% | 您输入的
! width=40% | <translate><!--T:83-->
+
! width=40% | 输出效果
You type</translate>
+
! width=40% | <translate><!--T:84-->
+
You get</translate>
+
 
|-
 
|-
| <translate><!--T:85-->
+
| 插入标记 <br /> (在很多浏览器中显示为下划线)
Inserted <br />(Displays as underline in most browsers)</translate>
+
 
| <pre>
 
| <pre>
<ins><translate><!--T:86-->
+
<ins>插入标记</ins>
Inserted</translate></ins>
+
  
<translate><!--T:87-->
+
or</translate>
+
  
<u><translate><!--T:88-->
+
<u>下划线</u>
Underline</translate></u>
+
 
</pre>
 
</pre>
 
|
 
|
<ins><translate><!--T:89-->
+
<ins>插入标记</ins>
Inserted</translate></ins>
+
  
<translate><!--T:90-->
+
or</translate>
+
  
<u><translate><!--T:91-->
+
<u>下划线</u>
Underline</translate></u>
+
 
|-
 
|-
| <translate><!--T:92-->
+
| 删除标记 <br /> (在很多浏览器中显示为删除线)
Deleted <br />(Displays as strikethrough in most browsers)</translate>
+
 
| <pre>
 
| <pre>
<s><translate><!--T:93-->
+
<s>划掉</s>
Struck out</translate></s>
+
  
<translate><!--T:94-->
+
or</translate>
+
  
<del><translate><!--T:95-->
+
<del>删除线</del>
Deleted</translate></del>
+
  
 
</pre>
 
</pre>
 
|
 
|
<s><translate><!--T:96-->
+
<s>划去</s>
Struck out</translate></s>
+
  
<translate><!--T:97-->
+
or</translate>
+
  
<del><translate><!--T:98-->
+
<del>删除线</del>
Deleted</translate></del>
+
 
|-
 
|-
| <translate><!--T:99-->
+
| 等宽字体
Fixed width text</translate>
+
 
| <pre>
 
| <pre>
<code><translate><!--T:100-->
+
<code>源代码</code>
Source code</translate></code>
+
  
<translate><!--T:101-->
+
or</translate>
+
  
<tt><translate><!--T:157-->
+
<tt>等宽字体</tt>
Fixed width text</translate></tt>
+
 
</pre>
 
</pre>
 
|
 
|
<code><translate><!--T:154-->
+
<code>源代码</code>
Source code</translate></code>
+
  
<translate><!--T:102-->
+
or</translate>
+
  
<tt><translate><!--T:103-->
+
<tt>等宽字体</tt>
Fixed width text</translate></tt>
+
 
|-
 
|-
| <translate><!--T:104-->
+
| 引用的内容
Blockquotes</translate>
+
 
| <pre>
 
| <pre>
<translate><!--T:105-->
+
之前的文本
Text before</translate>
+
<blockquote>引用的内容</blockquote>
<blockquote><translate><!--T:106-->
+
之后的文本
Blockquote</translate></blockquote>
+
<translate><!--T:107-->
+
Text after</translate>
+
 
</pre>
 
</pre>
 
|
 
|
<translate><!--T:108-->
+
之前的文本
Text before</translate>
+
<blockquote>引用的内容</blockquote>
<blockquote><translate><!--T:109-->
+
之后的文本
Blockquote</translate></blockquote>
+
<translate><!--T:110-->
+
Text after</translate>
+
 
|-
 
|-
| <translate><!--T:111-->
+
| 评论
Comment</translate>
+
| <pre><!-- 这行是注释 -->
| <pre><translate>
+
注释只能编辑时在编辑区域内看到。</pre>
<!--T:112-->
+
<!-- This is a comment -->
+
Comments are visible only
+
in the edit zone.
+
</translate></pre>
+
 
|
 
|
<translate>
+
<!-- 这行是注释 -->
<!--T:113-->
+
注释只能编辑时在编辑区域内看到。
<!-- This is a comment -->
+
Comments are visible only
+
in the edit zone.
+
</translate>
+
 
|-
 
|-
| <translate><!--T:114-->
+
| 完全预格式化文本
Completely preformatted text</translate>
+
 
| <pre>
 
| <pre>
<pre><translate>
+
<pre>文本被'''预格式化'''并且''标记'' '''''不能''''' 起作用&lt;/pre></pre>
<!--T:115-->
+
Text is '''preformatted''' and
+
''markups'' '''''cannot''''' be done&lt;/pre>
+
</translate></pre>
+
 
----
 
----
{{note|<translate><!--T:116-->
+
{{note|要想在预格式化好的文本中使用标记,请参考前一个表格最后的''预格式化文本''。}}  
For marking up of preformatted text, check the "Preformatted text" entry at the end of the previous table.</translate>}}  
+
 
|
 
|
<pre><translate>
+
<pre>文本被'''预格式化'''并且''标记'' '''''不能''''' 起作用</pre>
<!--T:117-->
+
Text is '''preformatted''' and
+
''markups'' '''''cannot''''' be done
+
</translate></pre>
+
 
|-
 
|-
| <translate><!--T:118-->
+
| '''自定义'''预格式化文本
'''Customized''' preformatted text</translate>
+
 
| <pre>
 
| <pre>
<pre style="color: red"><translate>
+
<pre style="color: red">文本被某种样式'''预格式化'''并且''标记'' '''''不能''''' 起作用&lt;/pre></pre>
<!--T:119-->
+
Text is '''preformatted'''  
+
with a style and
+
''markups'' '''''cannot''''' be done
+
&lt;/pre>
+
</translate></pre>
+
 
----
 
----
{{note|<translate><!--T:120-->
+
{{note|CSS 样式能够用<code>style</code>属性来命名。}}
A CSS style can be named within the <code>style</code> attribute.</translate>}}
+
 
|
 
|
<pre style="color: red"><translate>
+
<pre style="color: red">文本被某种样式'''预格式化'''并且''标记'' '''''不能''''' 起作用</pre>
<!--T:121-->
+
Text is '''preformatted'''  
+
with a style and
+
''markups'' '''''cannot''''' be done
+
</translate></pre>
+
 
|}
 
|}
<translate>
+
续表:
<!--T:122-->
+
continued:</translate>
+
 
{| class="wikitable" | style="table-layout: fixed; width: 100%"
 
{| class="wikitable" | style="table-layout: fixed; width: 100%"
! <translate><!--T:123-->
+
! 描述
Description</translate>
+
! width=40% | 您输入的
! width=40% | <translate><!--T:124-->
+
! width=40% | 输出效果
You type</translate>
+
! width=40% | <translate><!--T:125-->
+
You get</translate>
+
 
|-
 
|-
| <translate><!--T:159-->
+
| '''默认'''预格式化文本有CSS属性(<code>white-space: pre-wrap;</code>)来根据可用宽度包裹文本
'''Default''' preformatted text has a CSS attribute (<code>white-space: pre-wrap;</code>) to wrap the text according to available width</translate>
+
 
| <pre>
 
| <pre>
 
<pre>
 
<pre>
<translate><!--T:127-->
+
这句长句子用来展示文本回行。这段额外句子使文本足够长。这段额外句子使文本足够长。
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.</translate>
+
 
&lt;/pre>
 
&lt;/pre>
 
</pre>
 
</pre>
 
|
 
|
 
<pre>
 
<pre>
<translate><!--T:128-->
+
这句长句子用来展示文本回行。这段额外句子使文本足够长。这段额外句子使文本足够长。
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.</translate>
+
 
</pre>
 
</pre>
 
|-
 
|-
| <translate><!--T:126-->
+
| '''自定义'''预格式化文本,带'''被禁用的'''文本包装
'''Customized''' preformatted text with '''disabled''' text wrapping</translate>
+
 
| <pre>
 
| <pre>
 
<pre style="white-space: pre;">
 
<pre style="white-space: pre;">
<translate><!--T:130-->
+
这句长句子用来展示文本回行(为了凑足长度而加的一句话,跟英文版不同)。后面的这句话使得这段文字更长。
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.</translate>
+
 
&lt;/pre>
 
&lt;/pre>
 
</pre>
 
</pre>
 
|
 
|
 
<pre style="white-space: pre;">
 
<pre style="white-space: pre;">
<translate><!--T:131-->
+
这句长句子用来展示文本回行(为了凑足长度而加的一句话,跟英文版不同)。后面的这句话使得这段文字更长。
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.</translate>
+
 
</pre>
 
</pre>
 
|}
 
|}
<translate>
 
  
== Inserting symbols == <!--T:132-->
+
== 插入符号 ==
  
<!--T:133-->
+
您可以用多种方式录入无法使用键盘直接录入的符号和其他特殊字符,许多[http://www.howtogeek.com/210824/how-to-quickly-type-special-characters-on-any-computer-smartphone-or-tablet/ 操作系统与浏览器]都存在允许您通过菜单或操作系统面板插入特殊字符的功能。另外,您也可以使用WikiEditor或[[VisualEditor/Special characters|VisualEditor]]来插入它们。
Symbols and other special characters not available on your keyboard can be inserted in a multitude of ways. Many [http://www.howtogeek.com/210824/how-to-quickly-type-special-characters-on-any-computer-smartphone-or-tablet/ Operating Systems and browsers] allow you to insert special characters through a menu option or Operating System panel. Additionally, you can use the WikiEditor or [[VisualEditor/Special characters|VisualEditor]] to insert them into the edit screen.
+
  
<!--T:166-->
+
如果以上方法都无法插入特殊字符,您可以用一种特殊字符序列来插入他们。那种序列被称为HTML实体。比如,'''&amp;rarr;'''就是一个序列(实体)。当这个序列被插入时,将会显示为<ins>右箭头</ins>HTML 符号 &rarr;'''&amp;mdash;'''插入位置将会显示为<ins>破折号</ins>(译者注:英文破折号) HTML 符号 &mdash;
As a last resort, you can use a special sequence of characters. Those sequences are called HTML entities. For example, the following sequence (entity) '''&amp;rarr;''' when inserted will be shown as <ins>right arrow</ins> HTML symbol &rarr; and '''&amp;mdash;''' when inserted will be shown as an <ins>em dash</ins> HTML symbol &mdash;. </translate>
+
 
----
 
----
{{note|<translate><!--T:134-->
+
{{note|鼠标悬停在任意字符上,就可以看到它产生的符号。有些在当前字体库中不可用的将显示为空格。}}  
Hover over any character to find out the symbol that it produces.  Some symbols not available in the current font will appear as empty squares.</translate>}}  
+
  
 
{| class="wikitable" align=center width=100%
 
{| class="wikitable" align=center width=100%
第852行: 第663行:
  
 
{| class="wikitable"
 
{| class="wikitable"
! <translate><!--T:135-->
+
! 说明
Description</translate>
+
! width=40% | 您输入的
! width=40% | <translate><!--T:136-->
+
! width=40% | 输出效果
You type</translate>
+
! width=40% | <translate><!--T:137-->
+
You get</translate>
+
 
|-
 
|-
| <translate><!--T:138-->
+
| 版权标记
Copyright symbol</translate>
+
 
|class=mw-code| &amp;copy;
 
|class=mw-code| &amp;copy;
 
|
 
|
 
:::'''&copy;'''
 
:::'''&copy;'''
 
|-
 
|-
| <translate><!--T:139-->
+
| 希腊字符Δ标记
Greek delta letter symbol</translate>
+
 
|class=mw-code|&amp;delta;
 
|class=mw-code|&amp;delta;
 
|
 
|
 
:::'''&delta;'''
 
:::'''&delta;'''
 
|-
 
|-
| <translate><!--T:140-->
+
| 欧元标记
Euro currency symbol</translate>
+
 
|class=mw-code|&amp;euro;
 
|class=mw-code|&amp;euro;
 
|
 
|
 
:::'''&euro;'''
 
:::'''&euro;'''
 
|}
 
|}
<translate>
+
查阅所有的 HTML 实体列表请前往维基百科的文章[[wikipedia:zh:XML与HTML字符实体引用列表|XML与HTML字符实体引用列表]]。同时, MediaWiki 支持两种非标准的实体引用序列: <code>&amp;רלמ;</code> <code>&amp;رلم;</code> 这些都与<code>&amp;rlm;</code>同等考虑,这是一个[[wikipedia:zh:右至左符号|右至左符号]](当右至左和左至右语言混合显示在同一页面时使用。)
<!--T:141-->
+
See the list of all HTML entities on the Wikipedia article [[wikipedia:List of HTML entities|List of HTML entities]]. Additionally, MediaWiki supports two non-standard entity reference sequences: <code>&amp;רלמ;</code> and <code>&amp;رلم;</code> which are both considered equivalent to <code>&amp;rlm;</code> which is a [[wikipedia:Right-to-left mark|right-to-left mark]]. (Used when combining right to left languages with left to right languages in the same page.)
+
  
== HTML tags and symbol entities displayed themselves (with and without interpreting them) == <!--T:142-->
+
==HTML标记和符号实体显示它们自身(不管是否解释)==
</translate>
+
 
:<tt>&amp;amp;euro;</tt> &nbsp;&rarr; '''&amp;euro;'''
 
:<tt>&amp;amp;euro;</tt> &nbsp;&rarr; '''&amp;euro;'''
  
:<tt>&lt;span style="color: red; text-decoration: line-through;"><translate><!--T:143-->
+
:<tt>&lt;span style="color: red; text-decoration: line-through;">待纠正的笔误&lt;/span></tt> &nbsp;&rarr; '''<span style="color: red; text-decoration: line-through;">待纠正的笔误</span>'''
Typo to be corrected</translate>&lt;/span></tt> &nbsp;&rarr; '''<span style="color: red; text-decoration: line-through;"><translate><!--T:144-->
+
Typo to be corrected</translate></span>'''
+
  
:<tt><translate><!--T:156-->
+
:<tt><nowiki>&amp;lt;span style="color: red; text-decoration: line-through;">待纠正的笔误</span></nowiki></tt> &nbsp;&rarr; '''&lt;span style="color: red; text-decoration: line-through;">待纠正的笔误&lt;/span>'''
<nowiki>&amp;lt;span style="color: red; text-decoration: line-through;">Typo to be corrected</span></nowiki></translate></tt> &nbsp;&rarr; '''&lt;span style="color: red; text-decoration: line-through;"><translate><!--T:145-->
+
=== 用于HTML的Nowiki ===
Typo to be corrected</translate>&lt;/span>'''
+
<<nowiki />nowiki /> 能禁用(HTML)标记:
<translate>
+
=== Nowiki for HTML === <!--T:146-->
+
</translate>
+
<<nowiki />nowiki /> <translate><!--T:147-->
+
can prohibit (HTML) tags:</translate>
+
 
* <nowiki><<</nowiki>nowiki />pre> &nbsp;&rarr; <<nowiki/>pre>
 
* <nowiki><<</nowiki>nowiki />pre> &nbsp;&rarr; <<nowiki/>pre>
<translate><!--T:148-->
+
''不是''&amp;符号会溢出:
But ''not'' &amp; symbol escapes:</translate>
+
 
* &<<nowiki />nowiki />amp; &nbsp;&rarr; &amp;
 
* &<<nowiki />nowiki />amp; &nbsp;&rarr; &amp;
<translate><!--T:149-->
+
像文本一样打印 &amp; 符号,用 "<tt>&amp;amp;</tt>" 替换 "&" 字符 (例: 输入 "<tt>&amp;amp;nbsp;</tt>", 结果是 "<tt>&amp;nbsp;</tt>")
To print &amp; symbol escapes as text, use "<tt>&amp;amp;</tt>" to replace the "&" character (eg. type "<tt>&amp;amp;nbsp;</tt>", which results in "<tt>&amp;nbsp;</tt>").
+
  
== Other formatting == <!--T:150-->
+
==其他格式==  
  
<!--T:151-->
+
在以上文本格式标记之外,我们还有其他格式的指南:
Beyond the text formatting markup shown hereinbefore, here are some other formatting references:
+
</translate>
+
  
 
* {{ll|Help:Links|nsp=0}}
 
* {{ll|Help:Links|nsp=0}}
<translate>
+
* [[Special:MyLanguage/Help:Lists|列表]]
<!--T:152-->
+
* [[<tvar|lists>Special:MyLanguage/Help:Lists</>|Lists]]
+
</translate>
+
 
* {{ll|Help:Images|nsp=0}}
 
* {{ll|Help:Images|nsp=0}}
<translate>
+
* 参考资料——参见[[Special:MyLanguage/Extension:Cite/Cite.php|扩展:Cite/Cite.php]]
<!--T:158-->
+
* [[Special:MyLanguage/Help:Tables|表格]]
* References - see [[<tvar|citephp>Special:MyLanguage/Extension:Cite/Cite.php</>|Extension:Cite/Cite.php]]
+
* [[<tvar|tables>Special:MyLanguage/Help:Tables</>|Tables]]
+
  
<!--T:153-->
+
您可以在[[Special:MyLanguage/Help:Contents|Help:Contents]]找到更多参考。
You can find more references at [[<tvar|help-contents>Special:MyLanguage/Help:Contents</>|Help:Contents]].
+
</translate>
+
 
[[Category:Help{{Langcat|Formatting}}|Formatting]]
 
[[Category:Help{{Langcat|Formatting}}|Formatting]]

2016年12月22日 (四) 14:19的最新版本

您可以使用维基标记符号来格式化输入的内容. 这些符号包括了诸如星号, 引号, 等号等在维基中有特殊功能的符号, 有时这些功能取决于它们所处的位置. 比如为了使一个词语变为 斜体 就需要使用一对双引号将它包裹起来, 就像 ''这样''.

文本格式化标记

描述 用户键入 输出效果
文字 (行中) 格式化 – 适用于任何地方
斜体文本
''斜体''

斜体

粗体文字
'''粗体'''

粗体

粗斜体
'''''粗斜体'''''

粗斜体

注释掉wiki标记
<nowiki>没有''标记''</nowiki>

没有''标记''

章节格式化-只能放在一行的开头
不同等级的标题
== 2级标题 ==

=== 3级标题 ===

==== 4级标题 ====

===== 5级标题 =====

====== 6级标题 ======

模板:Note

2级标题

3级标题

4级标题

5级标题
6级标题
分割线
之前文本
----
之后文本

之前文本


之后文本

无序列表
* 在行的开始
* 使用一个 [[Wikipedia:asterisk|星号]] (*)。
** 更多的星号表示
*** 越来越深的层次。
* 换行标记 <br />不会停止列表。
*** 但是越级将产生一个空行。
用任何其他字符在段首将停止列表。

* 结合无序列表
** 带定义
::- 定义
** 创建空档

* 结合无序列表
** 带定义
*:- 定义
** 没有空档

*无序列表
:- 定义
:* 不创建空白的子列表
:* 定义后的空格
  • 在行的开始
  • 使用一个 星号 (*)。
    • 更多的星号表示
      • 越来越深的层次。
  • 换行标记
    不会停止列表。
      • 但是越级将产生一个空行。

用任何其他字符在段首将停止列表。

  • 结合无序列表
    • 带定义
- 定义
    • 创建空档
  • 结合无序列表
    • 带定义
    - 定义
    • 没有空档
  • 无序列表
- 定义
  • 不创建空白的子列表
  • 定义后的空格
有序列表
# 在行的开始
# 使用一个 [[Wikipedia:Number_sign|井号]] (#)。
## 更多的井号表示
### 越来越深
### 的层次。
# 换行标记 <br /> 不会停止列表。
### 但是越级将产生一个空行。
# 空行

# 将结束列表并开始一个新的列表。
用任何其他字符在段首将停止列表。
  1. 在行的开始
  2. 使用一个 井号 (#)。
    1. 更多的井号表示
      1. 越来越深
      2. 的层次。
  3. 换行标记
    不会停止列表。
      1. 但是越级将产生一个空行。
  4. 空行
  1. 将结束列表并开始一个新的列表。

用任何其他字符在段首将停止列表。

定义
;事物一
: 事物一的定义
;事物二
: 事物二的第一种定义
: 事物二的第二种定义
事物一
事物一的定义
事物二
事物二的第一种定义
事物二的第二种定义
缩进文本
:缩进1字符
:: 缩进2字符
::::: 缩进多字符

模板:Note

缩进1字符
缩进2字符
缩进多字符
列表的混合使用
# 第一条
# 第二条
#* 第二条第一点
#* 第二条第二点
# 第三条
#; 第三条事物一
#: 第三条事物一的定义
# 第四条
#: 第四条定义
#: 这种缩进列表不会换行
#: 并且常用来
#: 替换<nowiki><br /></nowiki>之中的<br />
# 第五条
## 第五条第一款
### 第五条第一款第一项
## 第五条第二款

模板:Note

  1. 第一条
  2. 第二条
    • 第二条第一点
    • 第二条第二点
  3. 第三条
    第三条事物一
    第三条事物一的定义
  4. 第四条
    第四条定义
    这种缩进列表不会换行
    并且常用来
    替换<nowiki>
    </nowiki>之中的
  5. 第五条
    1. 第五条第一款
      1. 第五条第一款第一项
    2. 第五条第二款
预格式化文本
 在行首使用空格。文本被'''预格式化'''
 并且'''''可以'''''
 使用''维基标记''。

模板:Note

在行首使用空格。文本被预格式化并且可以使用维基标记
预格式化文本块
 <nowiki>在第一列使用空格,
(在 <nowiki> 之前)。

您文本块的格式将保留。

这个功能对于拷贝代码块很有用:

def function():
    """documentation string"""

    if True:
        print True
    else:
        print False</nowiki>
在第一列使用空格,
(在 <nowiki> 之前)。

您文本块的格式将保留。

对于源代码的拷贝很有帮助:

def function():
    """documentation string"""

    if True:
        print True
    else:
        print False</nowiki>

段落

Mediawiki忽略单个换行。要想另起一段,请留空一行(两个换行)。您也可以使用HTML标记<br />强制换行另起一段。

HTML 标记

在 MediaWiki 中允许使用一些HTML标记。比如<code>, <div>, <span> and <font>等。这些标记将在你插入它们的地方生效。

描述 您输入的 输出效果
插入标记
(在很多浏览器中显示为下划线)
<ins>插入标记</ins>

或

<u>下划线</u>

插入标记

下划线

删除标记
(在很多浏览器中显示为删除线)
<s>划掉</s>

或

<del>删除线</del>

划去

删除线

等宽字体
<code>源代码</code>

或

<tt>等宽字体</tt>

源代码

等宽字体

引用的内容
之前的文本
<blockquote>引用的内容</blockquote>
之后的文本

之前的文本

引用的内容

之后的文本

评论
<!-- 这行是注释 -->
注释只能编辑时在编辑区域内看到。

注释只能编辑时在编辑区域内看到。

完全预格式化文本
<pre>文本被'''预格式化'''并且''标记'' '''''不能''''' 起作用</pre>

模板:Note

文本被'''预格式化'''并且''标记'' '''''不能''''' 起作用
自定义预格式化文本
<pre style="color: red">文本被某种样式'''预格式化'''并且''标记'' '''''不能''''' 起作用</pre>

模板:Note

文本被某种样式'''预格式化'''并且''标记'' '''''不能''''' 起作用

续表:

描述 您输入的 输出效果
默认预格式化文本有CSS属性(white-space: pre-wrap;)来根据可用宽度包裹文本
<pre>
这句长句子用来展示文本回行。这段额外句子使文本足够长。这段额外句子使文本足够长。
</pre>
这句长句子用来展示文本回行。这段额外句子使文本足够长。这段额外句子使文本足够长。
自定义预格式化文本,带被禁用的文本包装
<pre style="white-space: pre;">
这句长句子用来展示文本回行(为了凑足长度而加的一句话,跟英文版不同)。后面的这句话使得这段文字更长。
</pre>
这句长句子用来展示文本回行(为了凑足长度而加的一句话,跟英文版不同)。后面的这句话使得这段文字更长。

插入符号

您可以用多种方式录入无法使用键盘直接录入的符号和其他特殊字符,许多操作系统与浏览器都存在允许您通过菜单或操作系统面板插入特殊字符的功能。另外,您也可以使用WikiEditor或VisualEditor来插入它们。

如果以上方法都无法插入特殊字符,您可以用一种特殊字符序列来插入他们。那种序列被称为HTML实体。比如,&rarr;就是一个序列(实体)。当这个序列被插入时,将会显示为右箭头的 HTML 符号 →;&mdash;插入位置将会显示为破折号(译者注:英文破折号) HTML 符号 —。


模板:Note

HTML symbol entities
Á á Â â ´ Æ æ À à Α α & Å å Ã ã Ä ä Β β ¦ Ç ç ¸ ¢
Χ χ ˆ © ¤ ° Δ δ ÷ É é Ê ê È è Ε ε Η η
Ð ð Ë ë ƒ ½ ¼ ¾ Γ γ > Í í Î î ¡ Ì ì Ι ι
¿ Ï ï Κ κ Λ λ « < ¯ µ · Μ μ  
¬ Ñ ñ Ν ν Ó ó Ô ô Œ œ Ò ò Ω ω Ο ο ª º Ø ø Õ õ Ö
ö Φ φ Π π ϖ ± £ Ψ ψ " » ® Ρ ρ
Š š § ­ Σ σ ς ¹ ² ³ ß Τ τ Θ θ ϑ Þ þ ˜
× Ú ú Û û Ù ù ¨ ϒ Υ υ Ü ü Ξ ξ Ý ý ¥ ÿ Ÿ Ζ ζ
说明 您输入的 输出效果
版权标记 &copy;
©
希腊字符Δ标记 &delta;
δ
欧元标记 &euro;

查阅所有的 HTML 实体列表请前往维基百科的文章XML与HTML字符实体引用列表。同时, MediaWiki 支持两种非标准的实体引用序列: &רלמ;&رلم; 这些都与&rlm;同等考虑,这是一个右至左符号。(当右至左和左至右语言混合显示在同一页面时使用。)

HTML标记和符号实体显示它们自身(不管是否解释)

&amp;euro;  → &euro;
<span style="color: red; text-decoration: line-through;">待纠正的笔误</span>  → 待纠正的笔误
&lt;span style="color: red; text-decoration: line-through;">待纠正的笔误</span>  → <span style="color: red; text-decoration: line-through;">待纠正的笔误</span>

用于HTML的Nowiki

<nowiki /> 能禁用(HTML)标记:

  • <<nowiki />pre>  → <pre>

不是&符号会溢出:

  • &<nowiki />amp;  → &

像文本一样打印 & 符号,用 "&amp;" 替换 "&" 字符 (例: 输入 "&amp;nbsp;", 结果是 "&nbsp;")。

其他格式

在以上文本格式标记之外,我们还有其他格式的指南:

您可以在Help:Contents找到更多参考。 [[Category:Help模板:Langcat|Formatting]]