Template talk:Harvard citation documentation

missing link
i think that this doc should, at some point, point to Harvard referencing. --Jerome Potts (talk) 04:50, 30 March 2008 (UTC)


 * ✅ CharlesGillingham (talk) 18:17, 16 November 2010 (UTC)

Why are these two pages kept?
Why are there two pages such as Template:Harvard citation/doc and Template:Harvard citation documentation? Is there some decision to keep these two separate that I am not aware of? --Stultiwikiatext me 18:49, 6 May 2011 (UTC)
 * Template:Harvard citation documentation is transcluded by Template:Harvard citation/doc, Template:Harvard citation no brackets/doc, Template:Harvard citation text/doc, Template:Sfn/doc, Template:Harvcol/doc, Template:Harvcolnb/doc and Template:Harvcoltxt/doc. All of these templates are versions of each other, and the documentation applies to all seven. CharlesGillingham (talk) 00:21, 7 May 2011 (UTC)

Cite report / cite thesis
Cite report and Cite thesis now support ref. ---— Gadget850 (Ed)  talk 09:09, 4 April 2012 (UTC)

Use of letters with dates
The documentation was recently changed to forbid the use of letters with dates (e.g. Smith 1999a) on the grounds that it messed up the COinS metadata. This convention is widely used, both in Wikipedia and elsewhere, and I don't think advice here should be changed without proper discussion. A much better solution seems to me to change the generation of metadata. The alternative of fuller dates is not always possible, e.g. in the case of two papers by the same author(s) in the same issue of a journal, or two chapters by the same author(s) in the same book. Peter coxhead (talk) 15:47, 16 October 2013 (UTC)


 * Perhaps a more careful review of the change I made is in order? The only prohibition of letter suffixes in my change was to the value of date or year when used without date because such use does, in fact, corrupt the COinS metadata. Suffixing the date value in the absence of year produces an incorrect CITEREF anchor.  I agree that the best solution to the issue is to fix the code that generates the metadata and to fix the code that creates the anchors.  However, until I or some other editor can make such changes, Wikipedia should not be generating corrupt metadata and for our readers should create correct anchors to support short-form referencing with  and the  family of templates.


 * A step along that path is to adjust the documentation so that editors correctly use the CS1 templates as they are currently implemented.


 * This citation:
 * produces this output:
 * produces this output:


 * Notice that the anchor is  not   as one might expect.  In the metadata you can see that the date is corrupted:  .  But, this citation:
 * produces this output where both the anchor and the metadata are correct:
 * produces this output where both the anchor and the metadata are correct:


 * Please take the time to carefully review the change I made and explain how it does not accurately reflect current CS1 template operation. Or, propose an alternate version.


 * —Trappist the monk (talk) 16:33, 16 October 2013 (UTC)


 * I accept that it's quite possible that I misunderstood your change, but I think it would have been useful to flag that change here, on the talk page, in parallel to making it. Edit summaries are too brief for this purpose for templates such as this which are complex to use. I really didn't find your revised documentation clear – which, as I say, may well be my fault.
 * If you revert my reversion, I will at least now be able to raise any issues here.
 * You say above The only prohibition of letter suffixes in my change was to the value of date or year when used without date. Sorry, but I still don't understand. It's surely quite ok to have a letter suffix to a year parameter when used without a date parameter. Peter coxhead (talk) 17:46, 16 October 2013 (UTC)


 * Can you identify those parts of the change that aren't clear? What improvements would you make?


 * This citation:
 * produces this output which has the correct anchor but corrupted metadata:
 * produces this output which has the correct anchor but corrupted metadata:


 * So, what I said is, I think, true. If you need to disambiguate a citation, you must use both date and year where year has the disambiguation suffix.


 * —Trappist the monk (talk) 19:15, 16 October 2013 (UTC)


 * So the correct usage in this case is what? The following?
 * If so, then it's easy in Lua to detect a year with a letter following and no date parameter and simply supply the missing date. Why require an editor to do this manually? What about all the existing uses of citations with a suffixed year but not date? Peter coxhead (talk) 21:27, 16 October 2013 (UTC)
 * If so, then it's easy in Lua to detect a year with a letter following and no date parameter and simply supply the missing date. Why require an editor to do this manually? What about all the existing uses of citations with a suffixed year but not date? Peter coxhead (talk) 21:27, 16 October 2013 (UTC)


 * Yes, that is the correct form for disambiguated citations.


 * Fine questions, those. If you want to have a go at the date issue then Module:Citation/CS1/sandbox.  There are still several CS1 citation types that have not yet migrated to Lua so any fix to the Lua code won't change how they work until they are upgraded.


 * I'm not sure what action should be taken with regard to existing citations with suffixed year values. Certainly these could be detected, messaged, and categorized much as we do with other anomalous parameters.  Once categorized, a robot could be produced that would fix the problem citations.


 * I think that the documentation should describe current operation regardless of what we expect from the tools in future.


 * No suggestions for improvements to the documentation?


 * —Trappist the monk (talk) 23:00, 16 October 2013 (UTC)


 * Ok, I think my problem with what you wrote was that I was implicitly assuming that what you've explained above couldn't be the case – I've used suffixed letters in the past apparently successfully – so I didn't understand it. I've restored your text and prefaced it by an explanation that it's a work-around for a current bug which I hope makes it clearer.


 * Since you understand the problem better than I do – I'm just a user here – I suggest you ask the Lua experts for a fix. Peter coxhead (talk) 13:06, 17 October 2013 (UTC)


 * Please see Module_talk:Citation/CS1. Comments and opinions solicited.


 * —Trappist the monk (talk) 14:59, 22 October 2013 (UTC)

