Module talk:Footnotes

loc, at
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)
 * Knock knock, anyone home?  — SMcCandlish ☏ ¢ 😼  01:01, 5 February 2024 (UTC)
 * Yes, please! Gawaon (talk) 16:01, 5 February 2024 (UTC)
 * Template:Sfn/testcases Rjjiii  (talk) 04:41, 31 March 2024 (UTC)
 * 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)
 * 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)
 * Any news on when this will actually appear in the wild? So far it's not working outside the sandbox prototype, it seems. Gawaon (talk) 10:42, 3 May 2024 (UTC)
 * There are a bunch of separate templates. Let me drop a notification at each to give folks a chance to comment if there are any issues. Rjjiii  (talk) 02:36, 4 May 2024 (UTC)
 * I've been waiting 6 years for this. (See prior discussion at Template talk:Sfn/Archive 3.) Thank you! Daask (talk) 10:01, 14 May 2024 (UTC)
 * this should now work on the various templates. For sfnm and sfnmp, xat works the same as xloc. For the technically unrelated harvs, I added "at" as an alias for "loc", but didn't add anything for its rarely used "loc2" and so on parameters. Rjjiii  (talk) 01:55, 18 May 2024 (UTC)
 * Huzzah! Thanks for getting that taken care of.  — SMcCandlish ☏ ¢ 😼  03:23, 18 May 2024 (UTC)

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= ' 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 ' ' instead of '  ' ?" (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= ' does now?" In other words, isn't '|ref=anchorname(YEAR)' (which does not work now) much better than ' |ref= ' 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)
 * Your notion that creates   when the template does not have author/contributor/editor name(s) is unfounded.  See this example:
 * which renders this output:
 * Were what you say true, you would see an  attribute in opening  tag:
 * Editors can (and do) put anything they want in ref. There is no requirement to use ref.
 * —Trappist the monk (talk) 12:59, 30 March 2024 (UTC)
 * 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 '  ' instead of '  ' ?
 * 2. Why not create '|anchor= ' to accept anchorname(YEAR) and deprecate '|ref= ' and ' ' ?
 * 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 after |ref= has no meaning and is garbage as far as I can tell.  Yiba  (talk | contribs) 14:47, 30 March 2024 (UTC)
 * and the various templates are Parenthetical references (often called author-date references or Harvard references) so those templates emphasize that aspect. , in keeping with its name and association with  and the  templates, does the same.
 * A commonly used convention is to create wikilinks like this:
 * ←  – wikilinks may or may not be piped; not piped here for clarity
 * and then use the wikilink to link to a particular citation:
 * It is also the case that some editors create named references where ref has the same name:
 * these types of references are mostly pointless but relatively rare.
 * —Trappist the monk (talk) 15:15, 30 March 2024 (UTC)
 * Thank you for the explanation. I now understand how |ref= may be used other than CITEREFanchornameYEAR or  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 ' ' instead of '' ?
 * 2. Why not create '|SfnAnchor= ' to accept anchorname(YEAR) and deprecate '|ref= ' and '' ?
 * (Re-worded for ease of understanding. The name does not matter to me.) Yiba  (talk | contribs) 16:30, 30 March 2024 (UTC)
 * 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 harv a practice several years out of date, anyone can update the documents (it is only the template itself that is locked). -- LCU A ctively D isinterested  «@» °∆t° 17:04, 30 March 2024 (UTC)
 * Sorry, paste mistake. 1. should read:
 * 1. Why Template:SfnRef says ' ' instead of '  ' ?
 * Yiba (talk | contribs) 17:18, 30 March 2024 (UTC)
 * I answered that already.  is a Parenthetical reference (author-date) template.  Because author-date is its most common use case, the documentation for, the  templates, and  reflect the author-date heritage.
 * —Trappist the monk (talk) 18:06, 30 March 2024 (UTC)
 * Using  is not necessarily wrong.
 * allows
 * 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.
 * 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)
 * 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)
 * 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 A ctively D isinterested  «@» °∆t° 17:08, 30 March 2024 (UTC)
 * Indeed, Indeed. Yiba  (talk | contribs) 17:26, 30 March 2024 (UTC)
 * 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)
 * But is generally not correct. Do not abuse cs1|2 parameters.  If the publisher is  the author, do not say that the publisher  the author just to avoid the need to use a custom value in ref.
 * —Trappist the monk (talk) 18:06, 30 March 2024 (UTC)
 * Why are we having this discussion here and not at Template talk:SfnRef?
 * —Trappist the monk (talk) 18:08, 30 March 2024 (UTC)
 * 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)
 * But is generally not correct. Do not abuse cs1|2 parameters.  If the publisher is  the author, do not say that the publisher  the author just to avoid the need to use a custom value in ref.
 * —Trappist the monk (talk) 18:06, 30 March 2024 (UTC)
 * Why are we having this discussion here and not at Template talk:SfnRef?
 * —Trappist the monk (talk) 18:08, 30 March 2024 (UTC)
 * Why are we having this discussion here and not at Template talk:SfnRef?
 * —Trappist the monk (talk) 18:08, 30 March 2024 (UTC)

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

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:

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


 * @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 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= in the full citation is, or is not enough and something like:
 * 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)
 * 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)
 * When dealing with short citations of works without author, I normally use Anon.; simple. -- Michael Bednarek (talk) 04:35, 31 March 2024 (UTC)
 * That would be fine. As a result of the conversation you linked, I ended up doing this: Leroy Chollet. 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 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)
 * I see! Your solution on that page:
 * * Canisius (1964).
 * 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)
 * 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)

, 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)


 * @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)
 * To address something from way back up in that thread:
 * But that wrong. "Fun Facts" is not an author, but the publication name, which should be rendered Fun Facts, unless the site literally uses FunFacts.com as its title not just its domain name (in which case "Fun Facts" is not anything, just something an editor made up for no reason). Abusing author like that produces polluted metadata. The thing to do when a web article has no attributed author, and you need  or whatever to work with it, is: . (The point of the HTML comment is so other editors understand that a known author was not accidentally omitted, and thus don't waste time by going and looking for one.)  — SMcCandlish ☏ ¢ 😼  22:05, 13 May 2024 (UTC)

AFM
Need to whitelist. It's generating false-positive Category:Harv and Sfn no-target errors, I guess because it is a wrapper. — SMcCandlish ☏ ¢ 😼  23:32, 13 May 2024 (UTC)

Railway reference book templates
Hi, Could the following be added, I'm editing a series of articles using these templates and have been using local whitelists, ['CITEREFMarshall1969'] = {'Lancashire & Yorkshire Railway 1'}, ['CITEREFMarshall1970'] = {'Lancashire & Yorkshire Railway 2'}, thanks Nempnet (talk) 07:42, 15 May 2024 (UTC)