Open main menu
This page is a translated version of the page Help:Cite and the translation is 17% complete.

Other languages:
Deutsch • ‎English • ‎français • ‎italiano • ‎polski • ‎português do Brasil • ‎русский • ‎سنڌي • ‎中文 • ‎日本語 • ‎한국어

引用可以让你在一个页面中加入脚注。 详细内容请访问扩展:引用


这里是两个可以用于定义和显示脚注的HTML样式标签: <ref>, <references />


单次使用的脚注可以通过 <ref>...</ref> 来定义,举个例子:



<ref name="foo">内容</ref>


<ref name="foo" />


<ref group="foo">内容</ref>

名称和组可能不是一个整数。 引号是可选的,除非名称包括空格、标点符号或其他标记。 引用名称最好简单并且只使用ASCII字符组。

<references />

要在使用一些或全部 <ref>...</ref> 标签后显示参考列表,包括:

<references />

You can use <references /> multiple times on a page, e.g. to generate a reference list beneath a table.

To display footnotes defined in a group, include:

<references group="foo" />

The reference list can display automatically split over multiple columns, if there's enough width and there are enough references. On narrow screens, readers will see one or maybe two columns, whereas on wider screens they will get two or more. On wikis with the default configuration, this will happen on every page; on others, you need to activate it. To force it off for a particular use, include:

<references responsive="0" />

To force it on, instead include:

<references responsive />

Error messages

If the <ref> or <references /> tags are used incorrectly, the Cite extension will add an error message to the page. These messages will usually be in bold red text. This section lists the error messages and explains how to fix the problems.

Message Problem Solution
Messages in the body of the article
无效<ref>标签;未填name属性的引用必须填写内容 There is no content between the <ref>...</ref> tags. Either put content between the <ref> tags (<ref>content</ref>), or (if you're reusing a named reference that's been defined elsewhere in the article) use a single tag <ref name="ref_name" />.
打开的<ref>标签格式有误,或拥有一个错误的名称 A named reference has a malformed name. This is produced by a construct like <ref />, which makes no sense. As above, either create a full reference (<ref>content</ref>) or give the tag a name (<ref name="ref_name" />).
无效<ref>标签;name属性非法,可能是内容过长 A <ref> tag has too many parameters You can only specify two parameters, name= and group=. You can't, for instance, format a reference with <ref style="color:red;">content</ref>, or give it an id.
无效<ref>标签;name属性不能是单一的数字,请使用可辨识的标题 The name of the reference is a pure number. To avoid naming conflicts (as unnamed references are automatically assigned numbers as names) this is not allowed. Rename the reference to contain at least one letter (e.g. <ref name="foo" /> instead of <ref name="123" />). It's good practice to give references meaningful names anyway. Make sure that when changing the name you update all the tags that refer to that reference!
没有找到与</ref>对应的<ref>标签 A reference is missing the closing </ref>. Make sure that you are either using a closed pair of tags (<ref>content</ref>), or one single tag with a forward slash at the end to mark it as a single tag (<ref />)
Messages at the end of the article
无效<ref>标签;未给name属性为foo的引用提供文字 A single ref tag named "foo" (<ref name="foo" />) was invoked, but there is no full reference named "foo" (<ref name="foo">content</ref>) from which to get the reference text. You may have misspelt the reference name, or used special characters that look the same but are actually different. For instance, <ref name="foo-bar">content</ref> and <ref name="foo–bar" /> are not the same: one contains a hyphen while the other uses an ndash. To avoid this sort of error, try to stick to the characters available on the standard keyboard. Alternatively, the full reference may have been removed from the article with other content. In this case the text of the reference will be available in the page history, and you can convert the single <ref /> tag into a full reference.
MediaWiki:Cite error references invalid input (已移除) The <references /> tag is malformed. You need to ensure that the <references /> tag is properly formed.
<references>标签中的参数无效 Parameters such as style= or id= were passed to the <references /> tag.
MediaWiki:Cite error references invalid parameters group (已移除) The <references /> tag is malformed.
Cite error: <ref> tags exist, but no <references /> tag was found The <references /> tag was not included at the end of the article. Add the <references /> tag at the bottom of the article, below the last set of |ref= tags.
The <ref> tag immediately before <references /> does not have a closing </ref>. Fix the <ref> tag as explained above
There are <ref>...</ref> tags after <references />. Move the <references /> tag (or the {{reflist}} template) to below the last reference.
The use of <ref>...</ref> tags followed by a <references /> tag occurs more than once on the same page, but the <references /> tag is produced by a template (e.g. {{reflist}}). There is no solution other than avoiding the use of a template if possible.
Another tag extension used in the same page before the <references /> tag is buggy (calls Parser->parse() instead of Parser->recursiveTagParse()). Update/fix the buggy tag extension.
自定义回链标签耗尽,请在[[MediaWiki:Cite references link many format backlink labels]]中定义更多的标签。 A named reference was used more than 702 times, thereby exhausting the list of available labels ("a", "b"... "aa", "ab"... "zy", "zz"). It should probably never be necessary to cite one source this many times. Consider whether some cites can be combined or removed, or edit MediaWiki:Cite references link many format backlink labels to add additional labels (maybe "aaa", "aab", etc).
组名为“$1”的<ref>标签存在,但没有找到相应的<references group="$1"/>标签,或结尾的</ref>标签丢失 The group parameter was used in a reference, but the corresponding <references /> tag was not included with a group parameter Make sure that there is a <references /> tag on the page with the appropriate |group= parameter set.
The reference immediately before <references /> does not have a closing </ref>. Fix as for normal <references /> tags as explained above.
There are <ref>...</ref> tags using a group after <references />.
无效<ref>标签;name属性“$1”使用不同内容定义了多次 A named reference is defined multiple times with different content. Change all but one of the defined names (including all the appearances of this name without text).
Other messages
MediaWiki:Cite error key str invalid (已移除) Internal software error. These messages should never occur. If you see them in articles, please contact the MediaWiki developers, who may be able to resolve the situation. (These error messages have been removed.)
MediaWiki:Cite error stack invalid input (已移除)

Technical information

Internal messages are generated by the Cite.php extension and shown as a MediaWiki message. See the Parser hooks section of Special:Version for the installed version of Cite.php. These messages are in the MediaWiki namespace and can be modified only by admins.

Cite.php internal message MediaWiki message
Cite error 引用错误:$1
Cite error key str invalid (已移除)
Cite error ref no input 无效<ref>标签;未填name属性的引用必须填写内容
Cite error ref no key 打开的<ref>标签格式有误,或拥有一个错误的名称
Cite error ref numeric key 无效<ref>标签;name属性不能是单一的数字,请使用可辨识的标题
Cite error ref too many keys 无效<ref>标签;name属性非法,可能是内容过长
Cite error references invalid input (已移除)
Cite error references invalid parameters <references>标签中的参数无效
Cite error references invalid parameters group (已移除)
Cite error references no backlink label 自定义回链标签耗尽,请在[[MediaWiki:Cite references link many format backlink labels]]中定义更多的标签。
Cite references link many format backlink labels This is a list of the backlink labels used in the reference list, currently from a to zz
Cite error references no text 无效<ref>标签;未给name属性为$1的引用提供文字
Cite error included ref 没有找到与</ref>对应的<ref>标签
Cite error stack invalid input (已移除)
Cite error refs without references (已移除)
Cite error group refs without references 组名为“$1”的<ref>标签存在,但没有找到相应的<references group="$1"/>标签,或结尾的</ref>标签丢失
Cite error references duplicate key 无效<ref>标签;name属性“$1”使用不同内容定义了多次

See also