duplicate inclusion problem
Please see, and update the documentation so the next editor baffled by mysterious big red citations warnings on a page has a clue as to how to fix them. NE Ent 14:33, 15 November 2015 (UTC)
 * George Orwell III has already responded at the pump. Please note how he emphasises the missing "p".  I'll review the sfn documentation, but IIRC it does cover the correct use of "p" and "pp" in once section. Martin of Sheffield (talk) 14:38, 15 November 2015 (UTC)
 * I reviewed the documentation when faced with error messages on Paris but didn't find anything I considered helpful for resolving the problem, so anything you could do to help editors faced with similar messages in the future will be appreciated. NE Ent 15:09, 15 November 2015 (UTC)
 * I've added a short warning to the parameters section and mentioned cite errors. Will this help? Martin of Sheffield (talk) 22:31, 15 November 2015 (UTC)
 * Great, thanks! NE Ent 22:50, 15 November 2015 (UTC)

too concise and axing wikilinks does not help the newbies
In this edit, undid my own overhaul to the lead. I've known JJ for a long time. He is a citation expert. Me? I'm nobody. I didn't know pea from carrots about citation when I started trying to understand what the devil all this means.

In the world of technical writing, the key magical skill is to accurately assess your audience's existing knowledge. I assume we want help documentation to help people who don't know peas from carrots, and the experts like JJ can skim through it really fast because its so basic, but being basic, noobs (like me) can catch up. The new version assumes a lot of familiarity with concepts and took out an awful lot of wikilinks that I relied on to figure out the differences between these vegetables. JJ's has chopped all of that stuff.

