Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Help:Cite link labels

From Wikipedia, the free encyclopedia
This help page is ahow-to guide.
It explains concepts or processes used by the Wikipedia community. It is not one ofWikipedia's policies or guidelines, and may reflect varying levels ofconsensus.
This help page is mainly of technical interest to those who are creating new label styles. For the use of defined styles, refer toWP:CITELABEL.

When automatedfootnotes are used on Wikipedia pages, the default form of the footnote labels is[1],[2],[3], etc. Whengrouped footnotes are used, the labels are[name 1],[name 2], etc., wherename is the name given to the group. However, by using certain reserved group names, it is possible to make the labels appear in a different form, such as[i],[ii], etc. or[a],[b], etc.

Currently existing reserved group names are:

Label styles
Group nameStyleSample
decimalDecimal numbers1 2 3 4 5 6 7 8 9 10
lower-alphaAlpha, lower casea b c d e f g h i j
upper-alphaAlpha, upper caseA B C D E F G H I J
lower-greekGreek, lower caseα β γ δ ε ζ η θ ι κ
lower-romanRoman, lower casei ii iii iv v vi vii viii ix x
upper-romanRoman, upper caseI II III IV V VI VII VIII IX X


For example, a footnote which is to appear in the i, ii, iii... group can be written as:

  • <ref group=lower-roman>...</ref>

To generate the list of the footnotes in that group, use for example

Further examples, technical information and instructions for creating new reserved groups can be found below.

Technical

[edit]

Versionr66749 of theCite extension implements the ability to create styles for the cite link labels. Although the ability to create in-text cite label styles is unlimited, the matching reference list label styles are currently limited to those supported by the CSSlist-style-type property and to browser support.

Numeric labels

[edit]

The default in-text cite links and reference list backlinks use numeric labels automatically generated by the software. The labels are linked to provide a connection between the in-text cite and the reference list cite.

In this example, the super-scripted, in-text cites use a numeric label that matches the citation in the reference list:

MarkupRenders as
The Sun is pretty big,<refgroup="test">Miller, E:''The Sun'', page 23. Academic Press, 2005.</ref>but the Moon is not so big.<refgroup="test">Brown, R: "Size of the Moon",''Scientific American'', 51(78):46</ref>The Sun is also quite hot.<refgroup="test">Miller, E:''The Sun'', page 34. Academic Press, 2005.</ref>==References==<references/>

The Sun is pretty big,[test 1]but the Moon is not so big.[test 2]The Sun is also quite hot.[test 3]

References
  1. ^Miller, E:The Sun, page 23. Academic Press, 2005.
  2. ^Brown, R: "Size of the Moon",Scientific American, 51(78):46
  3. ^Miller, E:The Sun, page 34. Academic Press, 2005.

Cite link sequence styles

[edit]

Special group names have been defined which give alternative sequences, such as alphabetical and roman numerals, instead of Arabic numerals.

List of custom link label sequences

[edit]
Label styles
Group nameStyleSampleInterface page
decimalDecimal numbers1 2 3 4 5 6 7 8 9 10MediaWiki:cite link label group-decimal
lower-alphaAlpha, lower casea b c d e f g h i jMediaWiki:cite link label group-lower-alpha
upper-alphaAlpha, upper caseA B C D E F G H I JMediaWiki:cite link label group-upper-alpha
lower-greekGreek, lower caseα β γ δ ε ζ η θ ι κMediaWiki:cite link label group-lower-greek
lower-romanRoman, lower casei ii iii iv v vi vii viii ix xMediaWiki:cite link label group-lower-roman
upper-romanRoman, upper caseI II III IV V VI VII VIII IX XMediaWiki:cite link label group-upper-roman
error-testtestfirst second last!MediaWiki:cite link label group-error-test


The list below is created automatically bySpecial:PrefixIndex:

Markup restriction

[edit]

These sequences will only work properly when using the{{Reflist}} template. Although the<references /> tag supports thegroup= attribute, the footnotes will be displayed with the default Arabic numerals.

Creating cite label sequence styles

[edit]

Only admins can perform these actions. Non-admins may request additions on the talk page.

Currently, only styles supported by the CSSlist-style-type element may be added.[1] Not all styles are supported by all browsers— see the list below.[2]

  1. Decide on a name for the cite label style group name. It should match the associated CSSlist-style-type value. Quotes may not be used in values in{{Reflist}} therefore the namemust comply with the rules for HTML ids.[3]
  2. Discuss the new style on the talk page and gain consensus.
  3. Create the style list at MediaWiki:cite_link_label_group-groupname. Ensure each label is separated with a space. For example, createMediaWiki:cite link label group-lower-greek and populate it with the Greek alphabet. Then use "lower-greek" as the groupname.
  4. Redirect the talk page to thecentral discussion page by creating the talk page with#REDIRECT [[Help talk:Cite errors]].
  5. Edit{{Reflist}} and add thelist-style-type that styles the reference list.
  6. Add the style to the list above.
  7. If there are browser limitations, document them in the notice at the top of the page.

Browser support

[edit]

The in-text link labels will be retrieved from the MediaWiki label page, thus they should show regardless of browser. The reference list labels are styled by the CSSlist-style-type property. Not all browsers support alllist-style-type values. A browser that does not support the value will revert to the default decimal label in the reference list.

Error messages

[edit]

An error message indicates when there are more cites than there are link labels:

  • Ran out of custom link labels for group "$1" (see thehelp page).

This message is invoked throughMediaWiki:cite error no link label group; the help page is atHelp:Cite errors/Cite error no link label group.

Bugs

[edit]
  • T24265
    • The error message atMediaWiki:Cite error no link label group gets classed as a reference, so you can't use a wikilink in the message to link to a help page
    • The reference list is an ordered list and uses numbers that don't match the in-text cite labels

Classes and templates

[edit]

The{{Reflist}} uses the|group= parameter to select thelist-style-type style, and apply it to the.reflist class:

list-style-type:<!-- -->{{#switch:{{{group|}}}| lower-alpha| lower-greek| lower-roman={{{group}}}| #default= decimal}};
Note that the decimal style is handled by the defaultlist-style-type.

CSS rules inMediaWiki:Common.css then allow the.references class to inherit thelist-style-type:

div.reflistol.references{list-style-type:inherit;/* Enable custom list style types */}

References

[edit]
  1. ^"list-style-type".developer.mozilla.org.
  2. ^"List styles".QuirksMode.org.
  3. ^"HTML id Attribute".w3schools.com.
Policies and guidelines
General advice
Citing sources
Inline citations
Help for beginners
Advanced help
Footnote templates
Find references
Citation tools
(External links)
Retrieved from "https://en.wikipedia.org/w/index.php?title=Help:Cite_link_labels&oldid=1272551937"
Categories:
Hidden category:

[8]ページ先頭

©2009-2025 Movatter.jp