Help:Cite messages

From Mindpowered Wiki
Revision as of 20:45, 3 August 2020 by imported>Ruslik0 (Undid revision 970968896 by 2600:1700:7B2:8590:29EB:EAB:84A9:5B0 (talk)No links here)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The Wikipedia footnotes system uses the Cite.php software extension to generate references. MediaWiki messages are then used to format the display of the inline links and the references.

Elements

  • Inline link: the link shown by the content enclosed in <ref>...</ref>; shown in superscript and enclosed in brackets; coded in the MediaWiki message as $2
  • Backlink: the link shown in the references section; a single link is shown as a caret; coded as $2
  • Backlink label: multiple backlinks are shown as a caret followed alpha character labels
  • ID: a unique HTML ID that does not show; coded as $1
  • Reference content: the content enclosed in <ref>...</ref> that shows in the reference list; coded as $3

Messages

MediaWiki interface page Use Current
Cite reference link format inline link <syntaxhighlight lang="text" class="" id="" style="" inline="1">[$3]</syntaxhighlight>
  1. ref ID: Cite reference link prefix + reference name + numeric starting with 0
  2. backlink ID
  3. count to display
Cite references link many format reference with multiple backlinks <syntaxhighlight lang="text" class="" id="" style="" inline="1">
  • ^ $2 $3
  • </syntaxhighlight>
    1. backlink ID
    2. list of links
    3. text of note
    Cite references link many and <syntaxhighlight lang="text" class="" id="" style="" inline="1"> </syntaxhighlight>
    Cite references link many format <syntaxhighlight lang="text" class="" id="" style="" inline="1">$3</syntaxhighlight>
    1. ref ID
    2. numeric value to use as a backlink
    3. custom value to use as a backlink as defined in MediaWiki:Cite references link many format backlink labels
    Cite references link many format backlink labels backlink labels used in the reference list currently from a to azz
    Cite references link many sep <syntaxhighlight lang="text" class="" id="" style="" inline="1"> </syntaxhighlight>
    Cite references link one format reference with single backlink <syntaxhighlight lang="text" class="" id="" style="" inline="1">
  • ^ $3
  • </syntaxhighlight>
    1. backlink ID - used for creating the number order of the source list.
    2. ref ID - used to link back to the actual reference in the text
    3. text of note - text used above describing the source info
    Cite references prefix prefix for <references /> <syntaxhighlight lang="text" class="" id="" style="" inline="1">MediaWiki:Cite references prefix</syntaxhighlight>
    Cite references suffix suffix for <references /> <syntaxhighlight lang="text" class="" id="" style="" inline="1">MediaWiki:Cite references suffix</syntaxhighlight>
    Cite reference link key with num <syntaxhighlight lang="text" class="" id="" style="" inline="1">$1_$2</syntaxhighlight>
    1. key
    2. num
    Cite reference link prefix inline link prefix <syntaxhighlight lang="text" class="" id="" style="" inline="1">cite_ref-</syntaxhighlight>
    Cite reference link suffix inline link suffix <syntaxhighlight lang="text" class="" id="" style="" inline="1"></syntaxhighlight>
    Cite references link prefix reference list link prefix <syntaxhighlight lang="text" class="" id="" style="" inline="1">cite_note-</syntaxhighlight>
    Cite references link suffix reference list link suffix <syntaxhighlight lang="text" class="" id="" style="" inline="1"></syntaxhighlight>
    Cite references no link <syntaxhighlight lang="text" class="" id="" style="" inline="1">

    $2

    </syntaxhighlight>
    Cite references link many accessibility label accessibility label for screen readers <syntaxhighlight lang="text" class="" id="" style="" inline="1">Jump up to:</syntaxhighlight>

    Classes and CSS

    Class .reference formats the inline link; defined in Common.css

    <syntaxhighlight lang="css"> /* Ensure refs in table headers and the like aren't bold or italic */ sup.reference {

       font-weight: normal;
       font-style: normal;
    

    }

    /* Prevent line breaks in silly places:

      3) Ref tags with group names Cite error: A <ref> tag is missing the closing </ref> (see the help page).
    

    Named [1]

    Named reference used again [1]

    1. ^ a b This is a named reference

    Which shows as

    Unnamed [1]

    Named [2]

    Named reference used again [2]

    1. ^ This is an unnamed reference
    2. ^ a b This is a named reference

    Which renders as

    The MediaWiki messages are combined to form the HTML output

    <syntaxhighlight lang="html">

    Unnamed <a href="#cite_note-0" title="">[1]</a>

    Named <a href="#cite_note-named-1" title="">[2]</a>

    Named reference used again <a href="#cite_note-named-1" title="">[2]</a>

    1. <a href="#cite_ref-0" title="">^</a> This is an unnamed reference
    2. ^ <a href="#cite_ref-named_1-0" title="">a</a> <a href="#cite_ref-named_1-1" title="">b</a> This is a named reference

    </syntaxhighlight>

    If citation templates are used, they will inject other classes and ids into the HTML output.