That's OK.... for many years we have often had good faith policy based personal opinions that are exactly opposite each other. We even agree from time to time. So I'm hoping despite this being a pretty low traffic place, that some third parties will offer their own comments or tweaks, however you see things. And please remember ... give the noobs a helping hand. NewsAndEventsGuy (talk) 21:57, 31 August 2019 (UTC)


 * I'm trying to help! But perhaps I should have discussed this more with you? I considered it, but in decided it might be better to just demonstrate. And it is rather a work in progress.


 * A problem I see with your version is that you tried to address your particular, detailed concerns, such "the links and anchors associated with this template are a feature of the code which editors do not see." While some mention of how the "magic" works might be suitable further in, this is too small of a detail, and even too personally oriented, for the lead.


 * I took out several of the wikilinks because they didn't really distinguish "peas and carrots" (actually furthering the confusion about citation). In particular, your "This template allows you to link inline citation using Harvard citations", where "Harvard citations" – and never mind that this page is the documentation for "Harvard citation" — linked to WP:Parenthetical referencing, which says this "is a citation system in which in-text citations are made using parentheses." Sorry, this just is not true. It also makes distinctions that are invalid, and only reinforces deep-seated confusion. (I do allow that WP:Inline citation is probably good; I got cross-connected to Inline citations which redirects to Template:No footnotes (oh??), which isn't applicable. Touché.)


 * Perhaps more later, but I need to get some sleep. &diams; J. Johnson (JJ) (talk) 23:02, 31 August 2019 (UTC)
 * JJ, on this topic discussion with you is always one way and your words kinda bounce off. This isn't a bad faith thing, as I've said before, just that we are mismatched in our speaking/listenting styles.  So, I'll just thank you for adding your thoughts, and reiterate my hope for third parties to work on the help documents. And I'll add this too.....  useability testing, useability testing, useability testing.  We might all think that our way is the perfect teaching way to write.   But to find out it would be great to recruit some "blank minds" to look at without pre conceptions and offer feedback about what is clear and what is not. NewsAndEventsGuy (talk) 01:36, 1 September 2019 (UTC)


 * Where we keep knocking heads is on issues of correct and helpful. More particularly, of statements and concepts that are ambiguously "correct". For instance, the statement that "Harvard citations" are "a form of short citations using parenthetical references", or the more explicit statement at WP:PAREN that these are "made using parentheses", are, at best, only partially correct, because the harvnb variant of "Harvard citations" definitely, demonstrably, does not use parentheses. While it is correct to say that some forms of Harv can be (and presumably are) used for "parenthetical referencing", it is also correct that some forms are NOT used for parenthetical referencing.  To stating one of those and not the other is misleading, and has led to the wide-spread but erroneous belief that "Harv" is only for parenthetical referencing, which is extremely unhelpful. Similarly for other points, which is why discussions of citation are so difficult: "we" (speaking generally) don't have a right grasp of what "we" are talking about. That's why I am so hard-assed (hard-brained?) about correct use of terms. (And also why I avoid linking to parenthetical referencing: that just reinforces incorrect and unhelpful thinking.)


 * As to getting any "blank minds ... without pre-conceptions" to look at this: ha, ha, there ain't any such things. The problem is that most editor's pre-conceptions (such as imbibed from WP:PAREN and such) are incorrect and unhelpful.


 * How to helpfully explain these concepts is, of course a different matter, for which I fully embrace usability testing. (NAEG testing especially. :-) But I reject the notion that misleading statements are in any way helpful.


 * As to what might be more helpful, please take a look at User:J. Johnson/sandbox4 and let me know if that makes sense for you. &diams; J. Johnson (JJ) (talk) 23:56, 2 September 2019 (UTC)
 * No, it's on not having third parties to make a stronger consensus and failing to seek out rookies to test our ideas on and so get honest real world testing of our opinions. NewsAndEventsGuy (talk) 02:49, 3 September 2019 (UTC)


 * Don't forget that you and I came here to straighten out documentation that conflicted (and at some points still does) with what we have been discussing at GW. If we don't straighten out these various conflicts (here and elsewhere) they will confuse any rookies we bring in. Which is why I would like to get your thoughts on my sandbox work -- I'd like to iron out as much potential confusion as we can prior to introducing it. &diams; J. Johnson (JJ) (talk) 22:56, 3 September 2019 (UTC)
 * Good luck, I've dug in this dry hole without water too long already. NewsAndEventsGuy (talk) 23:14, 3 September 2019 (UTC)

Prospective work
In case anyone is interested: I have been trying to straighten out some of this documentation so it won't be so confusing. There may be points of inconsistency with some of the existing documentation, but the latter is so confusing as it is that it probably doesn't matter. At some point the sfn documentation should be separated from the harv documentation (sfn ≠ harv!), there's no telling when I can get to that. &diams; J. Johnson (JJ) (talk) 23:06, 11 September 2019 (UTC)
 * is essentially wrapped in  where   is generated automatically based upon the supplied parameters. They are very closely related. -- Red rose64 &#x1f339; (talk) 18:32, 12 September 2019 (UTC)


 * Correct. But despite being very closely related, there is a difference in their use, which confuses the explanation of how to use them. (Which is confused enough as it is.) As all (?) of the sfn effects are derived from some form of harv, it would be simpler to describe the the basic form of each harv template, then show the corresponding sfn usages. And explain the more esoteric uses in a later section. &diams; J. Johnson (JJ) (talk) 20:23, 12 September 2019 (UTC)
 * That sounds a much better idea than separating the sfn documentation from the harv documentation. Martin of Sheffield (talk) 21:15, 12 September 2019 (UTC)
 * I think a case could be made for splitting this into separate pages, but that is beyond what I contemplate. I think the descriptions of each ought to be teased apart, and perhaps the entire page reorganized, but for now and any time soon I'm just trying to resolve the more troubling sources of confusion. &diams; J. Johnson (JJ) (talk) 21:45, 12 September 2019 (UTC)

