Ongoing test page, with various mistakes to be sorted.
Intro
editThis essay/how-to deals with the referencing technique of inline help:shortened footnotes combined with a bibliography at the end. There are are several other ways of reffing: all have their pros and cons.
The techniques described here use {{template}}s, which in turn use Wikipedia's own CS1|2 software. This has been developed over the years by editors on English WP to display eg bibliographical information in a specific way. It is pretty much unique to WP, and using the templates results in what I call the 'Wikipedia style'. It takes modified elements of Chicago and AMA referencing, but you tend to only find it on WP. Many other WP language projects use CS1|2 as well, either 'as is' or in a modified form.
The term 'Harvard referencing' is heavily and widely misused on Wikipedia. The {{Harv}} template uses Harvard referencing, which anyway is relatively fluid and open to interpretation, unlike Chicago referencing or AMA referencing etc. I even think that inline parenthetical referencing may now be discouraged.
- TTD
Need to find out how to make two columns, one with code, one with result. Check out Help pages (argh)...
NB There are now so many errors resulting from various changes to the underlying templates, CS1/2 software etc., that most of this page doesn't make much sense any more, and won't unless I completely revise it. MinorProphet (talk) 11:55, 12 April 2021 (UTC)
- I think the best solution is probably to Blow it up and start over. MinorProphet (talk) 21:41, 11 May 2021 (UTC)
Latest finks
edit- Click on Special:preferences → Gadgets and disable 'Navigation popups' and enable 'Reference Tooltips'. This allows you to hover the mouse over an {{sfn}}, which pops up the short footnote in the {{reflist}}; hovering over this pops up the {{cite}} in the bibliography. Clicking on either of these takes you straight to the ref or cite, and you will have to click 'back'. This has recently been made the default.
- Copy and paste
importScript('User:Svick/HarvErrors.js'); // Backlink: [[User:Svick/HarvErrors.js]]
to your common.js page. This shows up various errors and warnings to do with {{sfn}}s, {{harv}}s and {{cite}}s. Very useful in debugging.
This extreme example (lol) demonstrates the relationship between various templates.
- The full list of authors etc. in a {{cite}} can be used for metadata purposes.
- {{sfn}} displays up to three authors etc., all of whom must appear in the {sfn}.
- For exactly four authors, {{sfn}} displays
|author1-last 'et al.'
- If there are more than four authors, the {{sfn}} should contain only the first four.
- More than four authors can be used in an {sfn}, but it generates a preview warning and displays
|author1-last 'et al.'
anyway. - If
|display-authors=
etc. is used, the {{cite}}and the {{sfn}} only ever display that number of authors: but the {{sfn}} must use all the authors, up to four. |ref={{harvid|any text|date}}
overrides the CITEREF, allowing complete freedom, but the {{sfn}} must use it.
- Some thoughts on small footnotes (sfn)
Intro
editThe {{sfn}} (short footnote) template uses the {{harv}} Harvard cataloguing system in conjunction with the {{cite}} template to automatically create inline references and to combine references to the same book and page.
It effectively replaces the <ref name=Whatever_0134> system as it creates its own ref name which you don't need to know or worry about. (Unless it all goes wrong...)
Why standard Footnotes don't work
editExample of an ordinary ref name:
Some text with an inline reference.<ref name=Smith_2009> Smith, Tim (2009). ''The Big Book of Interesting Stuff''. Huge Book Co. Houston, TX, p. 67.</ref>
, resulting in:- "Some text with an inline reference.[1]
Then you later refer to it with:
Some more text using the same source and page.<ref name=Smith_2009 />
, resulting in:- "Some more text using the same source and page."[1]
But then it gets a bit difficult if you want to refer to a different page:
Even more text referring to another page.<ref>Smith (2009), p. 42</ref>
, which gives you- "Even more text referring to another page."[2]
But the link to the original ref name with its page is broken. I think there are various ways of getting around the problem, but I feel that the {{sfn}} system is simpler and more consistent.
The sfn way
edit(Alas, WP can't cope with multiple {cite books} defined on the same page so multiple targets (3×) errors abound...)
Instead, do this:
- Create a 'Sources' sub-section under References.
- For each book you use, create a {{cite book}} in the Sources section. It only takes a few minutes with practice, but there are various mistakes to be made. The Wikipedia enhanced editor bar includes a Cite book button, but I prefer doing it manually.
Always use theFixed, {cite book} now automatically creates a CITEREF which {sfn} can link to.|ref=harv
parameter, or the {{sfn}} will show as a blue link, but will not open up in the 'Sources' section.- Now, just use {sfn}s int the main text instead of ref names,
{{sfn|Smith|2009|p=26}}
resulting in [1]. - You can also use {sfn}s with {{cite journal}} as long you have provided an
|last=
,|first=
and|date=
for any {{cite}} to work with {sfn}s.|date=
can include YYYY, MMYYYY or DDMMYY etc. To distinguish books etc. published in the same year, you can use|date=2018a
,|date=2018b
, etc. - For re-usable cites for newspapers I tend use to use {{cite news}} with a ref name. Many newspaper articles don't have an author (thus no good with {{harv}}), and even long articles only up take one or two pages.
- All parameter names use lower-case only, ie
|title=
and not|Title=
. - I use a hidden comment within {cite book} for the actual {Sfn} itself so I don't have to remember the details, I just scroll down to the 'Sources' section, and there it is. See 'Sources' sction below.
All the references to the same page(s) will now be automatically grouped together in the {{reflist}}, like this.{{sfn|Smith|2009|p=26}}
and you don't have to remember the instantly forgettable name you gave it three weeks ago.[1].
I tend to open the whole page for editing, rather than just a single section, because you need to have the 'Sources' section available all the time to add a new cite when you find it.[2] NB Compare with <ref>Smith (2009), p. 42</ref>
which results in this.[3]
References
- ^ a b Smith 2009, p. 26. sfn error: multiple targets (3×): CITEREFSmith2009 (help)
- ^ Smith 2009, p. 42. sfn error: multiple targets (3×): CITEREFSmith2009 (help)
- ^ Smith (2009), p. 42
- Sources
- Smith, Tim (2009). The Big Book of Interesting Stuff. Houston, TX: Huge Book Co.
{{cite book}}
: Unknown parameter|duplicate-ref=
ignored (help)
- {{cite book
|duplicate-ref=none
<!--{{sfn|Smith|2009|p=}} -->
|ref=harv
|last=Smith
|first=Tim
|title=The Big Book of Interesting Stuff
|publisher=Huge Book Co.
|place=Houston, TX
|year=2009
|url=http://waaark.com/error404}} - Fix this!
Example using ref names
editAccording to Jones something dull happened,<ref name=Jones_2009>Jones, Gary (2009). ''The Small Book of Dull Stuff''. London: Tiny Editions, p. 253.</ref> but Smith says it was interesting.<ref name=Smith_2009> Smith, Tim (2009). ''The Big Book of Interesting Stuff''. Huge Book Co. Houston, TX, p. 67.</ref>
Smith says other interesting things on the same page,<ref name=Smith_2009 /> and Jones drones on and on as usual <ref name=Jones_2009 />, but they both reach the same conclusion on another page.<ref>Smith (2009), p. 367.</ref><ref>Jones (2005), p. 458.</ref>
According to Jones,{{sfn|Jones|2005|p=253}} something dull happened, but Smith says it was interesting.{{sfn|Smith|2009|p=67}}
Smith says other interesting things on the same page,{{sfn|Smith|2009|p=67}} and Jones drones on and on as usual:{{sfn|Jones|2005|p=253}} but they both reach the same conclusion on another page."{{sfn|Smith|2009|p=367}}{{sfn|Jones|2005|p=458}}
References
- ^ a b Jones 2005, p. 253. sfn error: multiple targets (2×): CITEREFJones2005 (help)
- ^ a b Smith 2009, p. 67. sfn error: multiple targets (3×): CITEREFSmith2009 (help)
- ^ Smith 2009, p. 367. sfn error: multiple targets (3×): CITEREFSmith2009 (help)
- ^ Jones 2005, p. 458. sfn error: multiple targets (2×): CITEREFJones2005 (help)
- Sources
-
- Smith, Tim (2009). The Big Book of Interesting Stuff. Houston, TX: Huge Book Co.
- Jones, Gary (2005). The Small Book of Dull Stuff. London: Tiny Editions.
Other Stuff
edit- Big hint
You can't use an {sfn} within a normal inline ref, such as <ref>A little footnote with an {{sfn|Smith|2005|p=13}}.</ref>
This gives you an error:
- A little footnote with an {sfn} follows.[1]
The {{refn}} template allows you to use standard {{sfn}}s within a standard ref, eg
The following refn makes it easy to use {sfn}s in references.{{refn|This is a ref with an {sfn}.{{sfn|Jones|2005|p=57}} }}
← Don't forget to close the brackets for the refn.- The following refn makes it easy to use {sfn}s in references.[3]
...and {{efn}} similarly allows you to make notes containing other referencing types, such as Footnotes and {{sfn}}s:
{{efn|{efn} will make a lettered note by default, and you can put an {sfn} inside it.{{sfn|Jones|2005|p=73}} }}
, ← Don't forget to close the brackets for the efn... resulting in:[a]
Using {{harv}} (with brackets) or {{harvnb}} (without brackets) allows you to put references to {{cite}}ed books within <ref></ref> .
- "According to Jones (Jones 2005, p. 253) harv error: multiple targets (2×): CITEREFJones2005 (help), something happened, but Smith says (Smith 2009, p. 76) harv error: multiple targets (3×): CITEREFSmith2009 (help), it didn't."
References
- ^ This is a little footnote with an {sfn}.
- ^ Jones 2005, p. 57. sfn error: multiple targets (2×): CITEREFJones2005 (help)
- ^ This is a ref with an {sfn}.[2]
- ^ Jones 2005, p. 73. sfn error: multiple targets (2×): CITEREFJones2005 (help)
References for Intro
edit- Sources
- Smith, Tim (2009). The Big Book of Interesting Stuff. Houston, TX: Huge Book Co.
- Jones, Gary (2005). The Small Book of Dull Stuff. London: Tiny Editions.
- {{cite book
|ref=harv
<!--{{sfn|Smith|2009|p=}} -->
|last=Smith
|first=Tim
|title=The Big Book of Interesting Stuff
|publisher=Huge Book Co.
|place=Houston, TX
|year=2009
|url=http://waaark.com/error404}}
- {{cite book
|ref=harv
<!-- {{sfn|Jones|2005|p=}} -->
|last=Jones
|first=Gary
|title=The Small Book of Dull Stuff
|publisher=Tiny Editions
|place=London
|year=2005
|url=http://www.lego.com/404notfound}}
More info
editHow to avoid <ref name=> as much as possible, although other users are quite happy with it.
- Harvard refs (including {{cite book}} must have at least one author (
|last=
or|last1=
, or|editor-last1=
if no author named, plus a year or date with|date=
. - In the bibliography section: {{Cite book |ref=harv |last=Holmes |first=Darrell E. |title=West Virginia Blue Book 2012 |year=2012 |url=http://www.legis.state.wv.us/legisdocs/2012/bluebook/bluebook2012.pdf |publisher=West Virginia Senate}}, resulting in [1]
- If any of the info for the required parameters is missing, or if it yields an unwieldy result, or if you simply have a different preference, use e.g.: {{cite book |ref={{harvid|Unknown|n.d.|}} |title= etc...}} to override all other parameters in {{cite book}}, resulting in [2]
- For multiple authors, use {{cite book|last1=Holmes|last2=Watson|title=Reichenbach Revisited|year=1900| etc...}} and {{sfn|Holmes|Watson|1900|p=123}} in the text, thus.[3]
- If you forget the |ref=harv parameter, it will create a blue link which doesn't work, eg {{sfn|Silly|Old|Me|1897|p=1023}}[4]
- For everyone's convenience, in the Bibliography section use {{cite book |ref=harv<!-- {{sfn|Holmes|2014}} -->|title= etc...}} so you won't lose track of those pesky ref names, and other editors know where to find them.
- Both |ref=harv and |ref={{harvid|title|date}} create a CITEREF which is the equivalent of <ref name=>. (BTW, ref name= must have no spaces, but then you will almost certainly never need this horrendously tiresome and unwieldy method again.)
- Then you can use {{sfn|Constitution of West Virginia|1863|p=123}}[5] or {{harvnb|Holmes|2012}} Holmes 2012 or {{harv|Holmes|2012}} (Holmes 2012) or <ref>Ref with a cite {{harv|Constitution of West Virginia|1863|p=123}}</ref>[6] inline.
- If you have multiple references to the same page number, CITEREF will concatenate them into a single ref within the {{reflist}}, thus:[3]
- You cannot use {{sfn}}s within a <ref></ref>, but you *can* use {{harv}}; or even better use {{refn}}, which allows{{refn|group=n|Some text <ref>A normal reference</ref> etc}}[n 1]
- {{efn}} in conjunction with {{notelist}} automatically letters or (numbers) each ref.[a]
You must have an actual |year= parameter in your cite book entry. If you only use the date= parameter, as inThis seems to have been fixed,|date=1 January 2015
, this will appear next to the author's name in the output, eg Smith, John (1 January 2015). John Smith's Book etc.,{{sfn|Smith|2015|p=123)) but it sems to me that the {{harv}} functions can't extract the year and use it in {{sfn}} or {{harvid}} etc. So the cite book in the Sources section needs both |date= and |year= entry for sfns etc. to work. I find I rarely use the |date= parameter with {{cite book}}.|date=
will take any of YYYY, MMYYYY and DDMMYYYY, and I think even|date=Summer 1980
CHECK!- If there is no author, or if you want to refer to the source by a customised name rather than [9] create a custom name to be used within the ref, which points back to the main {{cite book}}, eg
{{cite book |ref={{harvid|Custom name|year|}} |last=Smith |etc...
and refer to it with{{sfn|Custom name|1902|p=81}}
- You must use the pages defined in
|p=
and|pp=
consistently. If you use both|p=47
and|pp=47
by mistake in different {sfn}s, it will generate an error.
- Harvard refs (including {{cite book}} must have at least one author (
- More info
See Number Theory bibliography (mea culpa) for cite book examples.
Still under construction
editTypical error messages
edit- Cite error: A list-defined reference named "FOOTNOTExxxxxx" is not used in the content (see the help page). where xxxxxx is the name and year of the harv ref.
- This means you are trying to use {{sfn}} in a [10], which cannot refer to itself. Use <ref> Some text {{tl|harv|}} or {{tl|harvnb}}</ref> instead.[11] or [12]
- Sources
- Smith; Jones; Robinson (ed.). A very long with many eds and/or a complicated title which needs abbreviating.
{{cite book}}
:|last3=
has generic name (help)
Section text
editSome things happened, and some other things didn't.[13] Time passed, and the same things occurred again and again,[14] despite other things happening.[14] In the end, everyone was satisfied and everyone went home.[15]
Refs, again
edit- {efn}s
- {refn}s
- ^ The use of refn allows you almost complete freedom to cite anywhere.[7].[8] See what I mean ?
- Cites
- ^ Holmes 2012, p. 123.
- ^ Unknown n.d., p. 123.
- ^ a b Holmes & Watson 1900, p. 123.
- ^ Silly, Old & Me 1897, p. 1023.
- ^ Constitution of West Virginia 1863, p. 123.
- ^ Ref with a cite (Constitution of West Virginia 1863, p. 123)
- ^ A normal reference within a ref.
- ^ This even allows nested references if your name is Mandelbrot!Cite error: A
<ref>
tag is missing the closing</ref>
(see the help page).</nowiki> within a {{refn}}, btw</ref> - ^ footnote
- ^ Smith 2012.
- ^ Smith et al. 1900.
- ^ Smith 2009, p. 15. sfn error: multiple targets (3×): CITEREFSmith2009 (help)
- ^ a b Smith 2009, p. 39. sfn error: multiple targets (3×): CITEREFSmith2009 (help)
- ^ Smith 2009, p. 46. sfn error: multiple targets (3×): CITEREFSmith2009 (help)
- Sources
- Smith, John (1 January 2015). John Smith's Book. No |year= parameter results in.
- Constitution of West Virginia. West Virginia Legislature. 1863. OCLC 767921701. Retrieved May 28, 2015.
{{cite book}}
: Cite has empty unknown parameter:|1=
(help) - Holmes, Darrell E. (2012). West Virginia Blue Book 2012 (PDF). West Virginia Senate.
- Silly, Adalbert; Old, Bartholomew; Me, Qiang Kai (1895). Heavens to Betsy! A collection of egregious euphemisms. Schlaraffenland: Catweazle and Mountjoy, Government Printing Office.