Module talk:Footnotes

(Redirected from Category talk:Harv and Sfn template errors)
Latest comment: 22 days ago by SMcCandlish in topic loc, at

loc, at edit

Would be nice for conversion ease and memorability if |loc= had an alias of |at= to match all the CS1/CS2 templates, and the /doc pages were updated to use the latter instead of the confusingly different former (or at least list both). I'm willing to take care of the latter part if someone with more Lua skillz does the first.  — SMcCandlish ¢ 😼  21:44, 12 January 2024 (UTC)Reply

Knock knock, anyone home?  — SMcCandlish ¢ 😼  01:01, 5 February 2024 (UTC)Reply
Yes, please! Gawaon (talk) 16:01, 5 February 2024 (UTC)Reply
@SMcCandlish and Gawaon: Template:Sfn/testcases Rjjiii (talk) 04:41, 31 March 2024 (UTC)Reply
Thank you! But hmm, while the new test case uses "at" in the header, it still uses "loc" in the actual example. Is that a mistake or are I misunderstanding something? Gawaon (talk) 07:09, 31 March 2024 (UTC)Reply
Whatever the issue was, it seems resolved now. I see a test case for |loc= and one just below it for |at=, with the live template not showing that new parameter working (since it's not implemented yet), but the sandbox version showing it working as-expected.  — SMcCandlish ¢ 😼  02:18, 1 April 2024 (UTC)Reply

Another Tolkien to whitelist edit

Hi Renata3, could you add this for {{ME-ref|SK}}?

['CITEREFTolkien2015'] = template_names['ME-ref']

Thanks, Andy02124 (talk) 20:27, 11 March 2024 (UTC)Reply

Added. Renata3 06:04, 12 March 2024 (UTC)Reply
Thank you. Andy02124 (talk) 02:03, 13 March 2024 (UTC)Reply

I can't keep up with these Tolkien people edit

Hi Renata3, here's another one, for an edition of Tom Bombadil.

['CITEREFTolkien2014'] = template_names['ME-ref']

Thanks. Andy02124 (talk) 15:59, 15 March 2024 (UTC)Reply

I've trawled through how {{ME-ref}} works to see if there are any others. The following should also be added;
['CITEREFTolkien2015'] = template_names['ME-ref']
['CITEREFTolkien2018'] = template_names['ME-ref']
['CITEREFShippey2001'] = template_names['ME-ref']
That should ensure no more come up in future (unless they modify the templates or create new ones). -- LCU ActivelyDisinterested «@» °∆t° 20:07, 15 March 2024 (UTC)Reply
Done, added all four. Renata3 01:30, 16 March 2024 (UTC)Reply
Thanks to you both. And also, thanks, ActivelyDisinterested, for doing the same a while back with the Antarctic antarids. Andy02124 (talk) 21:23, 16 March 2024 (UTC)Reply

{{SfnRef}} edit

I found the discussion Help_talk:Citation_Style_1/Archive_92#Best_practices_for_a_full_citation_with_no_author,_when_linked_by_shortened_footnotes (which is discussed by @Rjjiii, @Redrose64, @Mathglot and others) and realized I have no clue on the history of {{SfnRef}}/{{harvid}}, and would appreciate your pointing me to a right direction on two questions.

The automatically generated anchor in the case of having no surname entry in |author= , |editor= , |translator= , |last= , etc. in the journal citation template defaults to CITEREFpublicationnameYEAR, so a valid reason for adding '|ref={{SfnRef}}' might be, to enable using a shorter anchor name in place of full publication name (which is very convenient as the name often is long and may be in, or include, foreign characters). However, "why Template:SfnRef says '{{SfnRef|Surname of author|Year}}' instead of '{{SfnRef|Anchor name|Year}}' ?"
(Citation templates automatically generate the anchorID CITEREFsurnameYEAR if surname is available, without having a |ref= or {{SfnRef}} entry. Isn't the use of SfnRef thus meant for when |author= , |editor= , etc. is not available because there is no credited author/editor/translator, i.e, when surname is not available by definition?)


My second question is: "Since surname or publication name is automatically used in anchor generation without adding '|ref= ', wouldn't it be better to abolish {{SfnRef}} and make '|ref= ' do what '|ref={{SfnRef}}' does now?"
In other words, isn't '|ref=anchorname(YEAR)' (which does not work now) much better than '|ref={{SfnRef|anchorname|YEAR}}' because it is shorter with one less template to do the same thing? (Or creating '|anchor= ' to accept anchorname(YEAR) and deprecating '|ref= ' and '{{SfnRef}}' easier to implement?)


Answer/guidance will be appreciated. Yiba (talk | contribs) 12:32, 30 March 2024 (UTC)Reply

Your notion that {{cite journal}} creates CITEREFpublicationnameYEAR when the template does not have author/contributor/editor name(s) is unfounded. See this example:
{{cite journal |title=Title |journal=Journal |date=2024}}
which renders this output:
'"`UNIQ--templatestyles-00000017-QINU`"'<cite class="citation journal cs1">"Title". ''Journal''. 2024.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Journal&rft.atitle=Title&rft.date=2024&rfr_id=info%3Asid%2Fen.wikipedia.org%3AModule+talk%3AFootnotes" class="Z3988"></span>
Were what you say true, you would see an id= attribute in opening <cite> tag:
<cite id="CITEREFJournal2024" ...>
Editors can (and do) put anything they want in |ref=. There is no requirement to use |ref={{sfnref}}.
Trappist the monk (talk) 12:59, 30 March 2024 (UTC)Reply
Thank you. I checked the example I had again and it was a case of somebody wrongly using '|author=publicationname', sorry about my mistake. My questions still stand though:
1. Why Template:SfnRef says '{{SfnRef|Surname of author|Year}}' instead of '{{SfnRef|Anchor name|Year}}' ?
2. Why not create '|anchor= ' to accept anchorname(YEAR) and deprecate '|ref= ' and '{{SfnRef}}' ?
Editors putting anything they want in |ref= and there is no requirement to use |ref= do not answer the questions, and it might even strengthen my point on the second question, as anything other than CITEREFsomethingYEAR or {{SfnRef}} after |ref= has no meaning and is garbage as far as I can tell. Yiba (talk | contribs) 14:47, 30 March 2024 (UTC)Reply
{{sfn}} and the various {{harv}} templates are Parenthetical references (often called author-date references or Harvard references) so those templates emphasize that aspect. {{SfnRef}}, in keeping with its name and association with {{sfn}} and the {{harv}} templates, does the same.
A commonly used convention is to create wikilinks like this:
#some ref value[[#some ref value]] – wikilinks may or may not be piped; not piped here for clarity
and then use the wikilink to link to a particular citation:
"Title". Journal. 2024.{{cite journal |title=Title |journal=Journal |date=2024 |ref=some ref value}}
It is also the case that some editors create named references where |ref= has the same name:
<ref name="some name">{{cite ... |ref=some name}}</ref>
these types of references are mostly pointless but relatively rare.
Trappist the monk (talk) 15:15, 30 March 2024 (UTC)Reply
Thank you for the explanation. I now understand how |ref= may be used other than CITEREFanchornameYEAR or {{SfnRef}} for mostly pointless and rare reasons, and that SfnRef name was so chosen for customary emphasis on the association with sfn. That still do not answer the questions:
1. Why Template:SfnRef says '{{SfnRef|Surname of author|Year}}' instead of 'CITEREFAnchor_nameYear' ?
2. Why not create '|SfnAnchor= ' to accept anchorname(YEAR) and deprecate '|ref= ' and 'CITEREF' ?
(Re-worded for ease of understanding. The name does not matter to me.) Yiba (talk | contribs) 16:30, 30 March 2024 (UTC)Reply
|ref= is used for more than just links to sfn templates, so it cannot be deprecated in the way you suggest.
The documentation for sfnref also mentions |ref=harv a practice several years out of date, anyone can update the documents (it is only the template itself that is locked). -- LCU ActivelyDisinterested «@» °∆t° 17:04, 30 March 2024 (UTC)Reply
Sorry, paste mistake. 1. should read:
1. Why Template:SfnRef says '{{SfnRef|Surname of author|Year}}' instead of '{{SfnRef|Anchor name|Year}}' ?
Yiba (talk | contribs) 17:18, 30 March 2024 (UTC)Reply
I answered that already. {{sfn}} is a Parenthetical reference (author-date) template. Because author-date is its most common use case, the documentation for {{sfn}}, the {{harv}} templates, and {{sfnref}} reflect the author-date heritage.
Trappist the monk (talk) 18:06, 30 March 2024 (UTC)Reply
Using |author=pubname is not necessarily wrong.
{{cite web |author=Fun Facts |website=FunFacts.com |title=Man bites dog}} allows
This is whack!{{sfn|Fun Facts}} to point to the citation.
To answer your questions:
1. Template documentation does not, admittedly, cover every use case. But then the documentation, not the code, should be updated.
2. Adding a new parameter or deprecating old ones is a task that should not be undertaken unless you can demonstrate that it results in a major improvement. Adding anchor as a sort of synonym for ref is not that.
As for putting "anything" in the ref parameter - that's a bit of hyperbole. "Anything" that results in a valid CITEREF would be more accurate. A title is the most common replacement for author.
{{sfn|Military Balance 2016}} points to {{cite book |title=The Military Balance 2016 |date=February 2016 |volume=116 |isbn=978-1-85743-835-2 |publisher=Routledge |ref={{sfnref|Military Balance 2016}} |author=International Institute for Strategic Studies}}
Also, be careful when translating pages from foreign language wikis for the English wiki; they use ref= differently. Andy02124 (talk) 15:52, 30 March 2024 (UTC)Reply
Thank you, thank you, thank you. Now I feel someone is on the same page.
1. OK, I will try editing the documentations unless someone else comes up with other reasons not to, within a reasonable time.
2. I understand, and somewhat reluctantly agree.
Because of how Template:SfnRef is written, especially how it appears as if SfnRef requires surname when there is no credited author/editor, etc., I thought there may be some unknown reason why SfnRef came into existence.
Just to make sure before I start editing, am I correct in understanding that:
a. SfnRef does not require a surname when there is no credited author/editor etc.
b. Citing templates (cite book, journal, web etc.) do not require surname when there is no credited author/editor etc.
There are many doc and description pages (and examples) that mislead the readers on the above b. in my opinion (as if they were written before |ref= came into being). Yiba (talk | contribs) 17:05, 30 March 2024 (UTC)Reply
Writing and updating documentation is rarely a task editors want to take on and editors can't be forced to edit, so documentation is always a bit lacking. This isn't an issue limited to Wikipedia but common across most projects. -- LCU ActivelyDisinterested «@» °∆t° 17:08, 30 March 2024 (UTC)Reply
Indeed, Indeed. Yiba (talk | contribs) 17:26, 30 March 2024 (UTC)Reply
a. SfnRef does not require author/contributor/editor names. Any text is allowed but author/contributor/editor names are preferred.
b. As above, cs1|2 templates do not require author/contributor/editor names. If none are credited, do not misuse the |author= / |contributor= / |editor= parameters just to avoid the need to use a custom value in |ref=.
|ref= has been a cs1|2 parameter since c. 2005.
Trappist the monk (talk) 18:06, 30 March 2024 (UTC)Reply

Using |author=pubname is not necessarily wrong.

But is generally not correct. Do not abuse cs1|2 parameters. If the publisher is not the author, do not say that the publisher is the author just to avoid the need to use a custom value in |ref=.
Trappist the monk (talk) 18:06, 30 March 2024 (UTC)Reply
Why are we having this discussion here and not at Template talk:SfnRef?
Trappist the monk (talk) 18:08, 30 March 2024 (UTC)Reply

Yiba, the documentation for {{sfnref}} may not make clear why you'd need the template. Help:Shortened footnotes#Linking includes this list of situations:

The anchor can be created manually with {{sfnref}} or {{harvid}} in situations where the automatic anchors would create issues including:

  • Multiple authors with the same last name
  • No known last name for the author
  • Unusual characters in the author field
  • Multiple works in the same year by the same author
  • Year of publication unknown

If it appears as if SfnRef requires surname when there is no credited author/editor, this is a shortcoming in the template documentation. It will take an author, organization, title, and more. For example, this citation has an organization and effective date, neither of which would make sense for |author= or |date=:

Markup Renders as
Leroy Chollet was inducted into the Canisius Hall of Fame in 1964.{{sfn|Canisius|1964}}

==Citations==

<references/>

==References==

{{cite web |ref={{Sfnref|Canisius|1964}} |url= https://gogriffs.com/honors/hall-of-fame/leroy-chollet/5 |title= Leroy Chollet |publisher=Canisius College Athletics |work=Hall of Fame |access-date= March 30, 2023}}

Leroy Chollet was inducted into the Canisius Hall of Fame in 1964.[1]

Citations
  1. ^ Canisius 1964. sfn error: multiple targets (2×): CITEREFCanisius1964 (help)
References

"Leroy Chollet". Hall of Fame. Canisius College Athletics. Retrieved March 30, 2023.

Also, thanks to Mathglot for the ping. Also, also, Trappist the monk if you want to move the discussion and leave a link here, that seems fine. Rjjiii (talk) 20:11, 30 March 2024 (UTC)Reply

@Rjjiii, thanks a lot for the excellent info and the clear, simple and easy to understand example. I really appreciate the time you took in coming up with this.
Now, someone said in Help_talk:Citation_Style_1/Archive_92/Best_practices_for_a_full_citation_with_no_author,_when_linked_by_shortened_footnotes that "Anything used in the CITEREF should either appear verbatim in the full citation or be listed in a "(Cited as Short Name)" parenthetical immediately following the full citation." and I am scratching my head. Having |ref={{Sfnref|Canisius|1964}} in the full citation is, or is not enough and something like:
"Leroy Chollet". Hall of Fame. Canisius College Athletics. Retrieved March 30, 2023 (Cited as Canisius 1964).{{cite web}}: CS1 maint: postscript (link)
is needed or recommended in your view? I see his point that sometimes a word that does not appear anywhere else in the full citation like "PanthersNews" is felt by the editor to be more appropriate as the sfnref anchor name in place of "Canisius", in which cases looking up where the full citation is referenced in the article becomes difficult without the (Cited as ). Yiba (talk | contribs) 03:40, 31 March 2024 (UTC)Reply
Not sure why that long link red-linked, but I think you meant this Help talk page. Mathglot (talk) 03:54, 31 March 2024 (UTC)Reply
When dealing with short citations of works without author, I normally use |author=Anon.; simple. -- Michael Bednarek (talk) 04:35, 31 March 2024 (UTC)Reply
That would be fine. As a result of the conversation you linked, I ended up doing this: Leroy Chollet#References. APA says the short citation should look something like "Canisius College Athletics, n.d." and Harvard says something like "Canisius College Athletics, no date" either of which will work with {{sfnref}}. You could also use the title instead of the organization, which may be more natural with the {{cite xxx}} templates. Documentation should reflect best practices, but we don't have a standard citation method across the encyclopedia (WP:CITEVAR). Rjjiii (talk) 04:39, 31 March 2024 (UTC)Reply
I see! Your solution on that page:
* Canisius (1964). {{cite web |ref={{Sfnref|Canisius|1964}} |blahbleh... }}
is far cleaner than my (very ugly on the code level) example above. I like it. Thank you very much. Yiba (talk | contribs) 06:24, 31 March 2024 (UTC)Reply

Yiba, your questions are worthy, and I appreciate you raising and discussing the finer points and adding the follow-ups to help come to a resolution. It sounds like you may have gotten the responses you needed (even if not always the hoped-for one, perhaps) so it seems like this has been very productive. It sounds like you are willing to update some of the doc based on what you have learned here, and I think that's a great idea and would help many others going forward. Besides a certain level of unwillingness on the part of some editors to work on doc as mentioned previously, sometimes even when there is a will to do so, it can be hard for editors who are too familiar with a topic to see where the pain points are for a newer editor or one encountering a doc page about some template or other item for the first time. So I value the feedback and questions of newer editors and encourage them to try their hand at updating a doc page they find confusing, incomplete, or inadequate in other ways, as they may perceive where the problems are better than more senior editors can, and I encourage you to do so.

Sidebar: as it happens, I'm one of the editors who actually likes making doc pages better, especially when I find them confusing to me personally; I just don't always have time for it. The doc for Template:Archives is the most recent example of that, and I'd very much appreciate hearing your feedback about the documentation there. (For comparison, the earlier version I found confusing is this one.) If interested, please use Template talk:Archives for feedback, not this page.

Am I correct that you feel that your questions are basically resolved? I hope to see you active in improving Wikipedia's documentation at {{SfnRef/doc}}, or any page you think needs it. If you want more eyeballs or feedback, you can leave a request at any template's Talk page; and if you have some ideas about improvement but are unsure and prefer to make a doc update proposal, you can use template {{Help me}} from a template Talk page to propose doc changes or ask for feedback on your previous changes and someone else will come by and respond. If you don't get enough feedback you can also make a feedback request at Wikipedia talk:WikiProject Templates. There is such a request now at the bottom of the page, and you could copy that one or use similar wording to draw attention to any doc page updates you are doing, or wish to do. Hope this helps, Mathglot (talk) 21:15, 30 March 2024 (UTC)Reply

@Mathglot, thanks a lot for your support in this process. Looking forward to working with you and others. Yiba (talk | contribs) 06:49, 31 March 2024 (UTC)Reply