Template talk:Harvard citation/archive 1

Latest comment: 12 years ago by Gadget850 in topic Core


Citing a book without an author

How is this done with the Harvard parenthetical citation templates? I am a newbie to using reference templates, and it just so happens that the reference I need to make is one that does not seem to be covered. There appear to be several different reference template systems on Wikiepedia in different states of completion (in terms of referencing features). This (no author) situation could easily be handled with the <ref name="blah" > ... </ref>{{rp| pages}} system, but that won't produce the kind of notations I want in the text (it will make hyperlinked footnotes instead of parenthetical notes).

Conversion from qif to ParserFunctions

I've converted this template from using {{qif}} to m:ParserFunctions (PF). Due to a bug in PF, numbered template parameters do not work when PF is used. As a workaround, I'm using this template here as a front end converting from numbered parameters to named parameters. The logic of this template is implemented in {{Harvard citation 2}} using PF. --Ligulem 18:49, 24 April 2006 (UTC)

Omniplex found a simpler workaround for bugzilla:5678: use empty defaults everywhere: {{{1}}} → {{{1|}}} and so on. {{Harvard citation 2}} is no longer needed then. I've speedied it. --Ligulem 12:20, 4 May 2006 (UTC)

Optional brackets?

For certain purposes - e.g. the very clever referencing system at Rabindranath Tagore - it would be useful to be able to drop the surrounding brackets. Could this be done with a parameter? Or would it be better just to copy and paste the code to a new template with a name like {{Harvnb}}? TheGrappler 17:39, 28 May 2006 (UTC)

I would copy this template here and leave away the round brackets. This would be KISS. --Ligulem 18:14, 28 May 2006 (UTC)
There is now {{Harvard citation no brackets}}. A request: would editors who edit this template make parallel edits on that template too? TheGrappler 01:23, 31 May 2006 (UTC)

Page numbers

I asked this question at the helpdesk, but now think this is the correct page. If not, please pardon my error:

The Harvard citation page uses a colon:

  • When you can (or should) provide a page number, the convention is (Smith 2005: 73).

BTW this is the method I prefer. However the citation examples in the Harvard Reference Templates section on Wikipedia:Template_messages/Sources_of_articles show that templates use "p." or "pp.":

  • (Smith 1879, p. 289).

The format in the guideline differs from the format produced by the template. Why? Which is authoritative? If the guideline/template is authoritative, would someone please change the template/guideline? Does someone have the last word on this kind of issue? (Full disclosure: I would prefer that the template be changed, because of my preference stated above).

