20200715
Wikipedia citations and bibliographies are a confusing mess. Most beginners suffice with the Visual Editor, which leads to bloated wikitext in the source editor. If you ever use the source editor and don’t want this bloat, I recommend an alternative: instead of inline references in the prose, keep references at the end of the page.
Any text that appears within <ref>
tags are collected and appear in place of the
<references/>
tag at the end of the article. In the example below, someone created a note with a
manually formatted reference.
<ref>Kress, Nancy, (2011), *Beggars in Spain:
It's a great book.</ref> The Novella*, Rockville, MD: Phoenix Pick, ISBN 978-1-6124-2057-8
The problems with this approach are that (1) finding such references scattered among prose makes the prose difficult
to read and edit, (2) should you want to change the formatting (e.g., make the title sentence case) you have to manually
edit it, and (3) should you need to cite the same thing later, you must duplicate it or use the name
attribute.
BTW: <ref>
isn’t really about references; it’s for endnotes more generally and it just so happens
most people use them for references.
Wikipedia does have a referencing system via templates that are indicated via a keyword appearing within double curly
braces, such as {{citation}}
. (It doesn’t matter if it capitalized or not.) This permits you to enter
reference data in a structured way in fields like
title
, publisher
, and year
which Wikipedia will expand and format; if it appears
within <ref>
tag it will also appear in an endnote.
<ref>{{Citation | last1 = Kress | first1 = Nancy
It's a great book.| title = Beggars in Spain: The Novella | year = 2011
| publisher = Phoenix Pick | location = Rockville, MD |
| isbn = 978-1-6124-2057-8}}</ref>
This is what citations from the VisualEditor will look like. Again, trying to edit and read wikitext in the source editor with these blobs scattered amongst the prose is awful.
I’m going to skip all the weird and confusing ways people cite things at Wikipedia.
Instead, I’m going to explain how sensible markup languages like LaTeX and Markdown do it and provide the Wikipedia analog.
If you remain in the source editor, or start with the Visual Editor and later clean things up in the source editor, I recommend you use a reference-defined list at at the bottom of the page. The Reference segregator can convert from inline to end-list for you—ask me if you need help!
Here, you use <ref name="Kress2011bsn"/>
in your prose, and at the bottom include the citation
templates within <ref>
tags (using the same key name
) within the
{{reflist}}
template.
<ref name="Kress2011bsn"/>
It's a great book.
== References ==
{{reflist|refs=
<ref name="Kress2011bsn">
{{citation
| first1 = Nancy
| last1 = Kress
| title = Beggars in Spain: The novella
| date = 2011
| isbn = 9781612420578
| publication-place = Rockville, MD
| publisher = Phoenix Pick
}}
</ref>
}}
To include a page number, you can complement the <ref>
tag with the {{rp}}
template.
<ref name="Kress2011bsn"/>{{rp|6}} This is my favorite page.
This will look like this: This is my favorite page.[1]:6
{{sfn}}
I don’t like page numbers appearing in citations rather than the bibliography. To counteract this, you can use a
similar notes at the end technique with the short-foot-note {{[sfn]}}
template. This requires you to
edit in the source editor most of the time,
which I do, but most people don’t. If I’m going to overhaul a page and convert its citations to this format, I use the
References Segregator.
{{sfn|Kress2011bsn|loc=p. 45}}
I love the description of the sleepless{{sfn|Kress2011bsn|loc=p. 78}}.
and of their philosophy
==References==
{{reflist|}}
==Bibliography==
{{refbegin}}
* {{citation | ref = {{sfnref|Kress2011bsn}}
| first1 = Nancy
| last1 = Kress
| title = Beggars in Spain: The novella
| date = 2011
| isbn = 9781612420578
| publication-place = Rockville, MD
| publisher = Phoenix Pick
| url = https://books.google.com/books?isbn=9781612420578
| accessdate = 14 July 2016
}}
{{refend}}
In this document I use the following terms: