Template talk:Harvard citation text

Core update

edit

Given the commonality in markup for the author-date templates, I have developed a meta-template at {{Harvard citation/core}}. See Template talk:Sfn#Core update. ---— Gadget850 (Ed) talk 01:40, 9 April 2012 (UTC)Reply

  Done ---— Gadget850 (Ed) talk 16:46, 28 April 2012 (UTC)Reply

Shouldn't a nobreak be wrapped around these citations?

edit

Just as NBSP's are needed before spaced dashes to prevent a false bullet from being created, style guides suggest that NBSP's be placed before years in citations. Likewise, shouldn't there be a {{nobreak}} buried within this template? —TedPavlic (talk/contrib/@) 17:32, 4 May 2012 (UTC)Reply

Unbalanced parentheses

edit

The expansion of {{Harvtxt|Einstein|1915}} makes the open paren part of the hyperlink, but the close paren not part of the hyperlink :(

I guess this is intentional when there's a page number, but when there's not a page number, it's just weird.

Jruderman (talk) 08:56, 14 July 2012 (UTC)Reply

This is basically the same problem as was described at Template talk:Harvcoltxt#Mismatched brackets. --Redrose64 (talk) 15:56, 14 July 2012 (UTC)Reply

Even when there is a page number, this would look much better to have the link either include the page number (and the closing paren) or exclude the year (and the opening paren). Thus, either "Smith (2005, p. 25)" or "Smith (2005, p. 25)". —Toby Bartels (talk) 10:05, 13 October 2013 (UTC)Reply

  Note: The following discussion was moved from Template talk:Harvcoltxt#Mismatched brackets. — Scott talk 11:09, 8 November 2013 (UTC)Reply

Yes, I was hoping to produce some output that exactly matches {{sfnp}}, as in "Smith (2005), p.25" or just "Smith (2005)", but at present that doesn't seem to be possible. Could we get this added as an option somehow? — Scott talk 09:38, 10 May 2013 (UTC)Reply

What do you want to do with the colon and the page number? Keep in mind that some editors put a link in the page number. --  Gadget850 talk 23:26, 10 May 2013 (UTC)Reply
Well, a call to sfnp:
{{sfnp|Best|Strange|1992|p=123}}
is equivalent to:
<ref>[[#CITEREFBestStrange1992|Best & Strange (1992)]], p.123.</ref>
Yes? I'd like to be able to produce the same thing, but not as a <ref>...</ref> - author and year linked, but not page number. For example of where I'd use it, have a look at The Hardy Boys#Notes, where the citations mentioned by name ("See Keeline 1983") in the footnotes don't match the style of the citations section below.
Perhaps what I need is not a modification to this template, but another addition to the family of citation templates based around core? Or do you know of an existing one that already does this? Thanks for your help, by the way. — Scott talk 13:35, 11 May 2013 (UTC)Reply
Anybody? — Scott talk 23:25, 5 November 2013 (UTC)Reply
Please see my response below. --Redrose64 (talk) 11:03, 6 November 2013 (UTC)Reply
Sorry, but that seems to be a different conversation. I was asking about a method to produce the following:
Best & Strange (1992), p.123.
I'm not interested in discussing GA review standards or whether it's a good thing to have half-linked parenthesis pairs. Maybe the easiest thing for me to do is just to make a new citation template based on core. — Scott talk 12:28, 6 November 2013 (UTC)Reply
This is the talk page for {{harvcoltxt}}, which has the page number preceded by a colon. You appear to be thinking of {{harvtxt}}, where the page number is preceded by "p. " - but I understand why you are here: you probably read my comment at Template talk:harvtxt#Unbalanced parentheses.
However, if I am reading your request correctly, the principle is the same as the discussion below: you both wish the closing parenthesis moved from its current position after the page number to a position before the page number and after the year, and so bring it inside the author/year link. There is no need to have yet another {{harv}} fork, since if there is agreement, we can either provide {{harvtxt}} and {{harvcoltxt}} with parameters which dictate the position of the closing parenthesis, or we could alter the templates outright. --Redrose64 (talk) 15:00, 6 November 2013 (UTC)Reply
Oh! I'm sorry; yes, I understand what you're saying. To be honest with you, I don't recall exactly how I got to this talk page; as you can see my original question was posted six months ago. It could well be that I meant to ask this at the talk page for {{harvtxt}} but got mixed up as to what I was looking at.
Yes, I would very much support the addition of a parenthesis position option to these templates over the creation of a fork. — Scott talk 17:16, 6 November 2013 (UTC)Reply

There's a bit of confusion in the above, because it was on Template talk:Harvcoltxt, but now that it's in the right place I agree that we need a way to produce "Smith (2005), p. 25" and "Smith (2005)", so that articles using {{sfnp}} can format other references consistently. That would be by using |BracketYearRight= instead of |BracketRight=. We probably need to also keep the existing behaviour for "Smith (2005, p. 25)", but there seems to be no need for "Smith (2005)". Kanguole 12:25, 17 January 2014 (UTC)Reply

This still seems to be an issue, if nobody is working on resolving it I will start sandboxing. Jbzdarkid (talk) 15:00, 15 September 2014 (UTC)Reply
I came here to see if the behaviour on Functional_derivative#cite_ref-2 is a bug, where {{harvtxt|Giaquinta|Hildebrandt|1996|p=18}} gives Giaquinta & Hildebrandt (1996, p. 18). --Lpd-Lbr (talk) 09:15, 8 October 2019 (UTC)Reply
A lot of the above conversation can be answered with {{harvp}}. Some of the discussion above has been directed to the unbalanced brackets rendered by {{harvtxt}} but from my reading of it, there isn't enough there to make some sort of determination to change, nor a determination how the changed template shall render.
Trappist the monk (talk) 11:55, 8 October 2019 (UTC)Reply

Template name

edit

{{Harvtxt}} is a redirect to {{Harvard citation text}}, but the other citation templates ({{Harvcol}}, {{Harvcoltxt}}, etc.) have the short form as actual template name. I reckon we should reverse the redirect direction here for consistency. — Scott talk 11:12, 8 November 2013 (UTC)Reply

{{Harvtxt}} is not the only exception.
but
So if anything, the majority suggests that a move in the other direction might be more appropriate. --Redrose64 (talk) 20:01, 8 November 2013 (UTC)Reply

Weird linkification

edit

Is it expected that using {{harvtxt|Smith|2005|p=25}} results in "Smith (2005, p. 25)", with the hyperlink only covering half? LFaraone 03:06, 3 June 2015 (UTC)Reply

I don't know what the right behavior here should be, but you could try {{harvs|last=Smith|year=2005|loc=p.&nbsp;25|txt}} – Smith (2005, p. 25) – for a different effect. (And why does harvs not allow |page= as a parameter?) —David Eppstein (talk) 04:36, 3 June 2015 (UTC)Reply
@LFaraone: This is the same issue as described at #Unbalanced parentheses above. --Redrose64 (talk) 15:12, 3 June 2015 (UTC)Reply

Serial commas

edit

Instead of "Smith, Jones & Brown", this should say "Smith, Jones, & Brown", with a serial comma. (Unless it says "Smith, Jones, and Brown" with the serial comma and the word "and" instead of the ampersand. Michael Hardy (talk) 00:52, 10 November 2016 (UTC)Reply

Not necessarily, see MOS:OXFORD. --Redrose64 (talk) 01:09, 10 November 2016 (UTC)Reply

consolidating and abandoning Template:Harvard citation/core

edit

Please see Module_talk:Footnotes#consolidating_and_abandoning_Template:Harvard_citation/core.

Trappist the monk (talk) 16:08, 8 August 2018 (UTC)Reply

edit

Please see the discussion at Module talk:Footnotes § broken harv link reporting where a broken harv-link reporting scheme is proposed.

Trappist the monk (talk) 17:46, 16 March 2020 (UTC)Reply

Broken formatting

edit

Please see the third note at Endomorphism ring, where there is an unmatched parenthesis produced by this template, as may be seen here:

Dummit & Foote, p. 347)

Quondum 21:43, 6 October 2023 (UTC)Reply

{{harvtxt}} requires a year parameter. I can't find a Dummit & Foote work titled Algebra, but I have found Abstract Algebra (is that the intended source?). Rewriting your example using publication date from Abstract Algebra 3rd edition:
{{harvtxt|Dummit|Foote|2004|p=347}}Dummit & Foote (2004, p. 347)
Endomorphism ring uses both {{harvtxt}} and {{sfn}}. Pick one style and use that style; don't mix. The long-form Dummit & Foote template is missing most of the necessary bibliographic detail.
Trappist the monk (talk) 22:14, 6 October 2023 (UTC)Reply
The template doc (see § Citation has multiple authors and no date) says "... but will display the last author as if it were a year", which led me to think that doc was out of sync with the template since it does not display with the second name properly parenthesized here. Thanks for the {{sfn}} tip; implemented with pleasing result. I failed to determine what source was intended. Thanks for the help. —Quondum 22:55, 6 October 2023 (UTC)Reply

Possessive parameter

edit

I propose a new parameter |possessive= be added to Template:Harvard citation text as which would make

{{harvtxt|Smith|1999|possessive=yes}} studySmith (1999) study

produce the same output as

[[#{{harvid|Smith|1999}}|Smith's (1999)]] studySmith's (1999) study

At the moment, that possessive parameter in {{harvtxt}} is ignored.

A more complex implementation could allow for differences in style preferences for names ending in "s". I would recommend still allowing |possessive=yes with a default style, but also allowing |possessive=MLA or |possessive=AMA. I recommend not allowing the full range of style guides, eg APA, AP, etc. for simplicity, consistency, and clarity.

Implementing this will primarily involve changing the core function in Module:Footnotes#L-163.

Thoughts? Objections? Daask (talk) 15:47, 10 November 2023 (UTC)Reply

I'm struggling to see the point of this. The short form reference just needs the harvid and a location/page. When would you want "Smith's (1999) study" when simply "Smith (1999)" would take you to the full citation where you could (if you had to) add additional information? Martin of Sheffield (talk) 15:59, 10 November 2023 (UTC)Reply
It looks like this would be used in article prose, but inline use of these templates is deprecated. How would this proposed change be useful inside <ref>...</ref> tags? – Jonesey95 (talk) 20:59, 10 November 2023 (UTC)Reply
If the authors name is Smith don't use the possive, or if the work is Smith's Encyclopedia use the |ref= field to setup the link however you want. I don't see how this is useful, the default is a link to the authors name and year of publication which doesn't need what is suggested.
Maybe it would be helpful if you clarified how and were this would be used. -- LCU ActivelyDisinterested transmissions °co-ords° 21:09, 10 November 2023 (UTC)Reply

Discussion at Module talk:Footnotes § loc, at

edit

  You are invited to join the discussion at Module talk:Footnotes § loc, at. Rjjiii (talk) 02:45, 4 May 2024 (UTC)Reply