Template:Ref
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
- {{ref|Reference1}} => This is Free Trader Beowulf.[9]
- {{ref|Reference2|name1}} => This is Free Trader Beowulf.[10]
- {{ref|Reference3|name2|3}} => This is Free Trader Beowulf.[11]:3
- {{ref|Reference4||22}} => This is Free Trader Beowulf.[12]:22
- {{ref||name1}} => This is Free Trader Beowulf.[10]
- {{ref||name2|4,6-9}} => This is Free Trader Beowulf.[11]:4,6-9
Sources
- ↑ Extension:Cite
- ↑ Help:Cite
- ↑ 3.0 3.1 Classic Traveller, back cover
- ↑ The main drive here would be the maneuver drive
- ↑ 5.0 5.1 Classic Traveller
- ↑ The main drive here would be the maneuver drive
- ↑ Citing different parts of the same source
- ↑ Year 1116
- ↑ Reference1
- ↑ 10.0 10.1 Reference2
- ↑ 11.0 11.1 Reference3
- ↑ Reference4