Name suffixes
What's the best way to handle name suffixes in this citation style (i.e., II, Jr.)? czar 22:48, 7 December 2019 (UTC)
 * Because Harvard referencing uses surnames and dates and because MOS:JR places family rank after given name when surname leads given name, perhaps there is nothing to do. So:
 * —Trappist the monk (talk) 00:20, 8 December 2019 (UTC)
 * —Trappist the monk (talk) 00:20, 8 December 2019 (UTC)
 * —Trappist the monk (talk) 00:20, 8 December 2019 (UTC)
 * —Trappist the monk (talk) 00:20, 8 December 2019 (UTC)
 * —Trappist the monk (talk) 00:20, 8 December 2019 (UTC)

I recall this working at DVT years ago, but it doesn't anymore
Hello. I am working on improving deep vein thrombosis, and I recall previously having CITEREF functionality in there but it isn't working any longer. The article has  33 times within the article but those links don't work to bring the reader down to the Guyatt reference, which is located in the "Cited literature" subsection at the bottom of the References section. Any advice? I spent some time trying to figure it out myself, but I imagine a kind soul here will quickly know the answer and I can instead use my time to improve the article. Thanks. Biosthmors (talk) 17:38, 30 December 2019 (UTC)

Ping to User:Trappist the monk. Thanks in advance if you can assist. Best wishes. Biosthmors (talk) 17:39, 30 December 2019 (UTC)
 * Because there are multiple authors:
 * The template expects.
 * To retain the wikilink for the article uses you must match what the template expects so:
 * → Guyatt et al. 2012
 * Alternately you can change harv to ref:
 * so:
 * → Guyatt et al. 2012
 * Alternately, you can convert  to  ...
 * —Trappist the monk (talk) 17:57, 30 December 2019 (UTC)
 * I have fixed it thanks to your help!! Many thanks! Best wishes. Biosthmors (talk) 18:15, 30 December 2019 (UTC)
 * so:
 * → Guyatt et al. 2012
 * Alternately, you can convert  to  ...
 * —Trappist the monk (talk) 17:57, 30 December 2019 (UTC)
 * I have fixed it thanks to your help!! Many thanks! Best wishes. Biosthmors (talk) 18:15, 30 December 2019 (UTC)

Removed some duplicate material.
I have WP:BOLDly removed some redundant material from the first section of the article. The issues discussed in these paragraphs are already covered in the Possible issues section down at the bottom of the article, specifically the sections More than four authors and No last name in citation template.

It would be a good idea if someone took a look at the material I deleted and compared it to the sections at the bottom -- perhaps the deleted material should be incorporated in some way.

I imagine that the deleted material was added by someone who didn't notice that these issues were already covered. I would support anyone who wishes to rearrange the page to make it easier for readers to find what they need. CharlesGillingham (talk) 17:40, 20 April 2021 (UTC)

"Messed up link"
Yes, when viewed directly, this page is full of broken syntax involving. But the page is not designed to be viewed directly, as it is used to create the actual template documentation pages at Template:Sfn/doc, Template:Harvard citation no brackets/doc, and so on. For example, when viewed on Template:Sfn/doc, the text begins "sfn is designed to be used..." -- John of Reading (talk) 10:48, 21 October 2021 (UTC)
 * I personally think it would be useful to move the "template documentation" section to the top of the page (instead of its standard place at the bottom) so that the note that says that this template provides documentation for other templates is the first thing people see. I think that would eliminate most of the confusion caused by seeing this page on its own. --Pokechu22 (talk) 17:32, 21 October 2021 (UTC)
 * Hmm, seems that I've committed an act of bozosity here. Feel free to revert (if you haven't already). jp×g 20:31, 21 October 2021 (UTC)

Suppressing no-target errors with ExpandTemplates
I was trying to fix my harv no-target errors while testing my changes in Special:ExpandTemplates, and although all the linkages worked, nothing got rid of the no-target errors, and I tried everything. Finally, I tried pasting the identical code into my sandbox, and the errors went away. As a result, I added the following to section in this edit:

