Template:Ref

From Traveller Wiki - Science-Fiction Adventure in the Far future
Revision as of 04:36, 21 June 2020 by Philoserf (talk | contribs)
Jump to navigation Jump to search

Out of the box Mediawiki’s Cite extension[1] provides a <ref> tag and a <reference/> anchor.[2]

These can lead to a lot of typing:

This is Free Trader Beowulf,<ref name=s1>Classic Traveller, back cover</ref> calling anyone...Mayday, Mayday...we are under attack...main drive is gone<ref>The main drive here would be the maneuver drive</ref>...turret number one not responding...Mayday...losing cabin pressure fast...calling anyone...please help...This is Free Trader Beowulf...Mayday....<ref name=s1/>

And it looks like (also compare #Sources below):

This is Free Trader Beowulf,[3] calling anyone...Mayday, Mayday...we are under attack...main drive is gone[4]...turret number one not responding...Mayday...losing cabin pressure fast...calling anyone...please help...This is Free Trader Beowulf...Mayday....[3]

With this template that becomes:

This is Free Trader Beowulf,{{ref|Classic Traveller|s1|Starships}} calling anyone...Mayday, Mayday...we are under attack...main drive is gone{{ref|The main drive here would be the maneuver drive}}...turret number one not responding...Mayday...losing cabin pressure fast...calling anyone...please help...This is Free Trader Beowulf...Mayday....{{ref||s1|back cover}}

And it looks like (also compare #Sources below):

This is Free Trader Beowulf,[5]:Starships calling anyone...Mayday, Mayday...we are under attack...main drive is gone[6]...turret number one not responding...Mayday...losing cabin pressure fast...calling anyone...please help...This is Free Trader Beowulf...Mayday....[5]:back cover

It may not look like much savings in this simple example. Referencing gets even more complicated once you start citing pages.[7] In use in your articles it may be easier to use this template.

Template

{{ref
|
|
|
}}

Or

{{ref | | | }}

Example

{{ref
|Year [[1116]]
|y1116
|3-6
}}

Or

{{ref|Year [[1116]]|y1116|3-6}}

Lorem ipsum dolor sit amet.[8]:3-6

Syntax

1
reference content (required unless using a previously defined name, see example 5)
2
reference name (optional, unless using an existing named reference, see example 5)
3
page or page range (optional)

Usage

  1. {{ref|Reference1}} => This is Free Trader Beowulf.[9]
  2. {{ref|Reference2|name1}} => This is Free Trader Beowulf.[10]
  3. {{ref|Reference3|name2|3}} => This is Free Trader Beowulf.[11]:3
  4. {{ref|Reference4||22}} => This is Free Trader Beowulf.[12]:22
  5. {{ref||name1}} => This is Free Trader Beowulf.[10]
  6. {{ref||name2|4,6-9}} => This is Free Trader Beowulf.[11]:4,6-9

Sources

  1. Extension:Cite
  2. Help:Cite
  3. 3.0 3.1 Classic Traveller, back cover
  4. The main drive here would be the maneuver drive
  5. 5.0 5.1 Classic Traveller
  6. The main drive here would be the maneuver drive
  7. Citing different parts of the same source
  8. Year 1116
  9. Reference1
  10. 10.0 10.1 Reference2
  11. 11.0 11.1 Reference3
  12. Reference4