Template talk:Harvc
Add topic
DOI parameter
[edit]Could we get a parameter for a DOI for the chapter? Chapter-level DOI identifiers are getting somewhat common and it would something useful to add. Ifly6 (talk) 17:39, 12 August 2022 (UTC)
- Simple workaround:[1]
- Smith (2001). A larger work.
- Doe, Jane. "17. A chapter with a DOI". In Smith (2001). doi:10.1000/xyz123
- Michael Bednarek (talk) 02:58, 13 August 2022 (UTC)
- Thanks! Ifly6 (talk) 05:18, 21 March 2023 (UTC)
- @Trappist the monk: I'm looking to implement this myself but I'm not exactly sure how the DOIs are pieced together from Module:Citation/CS1/Identifiers into Module:Citation/CS1. I'm not sure what these parameters do in the latter calling the former:
ID_list, ID_list_coins = identifiers.identifier_lists_get (args, {DoiBroken = DoiBroken, ASINTLD = A['ASINTLD'], Embargo = Embargo, Class = Class, Year=anchor_year}, ID_support);- I think those are passed as variable
options_twith variables are mainly from an argument wrapper? I'm also confused as to whatoptions_tandid_supportdo. Any help would be appreciated. Ifly6 (talk) 20:13, 17 June 2025 (UTC)- I recently rewrote
{{doi}}to use Module:Doi. Since then, because of discussion at Help talk:Citation Style 1 § CS0, I wrote Module:Sandbox/trappist the monk/identifiers as a prospective replacement for several (most?) cs1|2-supported identifier templates. The sandbox module will likely replace Module:Doi. - So, rather than fork a duplicate of the cs1|2 code, perhaps it is best to wait until the sandbox module is finished?
- —Trappist the monk (talk) 21:54, 17 June 2025 (UTC)
- I was unaware that anything was happening on that front. Thanks for your contributions; I'll hold off. Ifly6 (talk) 22:02, 17 June 2025 (UTC)
- I recently rewrote
References
Chapter doi
[edit]Trappist the monk, can we add a |chapter-doi parameter, separate from |chapter-url? Or is the workaround here Template_talk:Harvc#DOI_parameter sufficient? Bogazicili (talk) 20:59, 6 October 2024 (UTC)
Adding whitelist/wrapper template handling to this template
[edit]Currently, Module:Harvc generates a "harvid" reference id and checks to see whether it exists on the page, showing an error if it does not. This currently does not work for "wrapper templates" (e.g., {{Cite Cambridge History of China}}) which generate non-unique citations depending on parameters. Currently, editors have to set |ignore-err=yes to suppress errors in this case.
In the Module:Harvc/sandbox, I have altered the target checking function (target_check()) to call the version in Module:Footnotes that does handle wrapper templates and whitelisting. I've updated the test cases to test both the "no target" case and the case where a wrapper template is whitelisted (e.g., no errors are generated).
Folly Mox and Trappist the monk believe that this used to work. I don't have an easy way to check that, but it doesn't work currently and the sandbox version makes it work.
Any comments or thoughts on this? Any objections to me copying Module:Harvc/sandbox and Module:Footnotes/sandbox to their corresponding live templates? — hike395 (talk) 21:30, 25 January 2025 (UTC)
- I think that I already said that if you have a workable solution, apply it.
- —Trappist the monk (talk) 23:02, 25 January 2025 (UTC)
Implemented Please let me know if you see anything odd. — hike395 (talk) 16:14, 26 January 2025 (UTC)
Adding translated titles
[edit]Currently there isn't a param for translated chapter titles, like |trans-title= in {{citation}} and its variants; think similar could be added here. Maybe |ct=? seefooddiet (talk) 22:38, 6 February 2025 (UTC)
Anchors without a publication year?
[edit]Is it possible to use {{harvc}} to anchor to something like Plutarch, Parallel Lives without a publication year? Ifly6 (talk) 08:58, 9 February 2025 (UTC)
- No, but when you quote Plutarch, you quote from a specific edition, not from his 2nd-century text, right? OTOH, "Plutarch's remarks on Pericles suggest …[1]" -- Michael Bednarek (talk) 10:07, 9 February 2025 (UTC)
- The second century text doesn't exist. Not to get too in the weeds there are only later manuscripts (scribal copies) which are emended to produce a composite version which is what scholars think Plutarch would have written. The versions after that are specific translations usually. Regardless, it is not customary in the field to cite a specific passage by the critical text edition or translation. Ifly6 (talk) 16:15, 10 February 2025 (UTC)
- So what is customary in the field? I find it hard to believe that a citation supporting a particular assertion doesn't require a specific citation. Does the shown example answer you question? -- Michael Bednarek (talk) 01:36, 11 February 2025 (UTC)
- What would be customary in the field would be something like (to use Oxford Classical Dictionary abbreviations)
Plut. Mar. 5
. My question is how to construct the anchor. If I had entries as follows, it tells me I need to provide a year: - Passing
|year=ndalso doesn't seem to work either: none. "Marius". In Plutarch, Parallel Lives (nd). Nor can I suppress the apparent demand for an author. - If I could just put down a wish list, I'd like it to display with no quotes in italics, to not require a year (or to specify the {{harvc}} → {{cite book}} link by {{harvid}}), and then to specify anchor (for {{harvnb}} → {{harvc}}) also by {{harvid}}. Right now I would have to list each Plutarch Life separately by repeatedly invoking {{cite book}}, which I think this template(?) can help avoid. Ifly6 (talk) 03:02, 11 February 2025 (UTC)
- What would be customary in the field would be something like (to use Oxford Classical Dictionary abbreviations)
- So what is customary in the field? I find it hard to believe that a citation supporting a particular assertion doesn't require a specific citation. Does the shown example answer you question? -- Michael Bednarek (talk) 01:36, 11 February 2025 (UTC)
- The second century text doesn't exist. Not to get too in the weeds there are only later manuscripts (scribal copies) which are emended to produce a composite version which is what scholars think Plutarch would have written. The versions after that are specific translations usually. Regardless, it is not customary in the field to cite a specific passage by the critical text edition or translation. Ifly6 (talk) 16:15, 10 February 2025 (UTC)
References
- ↑ Plutarch, Parallel Lives, Pericles.
"Template:Sfnc" listed at Redirects for discussion
[edit]
The redirect Template:Sfnc has been listed at redirects for discussion to determine whether its use and function meets the redirect guidelines. Readers of this page are welcome to comment on this redirect at Wikipedia:Redirects for discussion/Log/2025 March 19 § Template:Sfnc until a consensus is reached. Steel1943 (talk) 23:07, 19 March 2025 (UTC)
Add ref parameter
[edit]I'd like to be able to use a parameter like |ref={{harvid|Lintott, ''Constitution''|1999}} to set the anchor directly by name, just like as is possible with {{cite book}}. Can that be added? Ifly6 (talk) 07:17, 17 June 2025 (UTC)
- Otherwise, if this is what the
|id=parameter already does, is the name mismatch intentional and can the API be made consistent? Ifly6 (talk) 07:21, 17 June 2025 (UTC)- Yes you can use {{harvid}} in
|id=, and link to it with any of the sfn or harv templates, it functions the same as|ref=in {{cite book}}. I'll leave the question of consistency up to someone who can edit modules. -- LCU ActivelyDisinterested «@» °∆t° 10:32, 17 June 2025 (UTC)
- Yes you can use {{harvid}} in
Year=N.D. in a Harvc causes error but normal solution of using date= instead causes different problem
[edit]Hello! I've been fixing Category:CS1 maint: year errors recently. These are often caused by anything other than just a year (or sfn/harv anchor letter attached to the year) in the field. This is easily fixed by using a date= instead, as that can contain a more flexible date range. The other frequent cause of the error is "N.D." used to denote No Date in a year= field. Again the easy fix is to swap to the use of a date= field. However, I've just encountered a situation where this workaround can't be used. In Harvc templates replacing the year=N.D. with date=N.D. fixes the Year error on the page but instead adds a red notice of a "harvc: missing |year=" by the ref. See my edit here. I ended up reverting that edit as the "harvc: missing |year=" was more intrusive than the year error. But neither is a great solution. Is there anyway the Harvc template could be made to accept the date= as an alternative to the year= field as is the case with normal templates? Or is there some workaround I'm missing for unknown years in harvc templates? Thank-you kindly for any help/advice! Take care, LooksGreatInATurtleNeck (talk) 11:15, 18 September 2025 (UTC)
- Using
|year=in {{harvc}} and|date=in {{Cite encyclopedia}} works: - "…or wearing heavenly articles.[1]"
References
- ↑ Webb, Gisela. "Angel". In McAuliffe (n.d.).
- McAuliffe, Jane Dammen, ed. (n.d.). Encyclopaedia of the Qur'an Online. Brill Academic Publishers.
- -- Michael Bednarek (talk) 11:50, 18 September 2025 (UTC)
- Hello Michael Bednarek! Thank-you kindly for the replying! Okay I see, taking another look at the article Islam & the problem with my initial edit was I fixed all the year=n.d entries as would normally be the case, however it turns out harvc templates are an instance of a template that can accept a year=n.d. without throwing a Category:CS1 maint: year error. Changing the year in them to date causes the other error but as they accept n.d. there's no need to change them. So I've gone back & swapped only the non harvc year=n.d. fields to date=n.d. & successfully cleared the Year error without side effects.
- That's the first time I've seen a template that lets a year=n.d. pass without error, you'd think normal year= fields would be able to accept the n.d. entry. Anyway I'll remember that about harvc in future, in case I ever encounter the issue again. Thanks again for reply! Take care, 13:03, 18 September 2025 (UTC) LooksGreatInATurtleNeck (talk) 13:03, 18 September 2025 (UTC)
Would "cite chapter" be a better name?
[edit]This is a great template.
It seems to me that this template functions more like the {{cite}} family of templates than the {{harv}} family -- it's the target of the link in a short citation, not the source of the link. So I think {{cite chapter}} or {{cite section}} would be a better name.
Partly motivated by the fact the original use of the {{harv}} templates has been deprecated (that is "Harvard" style citations) are deprecated. They can only be used in shortened footnotes now, and the most popular short footnote template is {{sfn}}. So "harv" is becoming less and less relevant. ---- CharlesTGillingham (talk) 03:04, 24 June 2026 (UTC)
- There's already Template:Cite chapter which redirects to {{Cite book}} and has a lot of transclusions. -- Michael Bednarek (talk) 06:38, 24 June 2026 (UTC)
- Unfortunately the same is true for Template:Cite section. Harvc isn't the most descriptive of template names. -- LCU ActivelyDisinterested «@» °∆t° 07:14, 24 June 2026 (UTC)
- Just thinking through unused {{cite xxx}} template names to use as a full title for this template:
- {{cite part}}
- {{cite entry}}
- {{cite nested chapter}}
- Rjjiii (talk) 02:52, 25 June 2026 (UTC)
- Maybe 'cite part' would work, harvc could theoretically be used for more than just a book chapter and 'cite section' is already taken. 'Cite entry' could be a bit confusing as
|entry=is already used in {{cite encyclopedia}}. -- LCU ActivelyDisinterested «@» °∆t° 12:15, 25 June 2026 (UTC)
- Maybe 'cite part' would work, harvc could theoretically be used for more than just a book chapter and 'cite section' is already taken. 'Cite entry' could be a bit confusing as
- Just thinking through unused {{cite xxx}} template names to use as a full title for this template:
- Unfortunately the same is true for Template:Cite section. Harvc isn't the most descriptive of template names. -- LCU ActivelyDisinterested «@» °∆t° 07:14, 24 June 2026 (UTC)
{{harvc}}isn't a long-form citation template so shouldn't be named{{cite <whatever>}}because that would give the impression that it could/should be used in-place of a long-form citation template.{{harvc}}is designed to cite a contribution in a linked edited work when multiple contributions in the work are to be cited – a medial footnote template.- I suspect that I chose
{{harvc}}as a name because I suck at naming stuff and needed some sort of a name for the prospective template. The originating discussion is at Help talk:Citation Style 1/Archive 6 § Citing multiple contributions to a work. I have not reread that entire discussion but didn't see that anyone there pushed for a better name. - —Trappist the monk (talk) 14:29, 25 June 2026 (UTC)
- It's true, it's not a full fledged Citation Style 1 template. But it serves a similar function. It's true, it shouldn't be used on its own without a main citation. That could happen, and it would need to fixed. Maybe an error message down the road would help with that.
- But it's not in the "harv family" of (mostly deprecated) templates either. That's misleading.
- I like the suggestions above. What about {{sub-citation}}/{{sub-cite}}? That doesn't look a {{cite *}} template. Too "Code"y? ---- CharlesTGillingham (talk) 16:25, 25 June 2026 (UTC)
- That could be confused with the sub referencing system. -- Michael Bednarek (talk) 22:49, 25 June 2026 (UTC)
- Module:Harvc calls
target_check()in Module:Footnotes to check for a cs1|2 target. In the absence of a target, a properly formed{{harvc}}template will emit a missing target error message.{{harvc |last=Doe |first=John |c=Chapter 1 |in=Moe |year=1990}}- Doe, John. "Chapter 1". In Moe (1990). Harvc error: no target: CITEREFMoe1990 (help)
- Alas, the error message is suppressed by default so is only visible to those editors who have enabled its display; see :Category:Harv and Sfn no-target errors § Displaying error messages (method 3).
- —Trappist the monk (talk) 23:30, 25 June 2026 (UTC)