Template talk:Harvard citation documentation
missing link
[edit]i think that this doc should, at some point, point to Wikipedia:Harvard referencing.
--Jerome Potts (talk) 04:50, 30 March 2008 (UTC)
Done ---- CharlesGillingham (talk) 18:17, 16 November 2010 (UTC)
Why are these two pages kept?
[edit]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
[edit]{{Cite report}} and {{Cite thesis}} now support |ref=
. ---— Gadget850 (Ed) talk 09:09, 4 April 2012 (UTC)
Use of letters with dates
[edit]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{{sfn}}
and the{{harv}}
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:
{{cite book |title=Title |last=Last |date=16 October 2013a |ref=harv}}
- produces this output:
'"`UNIQ--templatestyles-00000001-QINU`"'<cite id="CITEREFLast2013a" class="citation book cs1">Last (16 October 2013a). ''Title''.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Title&rft.date=2013-10-16&rft.au=Last&rfr_id=info%3Asid%2Fenbaike.710302.xyz%3ATemplate+talk%3AHarvard+citation+documentation" class="Z3988"></span> <span class="cs1-visible-error citation-comment"><code class="cs1-code">{{[[Template:cite book|cite book]]}}</code>: </span><span class="cs1-visible-error citation-comment">Invalid <code class="cs1-code">|ref=harv</code> ([[Help:CS1 errors#invalid_param_val|help]])</span>
- Notice that the anchor is
CITEREFLast2013
notCITEREFLast2013a
as one might expect. In the metadata you can see that the date is corrupted:&rft.date=16+October+2013a
. But, this citation:{{cite book |title=Title |last=Last |date=16 October 2013 |year=2013a |ref=harv}}
- produces this output where both the anchor and the metadata are correct:
'"`UNIQ--templatestyles-00000005-QINU`"'<cite id="CITEREFLast2013a" class="citation book cs1">Last (16 October 2013). ''Title''.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Title&rft.date=2013-10-16&rft.au=Last&rfr_id=info%3Asid%2Fenbaike.710302.xyz%3ATemplate+talk%3AHarvard+citation+documentation" class="Z3988"></span> <span class="cs1-visible-error citation-comment"><code class="cs1-code">{{[[Template:cite book|cite book]]}}</code>: </span><span class="cs1-visible-error citation-comment">Invalid <code class="cs1-code">|ref=harv</code> ([[Help:CS1 errors#invalid_param_val|help]])</span><span class="cs1-maint citation-comment">CS1 maint: date and year ([[:Category:CS1 maint: date and year|link]])</span>
- 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.
- 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
. 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)|date=
or|year=
when used without|date=
- Can you identify those parts of the change that aren't clear? What improvements would you make?
- This citation:
{{cite book |title=Title |last=Last |year=2013a |ref=harv}}
- produces this output which has the correct anchor but corrupted metadata:
'"`UNIQ--templatestyles-0000000D-QINU`"'<cite id="CITEREFLast2013a" class="citation book cs1">Last (2013a). ''Title''.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Title&rft.date=2013&rft.au=Last&rfr_id=info%3Asid%2Fenbaike.710302.xyz%3ATemplate+talk%3AHarvard+citation+documentation" class="Z3988"></span> <span class="cs1-visible-error citation-comment"><code class="cs1-code">{{[[Template:cite book|cite book]]}}</code>: </span><span class="cs1-visible-error citation-comment">Invalid <code class="cs1-code">|ref=harv</code> ([[Help:CS1 errors#invalid_param_val|help]])</span>
- This citation:
- 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.
- So, what I said is, I think, true. If you need to disambiguate a citation, you must use both
- So the correct usage in this case is what? The following?
- {{cite book |title=Title |last=Last |year=2013a |date=2013 |ref=harv}}
- 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)
- So the correct usage in this case is what? The following?
- 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'm not sure what action should be taken with regard to existing citations with suffixed
- 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?
- 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#Date_checking. Comments and opinions solicited.
duplicate inclusion problem
[edit]Martin of Sheffield Please see [1], 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)
- 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)
- 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)
too concise and axing wikilinks does not help the newbies
[edit]In this edit, J. Johnson 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. ♦ 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.)
- 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 "
- 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. ♦ 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)
- 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. ♦ J. Johnson (JJ) (talk) 23:56, 2 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. ♦ 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)
- 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. ♦ J. Johnson (JJ) (talk) 22:56, 3 September 2019 (UTC)
Prospective work
[edit]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. ♦ J. Johnson (JJ) (talk) 23:06, 11 September 2019 (UTC)
{{sfn}}
is essentially{{harvnb}}
wrapped in<ref name="x">...</ref>
where"x"
is generated automatically based upon the supplied parameters. They are very closely related. --Redrose64 🌹 (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. ♦ 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. ♦ J. Johnson (JJ) (talk) 21:45, 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)
- 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. ♦ J. Johnson (JJ) (talk) 20:23, 12 September 2019 (UTC)
Name suffixes
[edit]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:
{{cite book |last=Black |first=A Jr |last2=Green |first2=R III |title=Title |date=2019 |ref=harv}}
{{harvnb|Black|Green|2019}}
- —Trappist the monk (talk) 00:20, 8 December 2019 (UTC)
I recall this working at DVT years ago, but it doesn't anymore
[edit]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 [[#CITEREFGuyatt2012|Guyatt et al. 2012]]
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:
{{cite journal | vauthors = Guyatt GH, Akl EA, Crowther M, Gutterman DD, Schuünemann HJ | title = Executive summary: Antithrombotic Therapy and Prevention of Thrombosis, 9th ed: American College of Chest Physicians Evidence-Based Clinical Practice Guidelines | journal = Chest | volume = 141 | issue = 2 Suppl | pages = 7S–47S | date = February 2012 | pmid = 22315257 | pmc = 3278060 | doi = 10.1378/chest.1412S3 | ref = harv | author1link = Gordon Guyatt | displayauthors = 3 }}
- Guyatt GH, Akl EA, Crowther M, Gutterman DD, Schuünemann HJ (February 2012). "Executive summary: Antithrombotic Therapy and Prevention of Thrombosis, 9th ed: American College of Chest Physicians Evidence-Based Clinical Practice Guidelines". Chest. 141 (2 Suppl): 7S–47S. doi:10.1378/chest.1412S3. PMC 3278060. PMID 22315257.
{{cite journal}}
: Invalid|ref=harv
(help); Unknown parameter|displayauthors=
ignored (|display-authors=
suggested) (help)
- Guyatt GH, Akl EA, Crowther M, Gutterman DD, Schuünemann HJ (February 2012). "Executive summary: Antithrombotic Therapy and Prevention of Thrombosis, 9th ed: American College of Chest Physicians Evidence-Based Clinical Practice Guidelines". Chest. 141 (2 Suppl): 7S–47S. doi:10.1378/chest.1412S3. PMC 3278060. PMID 22315257.
- The template expects
#CITEREFGuyattAklCrowtherGutterman2012
. - To retain the wikilink for the article uses you must match what the template expects so:
[[#CITEREFGuyattAklCrowtherGutterman2012|Guyatt et al. 2012]]
→ Guyatt et al. 2012
- Alternately you can change
|ref=harv
to|ref={{sfnref|Guyatt2012}}
:{{cite journal | vauthors = Guyatt GH, Akl EA, Crowther M, Gutterman DD, Schuünemann HJ | title = Executive summary: Antithrombotic Therapy and Prevention of Thrombosis, 9th ed: American College of Chest Physicians Evidence-Based Clinical Practice Guidelines | journal = Chest | volume = 141 | issue = 2 Suppl | pages = 7S–47S | date = February 2012 | pmid = 22315257 | pmc = 3278060 | doi = 10.1378/chest.1412S3 |ref={{sfnref|Guyatt2012}} | author1link = Gordon Guyatt | displayauthors = 3 }}
- Guyatt GH, Akl EA, Crowther M, Gutterman DD, Schuünemann HJ (February 2012). "Executive summary: Antithrombotic Therapy and Prevention of Thrombosis, 9th ed: American College of Chest Physicians Evidence-Based Clinical Practice Guidelines". Chest. 141 (2 Suppl): 7S–47S. doi:10.1378/chest.1412S3. PMC 3278060. PMID 22315257.
{{cite journal}}
: Unknown parameter|displayauthors=
ignored (|display-authors=
suggested) (help)
- Guyatt GH, Akl EA, Crowther M, Gutterman DD, Schuünemann HJ (February 2012). "Executive summary: Antithrombotic Therapy and Prevention of Thrombosis, 9th ed: American College of Chest Physicians Evidence-Based Clinical Practice Guidelines". Chest. 141 (2 Suppl): 7S–47S. doi:10.1378/chest.1412S3. PMC 3278060. PMID 22315257.
- so:
[[#CITEREFGuyatt2012|Guyatt et al. 2012]]
→ Guyatt et al. 2012
- Alternately, you can convert
[[#CITEREFGuyatt2012|Guyatt et al. 2012]]
to{{sfn}}
... - —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.
[edit]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"
[edit]@JPxG: Yes, when viewed directly, this page is full of broken syntax involving {{{1}}}
. 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
[edit]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 § Link works but displays a no target error in this edit:
If you are testing changes in Special:ExpandTemplates and the error message cannot be suppressed, try testing in a sandbox or user subpage instead.
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. Trappist the monk, 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
CITEREF
anchor IDs. When the current short-form reference'sCITEREF
anchor ID doesn't match one of the constructedCITEREF
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'sCITEREF
anchor ID in an empty list of constructedCITEREF
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 tomw.title.getCurrentTitle():getContent()
(line 110) returnsnil
. When that happens, the variableArticle_content
is assigned the value of 'empty string'. BecauseArticle_content
is an empty string, there is nothing for the module to evaluate so it cannot compile a list ofCITEREF
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
CITEREF
anchor IDs that the module found, a list of the templates in the article, and the content of{{sfn whitelist}}
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)
- 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)
- 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)
- I understood what you were saying. In answer, I'll repeat myself:
- 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)
Two names no date
[edit]@Michael Bednarek: Edit this reference to see it working (Lane & Singh).
Lane; Singh. Demo Citation. 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 (Lane & Sept. 1997). 2600:100F:B1BC:853F:0:B:15FC:9601 (talk) 08:59, 9 October 2023 (UTC)
Use of param 'loc' for quotations
[edit]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)