Jump to content

Help:Cite link labels

From Wikipedia, the free encyclopedia

When automated footnotes are used on Wikipedia pages, the default form of the footnote labels is [1], [2], [3], etc. When grouped footnotes are used, the labels are [name 1], [name 2], etc., where name 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 as follows:

  • lower-alpha (for a, b, c, etc.)
  • upper-alpha (for A, B, C, etc.)
  • lower-greek (for lower-case Greek letters; not supported by Internet Explorer versions below 8)
  • lower-roman (for i, ii, iii, etc.)
  • upper-roman (for I, II, III, etc.)
  • decimal (creates a group which uses the default decimal numbers)

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

  • <ref group=lower-roman>...(footnote text)...</ref>

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

  • {{reflist|group=lower-roman}}

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

Technical

[edit]

Version r66749 of the Cite.php 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 CSS list-style-type property.

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:

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

The Sun is pretty big,[1] but the Moon is not so big.[2] The Sun is also quite hot.[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.
[edit]

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

[edit]
Group name Style Interface page
default decimal labels MediaWiki:cite link label group-
decimal Decimal numbers MediaWiki:cite link label group-decimal
lower-alpha Alpha, lower case MediaWiki:cite link label group-lower-alpha
upper-alpha Alpha, upper case MediaWiki:cite link label group-upper-alpha
lower-greek Greek, lower case MediaWiki:cite link label group-lower-greek
lower-roman Roman, lower case MediaWiki:cite link label group-lower-roman
upper-roman Roman, upper case MediaWiki:cite link label group-upper-roman

The list below is created automatically by Special:PrefixIndex:

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 CSS list-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 CSS list-style-type value. Quotes may not be used in values in {{Reflist}} therefore the name must 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, create MediaWiki: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 the central discussion page by creating the talk page with #REDIRECT [[Help talk:Cite errors]].
  5. Edit {{Reflist}} and add the list-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.

CSS list-style-type values
CSS 2.1 list-style-type values[4]
none
  1. text
  2. text
  3. text
  4. text
Internet Explorer Firefox Safari Chrome Opera
6 7 8 9 10 3 4 5 4 5 9 10 11 12 10 11 12
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
disc
  1. text
  2. text
  3. text
  4. text
Internet Explorer Firefox Safari Chrome Opera
6 7 8 9 10 3 4 5 4 5 9 10 11 12 10 11 12
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
circle
  1. text
  2. text
  3. text
  4. text
Internet Explorer Firefox Safari Chrome Opera
6 7 8 9 10 3 4 5 4 5 9 10 11 12 10 11 12
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
square
  1. text
  2. text
  3. text
  4. text
Internet Explorer Firefox Safari Chrome Opera
6 7 8 9 10 3 4 5 4 5 9 10 11 12 10 11 12
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
decimal
  1. text
  2. text
  3. text
  4. text
Internet Explorer Firefox Safari Chrome Opera
6 7 8 9 10 3 4 5 4 5 9 10 11 12 10 11 12
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
decimal-leading-zero
  1. text
  2. text
  3. text
  4. text
Internet Explorer Firefox Safari Chrome Opera
6 7 8 9 10 3 4 5 4 5 9 10 11 12 10 11 12
No No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
lower-roman
  1. text
  2. text
  3. text
  4. text
Internet Explorer Firefox Safari Chrome Opera
6 7 8 9 10 3 4 5 4 5 9 10 11 12 10 11 12
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
upper-roman
  1. text
  2. text
  3. text
  4. text
Internet Explorer Firefox Safari Chrome Opera
6 7 8 9 10 3 4 5 4 5 9 10 11 12 10 11 12
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
lower-alpha
  1. text
  2. text
  3. text
  4. text
Internet Explorer Firefox Safari Chrome Opera
6 7 8 9 10 3 4 5 4 5 9 10 11 12 10 11 12
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
upper-alpha
  1. text
  2. text
  3. text
  4. text
Internet Explorer Firefox Safari Chrome Opera
6 7 8 9 10 3 4 5 4 5 9 10 11 12 10 11 12
Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
lower-greek
  1. text
  2. text
  3. text
  4. text
Internet Explorer Firefox Safari Chrome Opera
6 7 8 9 10 3 4 5 4 5 9 10 11 12 10 11 12
No No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
armenian
  1. text
  2. text
  3. text
  4. text
Internet Explorer Firefox Safari Chrome Opera
6 7 8 9 10 3 4 5 4 5 9 10 11 12 10 11 12
No No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
georgian
  1. text
  2. text
  3. text
  4. text
Internet Explorer Firefox Safari Chrome Opera
6 7 8 9 10 3 4 5 4 5 9 10 11 12 10 11 12
No No Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes


CSS2 list-style-type values dropped in CSS 2.1 but still supported by some browsers[5]
hebrew
  1. text
  2. text
  3. text
  4. text
Internet Explorer Firefox Safari Chrome Opera
6 7 8 9 10 3 4 5 4 5 9 10 11 12 10 11 12
No No No No No Yes Yes Yes Yes Yes Yes Yes Yes Yes No No No
cjk-ideographic
  1. text
  2. text
  3. text
  4. text
Internet Explorer Firefox Safari Chrome Opera
6 7 8 9 10 3 4 5 4 5 9 10 11 12 10 11 12
No No No No No Yes Yes Yes Yes Yes Yes Yes Yes Yes No No No
hiragana
  1. text
  2. text
  3. text
  4. text
Internet Explorer Firefox Safari Chrome Opera
6 7 8 9 10 3 4 5 4 5 9 10 11 12 10 11 12
No No No No No Yes Yes Yes Yes Yes Yes Yes Yes Yes No No No
katakana
  1. text
  2. text
  3. text
  4. text
Internet Explorer Firefox Safari Chrome Opera
6 7 8 9 10 3 4 5 4 5 9 10 11 12 10 11 12
No No No No No Yes Yes Yes Yes Yes Yes Yes Yes Yes No No No
hiragana-iroha
  1. text
  2. text
  3. text
  4. text
Internet Explorer Firefox Safari Chrome Opera
6 7 8 9 10 3 4 5 4 5 9 10 11 12 10 11 12
No No No No No Yes Yes Yes Yes Yes Yes Yes Yes Yes No No No
katakana-iroha
  1. text
  2. text
  3. text
  4. text
Internet Explorer Firefox Safari Chrome Opera
6 7 8 9 10 3 4 5 4 5 9 10 11 12 10 11 12
No No No No No Yes Yes Yes Yes Yes Yes Yes Yes Yes No No No


CSS3 list-style-type values (incomplete)[6]

CSS3 adds hundreds of new values, most not yet supported by major browsers.

upper-greek
  1. text
  2. text
  3. text
  4. text
Internet Explorer Firefox Safari Chrome Opera
6 7 8 9 10 3 4 5 4 5 9 10 11 12 10 11 12
No No Yes Yes Yes No No No No Yes Yes Yes Yes Yes No No No

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 CSS list-style-type property. Not all browsers support all list-style-type values. A browser that does not support the value will revert to the default decimal label in the reference list. See the table above for values and browser support.

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 the help page at Help:Cite errors/Cite error no link label group. ().


This message is invoked through MediaWiki:cite error no link label group; the help page is at Help:Cite errors/Cite error no link label group.

Bugs

[edit]

Classes and templates

[edit]

The {{Reflist}} uses the |group= parameter to select the list-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 default list-style-type.)

CSS rules in MediaWiki:Common.css then allow the .references class to inherit the list-style-type:

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

References

[edit]
  1. ^ "CSS list-style-type Property". w3schools.com.
  2. ^ "List styles". QuirksMode.org.
  3. ^ "HTML id Attribute". w3schools.com.
  4. ^ "Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification". W3C. December 7, 2010. {{cite web}}: Check date values in: |date= (help); no-break space character in |date= at position 9 (help)
  5. ^ "Cascading Style Sheets, level 2 CSS2 Specification". W3C. April 11, 2008. {{cite web}}: Check date values in: |date= (help); no-break space character in |date= at position 6 (help)
  6. ^ "CSS3 module: Lists". W3C. November 7, 2002. {{cite web}}: Check date values in: |date= (help); no-break space character in |date= at position 9 (help)