Using {{Harvard citation | Smith | 2006:182-187}} leaves the page numbers as part of the link, which is both counterintuitive and esthetically unappealing, IMHO. [PS: I just tried it out, and the link doesn't work if formatted that way. So the "counterintuitive and esthetically unappealing" comment is irrelevant anyhow.]

Thanks, Ling.Nut 04:51, 13 August 2006 (UTC)

Sorry to be a pest. I copied & trivially modified the Harvard citation template, new template named Template:Harvcol, to serve the purpose I was requesting. Thanks!

Ling.Nut 23:40, 13 August 2006 (UTC)

Made over 9000!!! new Harvard templates

I made three new Harvard citation templates. Not sure if there is some group overseeing these kinds of things. If I've gone beyond bold into reckless, please let me know.

  • Template:Harvcol. Harvard citation with colons for page numbers.
  • Template:Harvcolnb. Same as above, no brackets.
  • Template:Harvcoltxt. Same as above, can use for cites like "according to Smith (1999), the..." Links to Auth name & year. Looks a bit funny when page numbers are included.

Examples are at: Austronesian languages, Homeland section.

Thanks Ling.Nut 03:21, 15 August 2006 (UTC)

Many different authors and different books in one footnote?

Hello, I'm putting these templates to Finnish Civil War but I've come to one problem. For example , the strenghts have one fote but three authors and three different books. Then the link below doesn't work.

I tried this: ref name="Strength"> (Arimo, Manninen, Upton & 1991, 1992-1993, 1981, p. 289)</ref

but when I click the finished link it finds nothing. Hyperlinking between note and references, that's what I'm trying. --Pudeo (Talk) 12:25, 7 October 2006 (UTC)

Yeah well, now that I've tried many things I guess I need to split them to different notes and then put for example [1] [2] [4] in Strenghts for example? That's not better than to have them in one but no can do? Or hmm, could it be possible that at the notes to click the other name to get other reference that are still in the same note? And well, this explanation is quite confusing as it seems, check Finnish Civil War first note to see what I mean. --Pudeo (Talk) 13:02, 7 October 2006 (UTC)
To cite multiple works, you would need to use multiple templates. Also, you'd probably want to use Template:Harvnb. For example, I'd use ({{Harvnb|Arimo|1991}}; {{Harvnb|Manninen|1992-1993}}; {{Harvnb|Upton|1981}}), which would produce (Arimo 1991; Manninen & 1992-1993; Upton 1981).

Template is confused by five or more authors

This template gets confused by many authors. If you have five or more authors, then your use of this template today can only list the first four otherwise, the fifth author is taken to be the year. I feel this is a bug. This template should be documented to only take four or fewer authors and give some kind of error or skip to the last argument for the year in the case that five or more authors are given. Thanks. WilliamKF 21:02, 9 January 2007 (UTC)

Using Template:Harvard_citation without using Template:Harvard_reference?

I'm editing a page, Eicosanoid, which is currently referenced in Harvard reference style, but not using the Harvard templates. I'm considering doing a mass edit in order to get links from the inline cites down to the reference section, using the the Harvard templates.

Is it possible to use the Template:Harvard_citation without using the Template:Harvard_reference? I've got a lot of references using Template:Cite. Inline in the body of the article, there's unlinked text in Harvard style that calls them out. I want to hyperlink the body text to the references, but converting all those Cite templates into Harvard_reference seems daunting. Plus, since Harvard_reference lacks a DOI field, conversion would be lossy. David.Throop 15:17, 15 January 2007 (UTC)

Unfortunately, the Cite journal and Cite web templates do not have any kind of a linking functionality. Somebody should add that functionality to the other templates. COGDEN 19:43, 15 January 2007 (UTC)

FULLPAGENAME

Why does this template use {{FULLPAGENAME}} ? This causes the template to produce links as [[article#CITEREF...]] and as a consequence, the links do not work during edit preview. I think that if we remove FULLPAGENAME, we get links like [[#CITEREF...]] which do work during edit preview. However, I don't know the full details about how templates work and I'm probably missing an important detail. -- Jitse Niesen (talk) 05:23, 11 March 2007 (UTC)

My first attempt was disastrous; apologies to anybody who suffered the consequences. However, after a bit of testing (what I should have done immediately), I found a version does what I want. The links now also work during edit preview. -- Jitse Niesen (talk) 06:24, 29 March 2007 (UTC)


No longer true. Most "Cite" family templates now have linking capability. ---- CharlesGillingham (talk) 23:22, 16 August 2009 (UTC)

{{Documentation}} template

{{editprotected}}

Please replace {{/doc}} with {{Documentation}} in noinclude tag. Currently, it is confusing whether the documentation is subpaged. --219.165.188.51 (talk) 10:08, 1 February 2008 (UTC)

Done. -- Jitse Niesen (talk) 11:15, 1 February 2008 (UTC)

Please add french interwiki

[[fr:Template:Référence Harvard]] 220.135.4.212 (talk) 13:26, 22 April 2008 (UTC)

Getting the Template

Sorry, but where is it possible to get this template to install it in a MediaWiki system? I have been looking everywhere (WikiMedia, google) and was not able to get an answer. I looked in particular at WikiMedia extensions, but I am not even sure now that templates are extensions!. I apologize in the case I posted in the wrong place (in this let me know, and I will post this in the right place). Thanks. Nabeth (talk) 13:09, 4 March 2009 (UTC)

Well, looking a little bit more, I found some information about templates at: http://www.mediawiki.org/wiki/Help:Templates . I am still a little bit confused, althought I start to understand a little bit better. Templates do not seem to be extensions. And you may be able to get the code in a page such as Template:Harv. Things how however not cristal clear for me, and I did not manage to figure out how to proceed the last time I looked at this page. I will try again. Nabeth (talk) 13:23, 4 March 2009 (UTC)
It seem that indeed this section should be posted in MediaWiki (I will therefore stop to post here). To answer my previous question, there is indeed a kindof answer in: http://www.mediawiki.org/wiki/Help:Templates Copying from one wiki to another. However the explation is unclear. Nabeth (talk) 13:38, 4 March 2009 (UTC)
My mistake for all this. After looking more I have noticed that I totally missed the concept of the template, that is much more sophisticated (complicated?) than what I thought. I was able to import (copy and past) the many template pages. Now it works more or less, althought now I realise the setup of a mediawiki is more complicated than what I thought originally Nabeth (talk) 16:03, 4 March 2009 (UTC)

Bug 8Jul2009

There may be a bug since the value of the date appears to affect whether or not the link works. In the following example, the link from the citation in the Footnotes section, to the reference in the References section, will work for 1960, 1990 and 1999 but not for 1950, 1980, and 2000:



banana[1] peach[2] mango[3] kumquat[4] apple[5] orange[6]

References

  1. Pippin, J. S. (1999). Apples. {{cite book}}: Cite has empty unknown parameter: |coauthors= (help)
  2. Chef, J. S. (1980). Mangos. {{cite book}}: Cite has empty unknown parameter: |coauthors= (help)
  3. Valencia, J. S. (2000). Oranges. {{cite book}}: Cite has empty unknown parameter: |coauthors= (help)
  4. Chiquita, J. S. (1950). Bananas. {{cite book}}: Cite has empty unknown parameter: |coauthors= (help)
  5. Kent, J. S. (1990). Kumquats. {{cite book}}: Cite has empty unknown parameter: |coauthors= (help)
  6. Albert, J. S. (1960). Peaches. {{cite book}}: Cite has empty unknown parameter: |coauthors= (help)

Footnotes


--Bob K31416 (talk) 20:38, 8 July 2009 (UTC)

There is a bug in {{harv}}, it does not properly strip out spaces around the parameters, hence

[7] is not the same as [8] or [9], but that's not the cause of your problem. You had swapped the 1950 and 1980 in your example. I've revised it.LeadSongDog come howl 21:37, 8 July 2009 (UTC)

Thank you very much! I think the problem was having "date" instead of "year", which you had corrected and that clued me into the cause of the problem! To demonstrate, I changed "year" back to "date" for Chiquita. Also, in the article that I was trying to debug, Fermi-Dirac statistics, I only changed "date" to "year" in the Blakemore reference in the References section and it now works. I very much appreciate your help. --Bob K31416 (talk) 23:23, 8 July 2009 (UTC)
year: Year of authorship or publication. (Mandatory for use with links from Template:Harvard citation. In some situations, the template may be able to derive a year from the full date.)

This may explain why using date instead of year was working sometimes, and sometimes not working. --Bob K31416 (talk) 20:37, 9 July 2009 (UTC)

bug

There is a slight bug, namely sometimes the template produces an erroneous space between the author and the year. For example

{{harvard citations|txt=yes|first=W.V.O.|last=Quine|author1-link=Willard Van Orman Quine|year=1960|year2=1967}}

yields

W.V.O. Quine (1960, 1967)

note the two spaces (one too much) between Quine and the year. Can somebody with admin rights (or whatever is needed) fix this, please? It looks pretty odd. Thanks. Actually, also between 1960 and 1967 there is too much space. Jakob.scholbach (talk) 17:15, 9 February 2008 (UTC)

Sure it's not your browser? Looks fine to me (single space between author and (year), and single space between (year1, year2). Aside from that, this template is {{harvard citation}}, and you're using {{harvard citations}} (plural). Might be quicker and better to take the comment over there, if it's still a problem. Carre (talk) 13:48, 10 February 2008 (UTC)


OK, I will go there. Jakob.scholbach (talk) 09:06, 11 February 2008 (UTC)

Allow to use template cite paper

If this is not the case, it would be really usefull if the Template:Cite paper could also be used! EtudiantEco (talk) 15:45, 11 June 2008 (UTC)

I just discovered this template and find it really good! However, I wonder why the link to the reference is made on the name of the author (which lets think you will be redirect to his wiki page) and the year? Would it be possible rather to add an extra icon redirecting to the reference, and let the name and year free, so that they can be used as direct links? This would be more wikipedia like. Thanks! EtudiantEco (talk) 15:45, 11 June 2008 (UTC)

More than one reference in a single year

If an author has published more than one reference in a year, the standard approach is to add "a, b, c" to the year to differentiate them. The template handles that fine (Smith 2006a, p. 25)(Smith 2006b, p. 32) but we should include some instructions to editors who may not know how to handle the situation. ·:· Will Beback ·:· 17:21, 5 August 2008 (UTC)

CITEREF?

Why is "CITEREF" a mandatory thing to have as part of the citation id? Would it not be more wiki/KISS to simply have id=Smith2006 as an id vs CITEREFSmith2006? "CITEREF" is not at all needed AFAIK. I copied Template:Harvard citation no brackets to Template:Harvardnb and used this template at Geology of the Zion and Kolob canyons area to show that "CITEREF" is not needed. --mav (talk) 05:48, 22 August 2008 (UTC)

More than one author with the same last name

I have two authors, both with the last name Bushman, and both published their work in 2006. How do I differentiate between the two? --Descartes1979 (talk) 22:13, 7 September 2008 (UTC)

The standard way is to use lowercase letters after the date. For example, the first-published citation would be called 2006a, and the second would be 2006b. In the Citation template, you can set year=2006a and year=2006b, respectively. COGDEN 23:11, 11 November 2008 (UTC)


Done. For future reference, you could have done it yourself by editing Template:Harvard citation/doc or pressing the edit link after the text "This documentation is transcluded from Template:Harvard citation/doc". This should work on a lot of protected template pages. -- Jitse Niesen (talk) 17:31, 22 April 2008 (UTC)

Remove <cite>

{{editprotected}} Please sync with the sandbox. This removes the cite element, which doesn't do anything useful. (It's also questionable if its use here is even allowed by HTML standards.) TIA. —Ms2ger (talk) 18:55, 2 September 2009 (UTC)

  DoneJake Wartenberg 19:25, 2 September 2009 (UTC)

Citation templates: Use "year=" rather than "date=" with {{cite book}}

We currently say in Template:Harvard_citation#Use_with_citation_templates that citation templates can have either the "year=" or the "date=" parameter set.

However, as mentioned previously above under #Bug_8Jul2009, Harvard references when clicked on often fail to find the CITEREF anchor generated by a {{cite book}} reference using "date=" rather than "year=". If the {{cite book}} reference uses "year=" rather than "date=", it works fine.

Two examples:

  1. See the before and after versions of Peterborough Chronicle included in this diff: [1]. In the older version, "Ward & Trent 1907–21" and "Clark 1958" don't work when clicked on; after replacing "date=" with "year=" in the corresponding cite book references, they work fine.
  2. Before and after versions of Postman's Park: [2]. In the "before" version, Arnold 2006 and Price 2008 for example do not jump to their relevant entries in the Bibliography; after the substitution of year for date in the cite book templates, everything works.

I propose we mention this in Template:Harvard_citation#Use_with_citation_templates and recommend that people use year rather than date. Alternatively, if whatever causes the error could be looked into and fixed, that would be even better. Whichever way the problem is solved, it will make sense to perform the corresponding changes in the other Harvard templates derived from this one (harvnb etc.). --JN466 17:20, 11 September 2009 (UTC)

  Done [3] --JN466 21:04, 11 September 2009 (UTC)

Sorry to be so tardy about this, but Jayen's examples were both cases of misapplying the date parameter for partial dates (that in most cases, were simply years mislabled as dates). This is a fairly common error that bots should be able to check for and correct. There is, however, no reason we should discourage proper dates, particularly for periodical sources. We should prefer full dates, but also ensure that the date parameter is used for dates and the year parameter is used when the full date is not available. Revised the doc accordingly.LeadSongDog come howl 16:24, 5 November 2009 (UTC)
Better yet, give origyear precedence over year. This way, when you cite a work written in 1881, with a reedition of 2002, you don't have to put 2002, which looks odd, especially for centuries-old documents. --Jerome Potts (talk) 07:39, 2 October 2010 (UTC)
No, that falls afoul of wp:SAYWHEREYOUGOTIT. Cite the one you read.LeadSongDog come howl! 17:03, 2 October 2010 (UTC)
I read in Parenthetical referencing : "A reference to a republished work is cited with the original publication date either in square brackets (Marx [1867] 1967, p. 90) or separated with a virgule (Marx, 1867/1967, p. 90). The inclusion of the original publication year qualifies the suggestion otherwise that the publication originally occurred in 1967." This would be nice if implemented here. --Jerome Potts (talk) 22:04, 2 October 2010 (UTC)
Well, we do: but slightly differently. In the shortened footnote you give the year of publication of the edition which you consulted; in the full citation you put that same year in |year=, and if the work concerned is not a first edition, you put the actual edition into |edition= and the year of the first edition in |origyear=. So, in this case you would use
Some statement.{{harv|Marx|1967|p=90}}
*{{cite book |last=Marx |title=whatever |origyear=1867 |edition=umpteenth |year=1967 |ref=harv }}
which shows as:
Some statement.(Marx 1967, p. 90)
  • Marx (1967) [1867]. whatever (umpteenth ed.). {{cite book}}: Invalid |ref=harv (help)
--Redrose64 (talk) 12:21, 3 October 2010 (UTC)
I believe that I may have found why the linking sometimes fails when the {{citation}} or {{cite book}} uses |date=, and that parameter contains only a year. In brief, the template parser treats |date=2002 as the time 20:02. Further information at Template talk:Citation#Incorrectly rendered anchor tags. --Redrose64 (talk) 20:17, 2 October 2010 (UTC)

We should never render invalid HTML

A change to the cite-family templates is being discussed at Template talk:Citation/core #We should never render invalid HTML. This change would affect pages that use Harvard templates to refer to citations generated by cite-family templates. Further comments there are welcome. Eubulides (talk) 19:37, 21 September 2009 (UTC)

n.d.

{{editprotected}} I'm not sure how this could be done, but can some admin with template skills allow references with no date? When you try to use |date=n.d. it does not work. Nikkimaria (talk) 17:05, 6 July 2010 (UTC)

If there is no date, leave it out of the citation template entirely, and don't put the year into the {{harv}} either. Something like this:
Some statements {{harv|Doe|p=123}}
*{{cite book |last=Doe |first=John |title=A book |ref=harv }}
This produces:
Some statements (Doe, p. 123)
Click the "Doe" bluelink - in Firefox or Chrome, you'll see the full citation highlight in blue. --Redrose64 (talk) 21:54, 6 July 2010 (UTC)

Authors who have published more than one work in the same year

Hello,

The Help page says : For authors who have published more than one work in the same year, the standard way to differentiate such works is to put a lowercase letter after the year (e.g. year=2006a and year=2006b).

However, I am afraid this is not workable. I am afraid that if I write |year=2006a in template:cite book, some readers will read something like (Smith, Booktitle, London, London University Press, 2006a), interpret this as a typing mistake and remove the "a". After that "a" has been removed, the link in my citation will become a dead link.

Couldn't we have a really safe way to make such citations for authors having two books or articles published within the same year ? Teofilo talk 07:15, 1 October 2010 (UTC)

But that is actually the standard; see Wikipedia:Parenthetical referencing and Parenthetical referencing. ---— Gadget850 (Ed) talk 12:21, 1 October 2010 (UTC)
Well, I after some thought, I think it is probably workable with Template:Harvard citations, using |year=2006a|ref=CITEREFSmith2006a together with template:Cite book with |year=2006|ref=CITEREFSmith2006a . Teofilo talk 16:26, 1 October 2010 (UTC)
Please note that you don't need to construct your own |ref=CITEREFSmith2006a - it's done automatically by {{citation}} if |ref= is omitted, and by {{cite book}} when |ref=harv is provided.
If you don't want the suffix letter to show in the full citation, but are prepared for it to show in the shortened footnote, and you are able to obtain the month (or better still, day and month) of publication, you can do this:
First statement.{{harv|Smith|2006a|p=12}} Second statement.{{harv|Smith|2006b|p=34}}
*{{cite book |last=Smith |first=J. |title=A book |date=January 2006 |year=2006a |ref=harv }}
*{{cite book |last=Smith |first=J. |title=Another book |date=July 2006 |year=2006b |ref=harv }}
which shows as:
First statement.(Smith 2006a, p. 12) Second statement.(Smith 2006b, p. 34)
  • Smith, J. (January 2006). A book. {{cite book}}: Invalid |ref=harv (help)CS1 maint: date and year (link)
  • Smith, J. (July 2006). Another book. {{cite book}}: Invalid |ref=harv (help)CS1 maint: date and year (link)
--Redrose64 (talk) 19:24, 1 October 2010 (UTC)
You do realize that this relies entirely on the HTML link between the in-text citation and the reference list citation? It looses the visual link, especially when printed. ---— Gadget850 (Ed) talk 04:38, 2 October 2010 (UTC)
Yes I do realise that, that is why I put "If you don't want the suffix letter to show in the full citation, but are prepared for it to show in the shortened footnote". --Redrose64 (talk) 20:03, 2 October 2010 (UTC)
The use of letter suffixes on dates is so standard that removing them (does this happen often?) would be the mark of a really inexperienced editor. For which problem the necessary corrective is to educate the editor. - J. Johnson (JJ) (talk) 20:05, 1 October 2010 (UTC)

When printed in books, this template pollutes the index of books. This is because there is a section link somewhere in that template (aka [[#CITEREF|Foobar]]), and the index is generated using the links of articles. Would it be possible to create a version of this template without the section link? Aka, one that displays Smith 2006, p.25, rather than Smith 2006, p.25?

I can upload the code at {{Harvard citation/Print}} once it's written (or anyone else with user account creation rights, as these pages are blacklisted for the moment). Headbomb {ταλκκοντριβς – WP Physics} 05:33, 28 February 2010 (UTC)

Why does it mess up the index? Maybe there's something we can do with CSS, rather than using a separate template. COGDEN 17:45, 23 April 2010 (UTC)
I explained it above: "This is because there is a section link somewhere in that template (aka [[#CITEREF|Foobar]]), and the index is generated using the links of articles." Anyway, it's been fixed now (see the /Print template).Headbomb {talk / contribs / physics / books} 21:34, 23 April 2010 (UTC)
However, I've not yet figured how to fix this in {{Harvard citations}} (see the talk page over there). Headbomb {talk / contribs / physics / books} 21:40, 23 April 2010 (UTC)

Help

These references don't seem to be working on this article Atlantic Coast Conference Men's Basketball Coach of the Year (see references 3 and 8) and they are holding up a FL nomination (see Wikipedia:Featured list candidates/Atlantic Coast Conference Men's Basketball Coach of the Year/archive1. Does anyone know how to fix this? Remember (talk) 20:31, 14 May 2010 (UTC)

How to cite a newspaper

In the Harvard Reference template, the page gives an example of a newspaper reference, so here we need an example of citing such a reference. I feel just doing author (the byline) year is not accurate and think that a cite using the name of the newspaper is more valuable. WilliamKF 20:35, 2 February 2007 (UTC)

I think if there is a named author of a newspaper article, or the author is the paper's editor, they probably should be cited as the author. For example, if you cite to an analysis by Lou Dobbs, it's more important to the reader to know that Dobbs wrote it, rather than what paper it's in. In other cases, however, where the article lists the author as merely "Associated Press" or "United Press International", I guess we have two options, either to treat it as a corporate author, or modify the Harvard reference template to allow linking by the name of the periodical. I'm not sure how best to implement that, however. There has to be some "signal" in the parameters of the Harvard reference template telling it that it will be cited by newspaper title rather than author. COGDEN 23:27, 2 February 2007 (UTC)
This issue is partially documented, at least. See Template:Harvard citation documentation#No author name in citation template. Not really resolved until Wikipedia develops guidelines for these. Could use a section "newspapers" under "Possible issues", and describe how to use the name of the paper. ---- CharlesGillingham (talk) 21:17, 16 February 2011 (UTC)

includeonly

Please surround the template code with "<includeonly></includeonly>" to remove the ugly "([[#CITEREF|]])" which appears when reading the template's documentation. BernardM 11:55, 17 June 2007 (UTC)

Spaces in examples

The examples have blank spaces surrounding the parameter. However, entering this info so spaced creates links that duplicate the spaces, like #CITEREF_Asimov_2005, breaking the link to the {{Citation}}. Would it be okay to remove these in the examples? I can see the value of italics in the parameter descriptions, but the spaces introduce problems for editors. / edg 02:43, 14 September 2007 (UTC)

  Fixed. ---- CharlesGillingham (talk) 21:14, 16 February 2011 (UTC)

different caption

Is it possible to have a Harvtxt or similar template showing a caption which is different from the author's name and year? I want something like

This was shown in EGA IV

the latter redlink pointing to the reference

Use {{Harvnb|EGA IV}} with ref={{harvid|EGA IV}} in the template. Like so:
EGA IV
  Resolved
---- CharlesGillingham (talk) 22:15, 14 January 2011 (UTC)

From the reference to the text?

Is there a way, using this template, to go from the reference list to the point or points in the text where a particular text is cited? Goochelaar (talk) 00:32, 4 February 2008 (UTC)

If you use the {{harv}} template(s) inside <ref></ref> tags, then you end up with regular inline citations, with the harvard citation where ever you put the <references /> tag (or {{reflist}}. See this for an example. Is this what you mean? Carre (talk) 08:33, 4 February 2008 (UTC)
Thanks, but it is not exactly what I had in mind. I would like on the one hand to have in the text references of the form "(Smith, 2003)", which are useful to see at a glance the authors being cited, and on the other hand to be able to notice something interesting in the bibliography and from there find where it is cited within the text. Am I asking too much? Goochelaar (talk) 09:26, 4 February 2008 (UTC)
I get you - so, like you can jump forward from the {{harv}} in the text to the bibliography, you want a back-link. It should certainly be possible (although not in the current version) - after all, regular inline citations do it already. Any such change would need to be coordinated between the harv family of templates and whatever citation template (probably {{citation}}, since these already work with each other to produce the forward link). The main problem I can see would be the sheer number of back-links that may be associated with a single bibliography entry. Carre (talk) 09:35, 4 February 2008 (UTC)
Cite does this by creating unique anchors for each in-text citation, the creating a backlink labels that link to the anchors. Cite.php does this through the software extension— I don't think we can do this in a template. There is a proposed extension for Harvard references, but it seems to have stalled. ---— Gadget850 (Ed) talk 18:30, 24 February 2011 (UTC)

URL for loc or page

Have editors considered adding a URL parameter for the loc or page, to allow readers to connect directly with the cited source material? This is increasingly possible nowadays, with online textbooks and resources like Google books. They allow not only links to specific pages, but the highlighting of source material. See e.g. Endomembrane system, where this is done by hand. Such a parameter would enable the template to help out with issues such as urlencoding and plainlinks. Geometry guy 22:33, 10 November 2008 (UTC)

I've made a separate {{Google books quote}} template as first step towards this idea. This helps editors provide a highlighted quote to Google books for a quotation (assuming it is available there) that they want to be easily verifiable. Geometry guy 23:01, 11 November 2008 (UTC)
It's always possible to use something like
{{harv|Smith|2006|p=[http://en.wikipedia.org 33]}}
which renders as (Smith 2006, p. 33). We could add |url= for this, but it's not really any simpler. ---- CharlesGillingham (talk) 10:41, 22 November 2010 (UTC)

More than one reference in a single year for an author

Is there a more elegant way to solve this issue than putting letters after the year in the citation? It looks odd to readers to have 2006a and 2006b in the citations for what is really just an internal hack to get the template to differentiate sources. BuddingJournalist 02:39, 27 December 2008 (UTC)

This is an established way of disambiguating references used by printed journals etc since long before the internet. jnestorius(talk) 23:13, 17 October 2009 (UTC)
  Resolved

This is documented in detail. ---- CharlesGillingham (talk) 21:12, 16 February 2011 (UTC)

Fragile code mishandles spaces in parameters

Isn't there a way to strip leading and trailing spaces so that the same result would be generated by both
{{harvnb | Jones | Smith | 2008 | p=1}}
and
{{harvnb|Jones|Smith|2008|p=1}}
instead of having
Jones & Smith 2008, p. 1
and
Jones & Smith 2008, p. 1
which look the same, but have differing links
#CITEREF_Jones_Smith_2008
and
#CITEREFJonesSmith2008
LeadSongDog (talk) 05:48, 28 January 2009 (UTC)

It appears at first that the answer may relate to meta:Help:Newlines_and_spaces#Stripping on expansion, which describes different behaviour for named and unnamed parameters, but adding "year=" changes nothing. Comparing
Jones & Smith, p. 1
and
Jones & Smith, p. 1
which look the same, they too have differing links
#CITEREF_Jones_Smith_2008
and
#CITEREFJonesSmith2008


so the naming is not the issue. Is it the stripping or the expansion?LeadSongDog (talk) 16:35, 30 January 2009 (UTC)

Agreed, that's the exact problem I have found when using the template. Wizard191 (talk) 02:16, 7 February 2009 (UTC)
Whew! Thanks for the reply, I was beginning to think I must be hallucinating.LeadSongDog (talk) 03:48, 7 February 2009 (UTC)
I have fixed this bug in the sandbox; how about if we install this fix into {{harv}}, {{harvnb}}, {{harvtxt}}, and {{harvs}}? Eubulides (talk) 07:10, 13 December 2009 (UTC)
If you do, please ensure that {{sfn}} is also done; its parameters and visual effect are similar to {{harvnb}}. --Redrose64 (talk) 11:34, 13 December 2009 (UTC)
Will do. In discussing that I came up with a slightly-better fix (and updated my previous comment to reflect that), which doesn't rely on some other (nonprotected) trivial template. This template is used often enough that it's worth unrolling the call anyway. Eubulides (talk) 06:42, 14 December 2009 (UTC)

  Fixed. Or at least, it will be fixed shortly. See Template talk:Harvard citation no brackets#Spaces. ---- CharlesGillingham (talk) 21:10, 16 February 2011 (UTC)

'Et. al.' cases.

I'm trying to sort out how the Harv template could better handle the 'et. al.' cases of multipule authors.

As a recap: single and double authors work fine (e.g.: Smith, 2001; Smith & Jones, 2002.) With more than three authors - or even more than two authors - standard practice is to cite as 'Smith et. al., 2003'.

The problem with which I have been contending is that Harv/citation generate an id that concatenates all of the last names, plus the entire coauthor string and date. This becomes very cumbersome, unless I build my own CITEREF. And when I do that Harv doesn't put in the 'et.al.' (There is a way of finessing this using 'coauthors', but that requires leaving the extra authors off of the citation.) Also, I usually like to use the the et. al. form with >2 authors, but I understand that others prefer >3. There are also cases where an author has multiple works with multiple, but different, coauthors, which require something like 'Smith, Brown, et. al., 2004' and 'Smith, Jones, et. al., 2004'.

I am wondering if these cases could be resolved with something like an 'etal' parameter in the citation, placed after the first or second name, indicating both that the 'et. al.' form is to be used, and with one or two (or more?) names. (Or 'etal = 2'?) This parameter would imply that subsequent authors, coauthors, editors, etc., are not to be used in building the CITEREF.

The Harv template would also need an 'etal' term - as in {{tl:Harv|Braun|White|etal|2006}} - so that something by Braun, White, Black, and Green could be distinguished from something by just Braun and White. J. Johnson (talk) 22:19, 22 February 2009 (UTC)

I have not been entirely happy with how 'et.al.' cases are handled in this template - it's just too klutzy, too rigid, and too much struggle to get it to do the right thing. But I have hit upon an acceptable work-around: use "others" as a name in the template, and build the appropriate CITEREF. E.g.: {{tl:Harvnb|Smith|others|2001}} with CITEREF Smithothers2001 gets "Smith & others (2001)". I really prefer the "et al." form to "and others", but I prefer even more not having to fight this thing. J. Johnson (talk) 21:25, 7 April 2009 (UTC)
One could always compromise with E.g.: {{tl:Harvnb|Smith|alia|2002}} with CITEREF Smithalia2002 to get "Smith & alia (2002)" or even {{tl:Harvnb|Smith|al.|2003}} with CITEREF Smithal.2003 to get "Smith & al. (2003)" which is a smaller stylistic variation.LeadSongDog come howl 22:06, 7 April 2009 (UTC)
True. But getting too mongrelized for my tastes. J. Johnson (talk) 00:12, 9 April 2009 (UTC)

An update: I've been using "others" as described above for a year now, and find it an acceptable work-around. - J. Johnson (JJ) (talk) 00:29, 23 April 2010 (UTC)

If {{harv}} (or similar) is given four author last names, it displays the first plus "et al". The {{cite book}} should be given as many authors as are credited; but they should be in the |lastn=/|firstn= pairs for the link to be created. Consider these:
{{harv|Alpha|Beta|Gamma|2008|p=123}}
{{harv|Alpha|Beta|Gamma|Delta|2009|p=123}}
{{harv|Alpha|Beta|Gamma|Delta|2010|p=123}}
  • {{cite book |title=A book |last1=Alpha |first1=A. |last2=Beta |first2=B. |last3=Gamma |first3=C. |year=2008 |ref=harv }}
  • {{cite book |title=A book |last1=Alpha |first1=A. |last2=Beta |first2=B. |last3=Gamma |first3=C. |last4=Delta |first4=D. |year=2009 |ref=harv }}
  • {{cite book |title=A book |last1=Alpha |first1=A. |last2=Beta |first2=B. |last3=Gamma |first3=C. |last4=Delta |first4=D. |last5=Epsilon |first5=E. |year=2010 |ref=harv }}
which display as:
(Alpha, Beta & Gamma 2008, p. 123)
(Alpha et al. 2009, p. 123)
(Alpha et al. 2010, p. 123)
  • Alpha, A.; Beta, B.; Gamma, C. (2008). A book. {{cite book}}: Invalid |ref=harv (help)
  • Alpha, A.; Beta, B.; Gamma, C.; Delta, D. (2009). A book. {{cite book}}: Invalid |ref=harv (help)
  • Alpha, A.; Beta, B.; Gamma, C.; Delta, D.; Epsilon, E. (2010). A book. {{cite book}}: Invalid |ref=harv (help)
Click them and see where they link (Firefox & Chrome will highlight in pale blue; IE7 won't). --Redrose64 (talk) 14:54, 23 April 2010 (UTC)
Interesting. I no longer fully recall the details, but I did have problems using {{citation}}. I see you are using {{cite}}, and perhaps that makes a difference. Part of the problem might have been with coauthors – and I do have sources with a dozen or more authors. - J. Johnson (JJ) (talk) 21:21, 23 April 2010 (UTC)

Non-ASCII characters in CITEREF

I am finding a problem with how non-ASCII characters (e.g., Ö, etc., which require insertion of a Unicode name) are handled in CITEREF. Both 'Harv' and 'citation' go to heroic extents to handle these, but unfortunately to somewhat different ends, as seen in the following excerpts from the presented html:

  • href="#CITEREFG.C3.BCrekIrienbushRockenback2006" title="">Gürek, Irienbush...
  • xx id="CITEREFG.26uuml.3BrekIrienbushRockenbach2006">Gürek, Özgür; Irienbush...

(Example is from The Evolution of Cooperation.)

The work-around is to use 'ref=CITEFEF' in citation to force a strict ascii id, and use only ascii characters in Harv. Not entirely satisfactory, as I would prefer to properly spell names, but it works. And I wonder if that ought be documented. J. Johnson (talk) 22:05, 25 February 2009 (UTC)

It's because Citation uses anchorencode magic word but Harv doesn't. And also uses of character references such as &uuml; are problematic. --fryed-peach (talk) 03:09, 26 June 2009 (UTC)


Adding a quote parameter?

I left a message at Template talk:Harvard citations#.7B.7B.7Bquote.7D.7D.7D. rʨanaɢ talk/contribs 14:10, 5 November 2009 (UTC)

=

MediaWiki extension that supports "Harvard" references

There is extension Extension:HarvardReferences that supports simple syntax of Harvard references. Jimbo Wales supports it. User talk:Jimbo Wales/Archive 51#More convenient replacement for the tag "ref" Discussion is on the Wikipedia:Village pump (proposals)#MediaWiki extension that supports "Harvard" references now (oldid-link). X-romix (talk) 03:17, 14 May 2010 (UTC)

That's fantastic. Thanks for pointing this out. That would be a much better solution than this template. I've got a question, though. Does this system provide for multiple authors? For example, if you have a (Smith & Jones 2010) and a (Smith & Brown 2010), how do you handle that? COGDEN 19:57, 14 May 2010 (UTC)

Use with citation templates

Expanded at User:Gadget850/Citation templates— anchors. ---— Gadget850 (Ed) talk 10:00, 18 June 2010 (UTC)

I've incorporated this information into the documentation, with appropriate links your page at the point the documentation just becomes too detailed. ---- CharlesGillingham (talk) 08:41, 24 November 2010 (UTC)

Documentation

More comprehensive set of examples

I've developed a more comprehensive set of examples for {{sfn}}. Would anyone object if I adopted them for this template and added them to the documentation? ---- CharlesGillingham (talk) 17:06, 9 November 2010 (UTC)

Merging the documentation for {{harv}}, {{harvnb}}, {{harvtxt}}

Does anyone else think it would be a good idea to merge the documentation for these three templates? This way, we can help new editors to choose the right template by showing the circumstances where each one is most appropriate. ---- CharlesGillingham (talk) 17:27, 9 November 2010 (UTC)

That certainly makes sense to me. Getting a common /doc should lead to more consistent (i.e. less surprising) behaviour.LeadSongDog come howl! 22:45, 9 November 2010 (UTC)
Yes. These are really three forms of one template, using (as far as I can tell) the same parameters, in the smae way, differing only in their output form. Each form needs a little explanation of how it differs and where to use it, but everything else doesn't need to be repeated. And new editors would be less intimidated seeing there is really only one Harv template, not three or four. Go for it. - J. Johnson (JJ) (talk) 18:50, 11 November 2010 (UTC)

I have started this process. It may take a while to merge all the relevant material and tighten this up. ---- CharlesGillingham (talk) 00:30, 16 November 2010 (UTC)

Still working on this Done

Still working on this doc. May be another day or two. ---- CharlesGillingham (talk) 18:20, 19 November 2010 (UTC)

  Done I think this documentation contains every scrap of information wikipedia has on using these templates. ---- CharlesGillingham (talk) 07:45, 22 November 2010 (UTC)

Ref parameter

On another subject: can anyone tell me a circumstance when |Ref= is useful?

I find it difficult to imagine that

{{harv|Smith|2007|Ref=none}}

is better than

(Smith 2007)

.

Or that

{{harv|Highlighted text|Ref=COMPUTERESE_JUNK}}
== References ==
* {{cite book | ref=COMPUTERESE_JUNK | ... }}

is better than

{{harv|Highlighted text}}
== Reference ==
* {{cite book | ref={{harvid|Highlighted text}} | ... }}

Perhaps I'm overlooking some case where the Ref parameter is actually needed. ---- CharlesGillingham (talk) 17:27, 9 November 2010 (UTC)

I generally use {{citation}} rather than {{cite}}, so my apologies if I don't have this exactly right. But in general, I have found that 1) Harv and citation don't always concur on what the citeref should be, 2) don't always conform to what I think it should be, and 3) have problems with special characters. Plus, 4) there are some instances where I prefer a different link name (such as where a report has a well-known name). All of these cases are easily accommodated using 'ref'. Is that an adequate answer? - J. Johnson (JJ) (talk) 18:58, 11 November 2010 (UTC)
Could you show me an example? I'm a little concerned that we're not talking about the same thing. I agree that parameter |ref= makes a lot of sense in the citation template, but |ref= in {{harv}} doesn't make sense to me. The question is do we need |ref= on both ends?.
On the {{harv}} end, it seems to me it's always easier to just use [[#What ever ID you want|Whatever text you want]]. Right? ---- CharlesGillingham (talk) 21:59, 13 November 2010 (UTC)
My apologies for being so laggard on this. I am not acquainted with your last example of Harv, but on reviewing my work I see that in dealing with the issues I have with Harv/citation it seems I have never used 'ref=' in Harv. If I want to use something other than the author(s) in the reference I just substitute that in place of the author(s). So my use of the 'ref' parameter is entirely in {{citation}} and {{cite}}, not in {{Harv}}. - J. Johnson (JJ) (talk) 23:18, 13 January 2011 (UTC)


Well, at long last I have come up with a case where 'ref=' might be handy: where (for various reasons) I want to refer to a reference (in the citation template) by Harv templates using two different names. But 'ref=' wasn't absolutely necessary as I was able to do this using {{harvid}} as demonstrated below. - J. Johnson (JJ) (talk) 19:52, 21 March 2011 (UTC)

Open issues

After looking through the talk pages, I think these are the open issues on this these templates.

(I rewrote this today with better titles and organization. I realize this is a talk page, and that we don't generally edit talk pages like this, but I think we can make an exception for a todo-list like this. This is now a comprehensive list of the open issues for all these templates on this date.) ---- CharlesGillingham (talk) 07:37, 17 February 2011 (UTC)

Spaces between arguments

This was discussed here:

Fixed in the major templates. Not fixed in the three "col" variations. When this gets fixed, all these links will work:

Markup Result
Article text.{{sfn|Smith | 2006}}

==Notes==
<references/>

Article text.[1]
Notes
{{harv|Smith | 2006}} (Smith 2006)
{{harvnb|Smith | 2006}} Smith 2006
{{harvtxt|Smith | 2006}} Smith (2006)
{{harvcol|Smith | 2006}} (Smith 2006)
{{harvcolnb|Smith | 2006}} Smith 2006
{{harvcoltxt|Smith | 2006}} Smith (2006)
[[#{{harvid|Smith | 2006}}|Mr. Smith (2006)]] Mr. Smith (2006)
* {{citation | last=Smith | year=2006 | title=Smith's book }} * Smith (2006), Smith's book


Markup Result
Article text.{{sfn|Rolling Stone|2006}}

==Notes==
<references/>

Article text.[1]
Notes
{{harv|Rolling Stone|2006}} (Rolling Stone 2006)
{{harvnb|Rolling Stone|2006}} Rolling Stone 2006
{{harvtxt|Rolling Stone|2006}} Rolling Stone (2006)
{{harvcol|Rolling Stone|2006}} (Rolling Stone 2006)
{{harvcolnb|Rolling Stone|2006}} Rolling Stone 2006
{{harvcoltxt|Rolling Stone|2006}} Rolling Stone (2006)
[[#{{harvid|Rolling Stone|2006}}|Mr. Smith (2006)]] Mr. Smith (2006)
* {{citation | ref={{harvid|Rolling Stone|2006}}| last=Smith | year=2006 | title=Smith's article }} * Smith (2006), "Smith's article", Rolling Stone
  Fixed. In all the templates. ---- CharlesGillingham (talk) 21:41, 3 March 2011 (UTC)

includeonly

This was discussed here:

Using <includeonly> in the templates would make them look better when editors follow a link like {{harvnb}}. They not would see the ugly [[#CITEREF|]] at the top of the page.

This is discussed here:

We don't have a print version for {{harvs}}. ({{sfn}} was recently fixed).

Problems with more than four authors

This issue is discussed in all these places:

Our templates should at least report an error when more than four authors have been listed (i.e., there are more than five arguments to the function).

Since one of the five is the year, and the year is optional, we really need to detect more than four non-numeric arguments. It might be sufficient to ignore the actual number of args, and simply perform this two-step test: (i) is {{{5|}}} present or absent? If absent, then OK: if present, then (ii) is it numeric? If numeric, it's OK; if not, throw error. Testing for something being numeric might be a simple as trying to involve it in an arithmetic expression. Something like this:
{{#if: {{{5|}}} | {{#iferror: {{#expr: 1+{{{5}}} }} | <!-- Throw error here --> }} }}
--Redrose64 (talk) 12:42, 17 February 2011 (UTC)

Is {{harv|... |Ref= }} necessary?

This issue is discussed here:

All the templates have a |ref= parameter except {{sfn}}. Should we remove |ref= from the rest?

I believe it should be removed from the other templates as well. It is an unnecessary complication which leads to confusion. ---- CharlesGillingham (talk) 07:37, 17 February 2011 (UTC)

Special characters

This was discussed here:

  Fixed (I think), as these cases demonstrate. ---- CharlesGillingham (talk) 08:37, 24 November 2010 (UTC)
Markup Result
Article text.{{sfn|Smäth|2006}}

==Notes==
<references/>

Article text.[1]
Notes
{{harv|Smäth|2006}} (Smäth 2006)
{{harvnb|Smäth|2006}} Smäth 2006
{{harvtxt|Smäth|2006}} Smäth (2006)
{{harvcol|Smäth|2006}} (Smäth 2006)
{{harvcolnb|Smäth|2006}} Smäth 2006
{{harvcoltxt|Smäth|2006}} Smäth (2006)
[[#{{harvid|Smäth|2006}}|Mr. Smäth (2006)]] Mr. Smäth (2006)
* {{citation | last=Smäth | year=2006 | title=Smäth's book }} * Smäth (2006), Smäth's book
Thanks. At some point I hope to try this out. - J. Johnson (JJ) (talk) 22:22, 13 January 2011 (UTC)

Should the templates have a "url" parameter?

This was discussed here:

There is a workaround in the documentation, but it is not certain that this is the best solution. ---- CharlesGillingham (talk) 07:40, 17 February 2011 (UTC)

Should the templates have a "quote" parameter?

This was discussed here:

Should "et al" be italicized?

This was discussed here:

This was discussed here:

Some people don't like the way the link looks in harvcoltxt and harvtxt.

Newspapers

It seems to me that newspaper citations are better served by a complete footnote, rather than a shortened footnote. ---- CharlesGillingham (talk) 07:37, 17 February 2011 (UTC)

This editor would like to see a backlink from the full citation to the short citations. On the long-term wish list. Maybe.

Discussion on standardization

There's a proposal to standardize citation styles in WIkipedia that may be of interest to users of this template, at Wikipedia_talk:Citing_sources/example_style. —David Eppstein (talk) 16:26, 11 January 2011 (UTC)

Edit request from 134.253.26.12, 9 February 2011

{{edit protected}} This template is currently whitespace sensitive. For example, check the difference in the anchor link produced by (foo 2000) and (foo 2000). To fix this, one should replace the CITEREF{{{1|}}}{{{2|}}} with CITEREF{{#if:{{{1|}}}|{{{1}}}}}{{#if:{{{2|}}}|{{{2}}}}}. Basically, the "#if" will strip off any whitespace. Note that I have not given the complete replacement text, as I believe there are something like 5 parameters there.

134.253.26.12 (talk) 00:46, 9 February 2011 (UTC)

This is already mentioned in the documentation; and under "Wikilink to citation does not work", item 2.1.1.6 it states "There are spaces in the harvard citation template, e.g. {{harv|Smith |2006}} Solution: remove the spaces.". --Redrose64 (talk) 13:13, 9 February 2011 (UTC)
We could use Template:Trim to achieve the same result. If it saves editors time, then why not? — Martin (MSGJ · talk) 15:37, 9 February 2011 (UTC)
This is fixed in {{sfn}}, which has almost the same code as this template. See these test cases above at #Spaces between arguments. It would be nice if the fix above was applied to all six templates. ---- CharlesGillingham (talk) 23:57, 9 February 2011 (UTC)
So is the consensus that we should apply {{trim}} to all 5 parameters? This creates quite a precedent because we don't do this to parameters of 99% of templates we use. Perhaps this needs to be considered further? — Martin (MSGJ · talk) 15:58, 11 February 2011 (UTC)
Yes, I think this is what we want to do. The difference is that each of the arguments to this template have semantics. In the template call {{tl2|harv| Smith | 2006}}, Smith is a name, not a text-string consisting of " Smith ". So it makes sense we would trim leading and trailing blanks.
I have a technical question: at the moment, {{harv}} is performance critical (because it tends to be used in large articles with hundreds of template calls which have slow load times). For this reason, we have avoided using any template calls in the code (e.g. everything is "{{subst}}ed."). Should we use {{trim}}? Or should we use the {{if}} method mentioned above? ---- CharlesGillingham (talk) 20:11, 11 February 2011 (UTC)
Yes, I think we should just use the "if" method, it will reduce the transclusion depth, and not that more complex to view. I will go ahead and boldly make the change. Plastikspork ―Œ(talk) 04:33, 12 February 2011 (UTC)
  Done Everywhere. ---- CharlesGillingham (talk) 21:42, 3 March 2011 (UTC)

Confused

Is this even required?Greg Heffley 19:54, 4 November 2011 (UTC)

Is what even required? --Redrose64 (talk) 20:27, 4 November 2011 (UTC)

Deletion discussion

See Wikipedia:Templates_for_discussion/Log/2012_January_24#Template:Harvard_citation. -- Alan Liefting (talk) - 23:12, 24 January 2012 (UTC)

Closed as a WP:SNOW keep. BencherliteTalk 22:31, 25 January 2012 (UTC)

Core

---— Gadget850 (Ed) talk 15:54, 21 March 2012 (UTC)