I don't know why Special:ExpandTemplates appears to be more prone to non-suppressible no-target errors, but I'd like to understand, and perhaps expand or re-word the recent edit to that doc page section accordingly. , can you offer any insight into this? If there are other sfn/harv-related issues that might be best not tested in Special:ExpandTemplates, I'd like to know about those, too, and perhaps add it to the doc as well. Thanks, Mathglot (talk) 20:07, 18 August 2023 (UTC)
 * At Module:Footnotes/anchor id list line 110 the module fetches the current article's wikitext. It does that so that it can read each citation-like template that it can find to extract authors and dates from which it constructs a list of   anchor IDs.  When the current short-form reference's   anchor ID doesn't match one of the constructed   anchor IDs, the module emits the no target error message.  Special:ExpandTemplates does not have article wikitext so there is nothing for the module to read.  The module then attempts to find a match for the short-form reference's   anchor ID in an empty list of constructed   anchor IDs.  Because empty list there is no match so the module emits the no target error message.
 * —Trappist the monk (talk) 21:43, 18 August 2023 (UTC)
 * Trappist the monk, thanks. I should have been clearer: in my testing of a harvc example in Special:ExpandTemplates, there is wikitext that does match up, but generates no-target errors anyway—but *only* in ExpandTemplates. For example: in this sandbox subpage, everything works properly, from sfn to harvc to cite journal—all working: highlighting, linkage, everything; and there are no extraneous no-target errors: User:Mathglot/sandbox/citec. If you paste the whole thing into Special:ExpandTemplates (or just transclude it as {{User:Mathglot/sandbox/citec}}), it will generate seven no-target errors. But in my sandbox, it doesn't generate any errors. I don't understand that difference in behavior. Mathglot (talk) 03:35, 19 August 2023 (UTC)
 * I understood what you were saying. In answer, I'll repeat myself: Special:ExpandTemplates does not have article wikitext so there is nothing for the module to read.  When run against Special:ExpandTemplates the call to   (line 110) returns  .  When that happens, the variable   is assigned the value of 'empty string'.  Because   is an empty string, there is nothing for the module to evaluate so it cannot compile a list of   anchor IDs.
 * If you preview your sandbox, at the bottom of that page is a collapse 'Parser profiling data'. Click that.  In the table that is displayed is a section called 'Lua logs'  Click Show.  That will give you a list of   anchor IDs that the module found, a list of the templates in the article, and the content of  if present.  These lists are not created when the module runs against Special:ExpandTemplates.
 * —Trappist the monk (talk) 12:00, 19 August 2023 (UTC)
 * Thanks again. So, the message I added to the doc page about Special:ExpandTemplates is valid; feel free to modify the wording as you see fit. Mathglot (talk) 17:27, 19 August 2023 (UTC)
 * Or, if it's due to the Module not detecting that, and nothing to do with the script, maybe the module should be adjusted to detect that case, and the script needn't have any special mention of it, once that happens. (Related discussion here.) Mathglot (talk) 20:37, 19 August 2023 (UTC)
 * This is a limitation of the software, like the whole false positive issue there is no current solution to the problem. So yes your addition to the documentation is correct. -- LCU ActivelyDisinterested ∆transmissions∆ °co-ords° 00:08, 20 August 2023 (UTC)
 * This is a limitation of the software, like the whole false positive issue there is no current solution to the problem. So yes your addition to the documentation is correct. -- LCU ActivelyDisinterested ∆transmissions∆ °co-ords° 00:08, 20 August 2023 (UTC)

Two names no date
Edit this reference to see it working.

2600:100F:B1BC:853F:0:B:15FC:9601 (talk) 07:42, 9 October 2023 (UTC)
 * Sorry, my mistake, but I have vivid memories of sfn and harv output like (Lane & 1997). -- Michael Bednarek (talk) 07:53, 9 October 2023 (UTC)
 * It's all good. Maybe from the old version or from odd dates like . 2600:100F:B1BC:853F:0:B:15FC:9601 (talk) 08:59, 9 October 2023 (UTC)

Use of param 'loc' for quotations
A discussion is taking place at Template talk:Sfn regarding the use of sfn param loc for quotations. Mathglot (talk) 22:03, 19 November 2023 (UTC)