Template talk:Sfn

Names for the references?
Is it possible to add a name for ease of repeating? I just tried out the same template twice in a row and it did properly duplicate the reference number and have a single entry in the reflist, with two backlinks. But would it be possible to name them? Being able to cite multiple times, say, {sfn|foo|2023|p=50|refname=foo-50} and then subsequent calls would just go to {sfn|refname=foo-50} would be easier to work with than having to run {sfn|foo|2023|p=50} five times. --Golbez (talk) 17:33, 13 February 2023 (UTC)
 * Take a look at harvnb (documentation and examples here). If you put it inside a ref tag, you can then repeat the named ref instead of repeating all of the harvnb details. – Jonesey95 (talk) 20:02, 13 February 2023 (UTC)
 * One of the principal design features of is that it does not need ref names. Another is that it's self-adjusting if one use is amended, you don't need to worry if the others are all still appropriate. Imagine that  is used five times, because five different pieces of content are all verified by the same page. If you remove the first of these five, the ref detail does not need to be moved to one of the others, because it's already there. Now consider the situation that the first of the five pieces is expanded, perhaps by using material from page 51, you alter that one ref to  but leave the others alone because they don't use anything from page 51. -- Red rose64 &#x1f339; (talk) 11:51, 14 February 2023 (UTC)
 * Fair. I get it. This is a useful tool, but not for that purpose, and there are others for it. Thanks you two for explaining! :) --Golbez (talk) 15:06, 14 February 2023 (UTC)

Does WP:CITEVAR bar use of sfn in articles without pre arranged consensus?
Hi, I used sfn for some new citations in the Emotion article and my edit had the sfns removed in this edit for the reason that, referencing WP:CITEVAR, that I cannot introduce a new "citation style" without first gaining consensus.

I can see the POV of the editor, which by extension also means that editors cannot even employ cite templates for articles that do not yet employ them. I am a long time wikipedian but am seeking advice on how to avoid the time sink of fielding these sorts of objections in the future. I needed a place in the article to put the refbegin stuff and so I placed it in a separate subsection. I suppose I could have omitted the subsection and simply put the refbegin immediately following reflist in order to be a less visually obvious and thereby avoid this sort of objection. But it is not very tidy.

On the other hand, is the editor correct and sfn should not be introduced to an article without first gaining consensus on its use?

Any thoughts? J JMesserly (talk) 01:03, 6 March 2023 (UTC)
 * I haven't looked at Emotion so I don't know what's appropriate for that article. It seems to me that if an article has citations that are well-done and, at some point, were consistent, then the existing style should be maintained. If the article has become much longer and contains many more citations that it used to, it might be time to discuss on the talk page whether it is time to introduce sfn to better organize the citations. There are other methods, such as Rp, that compete with sfn. I think it would be particularly inappropriate to introduce sfn in an article that already uses a competing method.
 * Finally, if consensus is gained to introduce sfn, the one making the change should commit to reorganizing all the citations, not just introduce it for new citations. Jc3s5h (talk) 01:32, 6 March 2023 (UTC)
 * It is interesting to note that Emotion has two instances of templates.  The first one was added 20 September 2012 at this edit; its still there:  .  That  was added when there was a mix of templated and non-templated citations.  In the interim, the article has become more templated but still contains a fair number of non-templated citations.  Consistent in style, it is not.
 * Right, this is the last that I have to say about this topic. Take the question to WT:CITEVAR.
 * —Trappist the monk (talk) 01:53, 6 March 2023 (UTC)
 * I think that this is not a proper question for this template talk page. Questions about how WP:CITEVAR applies should be asked at WT:CITEVAR.
 * —Trappist the monk (talk) 01:34, 6 March 2023 (UTC)
 * Jc3s5h, so to understand you, your view is that for an established article such as this one with voluminous citations (the typical mixture of plain text, hard linked and cite templates within refs, that a discussion is necessary before sfn is first used for a new citation. If that is the prevailing view, I would prefer not to use the template at all.  I would rather improve WP articles.  J JMesserly (talk) 01:43, 6 March 2023 (UTC)
 * @Trappist, thanks for the suggestion to also post there, but this inquiry is proper because I was also soliciting potential technical use assistance as a possible response to the difficulty. I am aware of the sfnref companion template, but potentially I anticipated there might be some other usage or companion template I am not aware of that can be used with sfn which will make it more acceptable to folks with the objection I ran into.  J JMesserly (talk) 02:25, 6 March 2023 (UTC)
 * There is nothing magic about sfn here. At any article with a well-established consistent style, new citations should be formatted in that style, and changes to that style should be discussed first. If an article's style is inconsistent and no consistent style can be found in its history, making its style consistent is less problematic. —David Eppstein (talk) 02:49, 6 March 2023 (UTC)
 * Right David. I guess my comment should be made on WP:CITEVAR talk, but I agree that is the clear intent of the citation guideline.  As Trappist pointed out, there was no consistent style, so why should an editor have to justify use of sfn if it has been used in the article for 11 years?  As is unfortunately typical in wikipedia, for this article there was the usual opaque mess of plain text and idiosyncratic/ colourful uses of citation templates added in an ad hoc manner.  J JMesserly (talk) 03:44, 6 March 2023 (UTC)
 * 2 citations out of ~150 is an indication of an error to be corrected, not an inconsistent style. MrOllie (talk) 04:03, 6 March 2023 (UTC)
 * Apparently there is no use of sfn or auxiliary templates which would avoid such objections. If there are ideas on the technical side, please post.  Otherwise I agree with Trappist that observations on what the guidance should be for usage of sfn be made on the Citing sources talk discussion on this topic.  If you have thoughts on the difficulty of introducing sfn and other useful templates to articles where they are rarely if ever used, please contribute your thoughts.  J JMesserly (talk) 05:07, 6 March 2023 (UTC)
 * Right David. I guess my comment should be made on WP:CITEVAR talk, but I agree that is the clear intent of the citation guideline.  As Trappist pointed out, there was no consistent style, so why should an editor have to justify use of sfn if it has been used in the article for 11 years?  As is unfortunately typical in wikipedia, for this article there was the usual opaque mess of plain text and idiosyncratic/ colourful uses of citation templates added in an ad hoc manner.  J JMesserly (talk) 03:44, 6 March 2023 (UTC)
 * 2 citations out of ~150 is an indication of an error to be corrected, not an inconsistent style. MrOllie (talk) 04:03, 6 March 2023 (UTC)
 * Apparently there is no use of sfn or auxiliary templates which would avoid such objections. If there are ideas on the technical side, please post.  Otherwise I agree with Trappist that observations on what the guidance should be for usage of sfn be made on the Citing sources talk discussion on this topic.  If you have thoughts on the difficulty of introducing sfn and other useful templates to articles where they are rarely if ever used, please contribute your thoughts.  J JMesserly (talk) 05:07, 6 March 2023 (UTC)

Missing title error using sfn for
Sfn does not appear to work with cite encyclopedia; a Missing or empty  is shown. In the example below, the /  value is "Suffragist Movement", and I cannot specify a   value in cite encyclopedia since I also need to cite other titles/entries of that encyclopedia using sfn (probably via   parameter). I tried doing the following:



Is there a solution/workaround to suppress that Missing  error? Sanglahi86 (talk) 20:00, 20 April 2023 (UTC)
 * The error is not an  error.  It is a cs1|2 error indicating that the  template is missing the entry title.  If you rewrite  to include the entry:
 * No error.
 * —Trappist the monk (talk) 20:45, 20 April 2023 (UTC)
 * Unfortunately, I cannot specifically specify a fixed /  value because I was trying to reuse the encyclopedia source by citing other entries of the encyclopedia (which is why I opted to use sfn). If I leave an   empty, that error occurs; I was hoping for a workaround, somehow. Sanglahi86 (talk) 20:59, 20 April 2023 (UTC)
 * Then treat the encyclopedia as a book without specifying the entry:
 * —Trappist the monk (talk) 21:39, 20 April 2023 (UTC)
 * If you link to the page where you are trying to make this happen, we may be able to help. There are a few workarounds. For example, you can use custom wikitext below the template example shown by Trappist the monk, along with anchors for the sfn template. – Jonesey95 (talk) 21:41, 20 April 2023 (UTC)
 * Thanks, that definitely works. I avoided trying that very basic code since I thought entry parameter was an alias of title in cite encyclopedia. Regards. Sanglahi86 (talk) 22:37, 20 April 2023 (UTC)
 * —Trappist the monk (talk) 21:39, 20 April 2023 (UTC)
 * If you link to the page where you are trying to make this happen, we may be able to help. There are a few workarounds. For example, you can use custom wikitext below the template example shown by Trappist the monk, along with anchors for the sfn template. – Jonesey95 (talk) 21:41, 20 April 2023 (UTC)
 * Thanks, that definitely works. I avoided trying that very basic code since I thought entry parameter was an alias of title in cite encyclopedia. Regards. Sanglahi86 (talk) 22:37, 20 April 2023 (UTC)
 * Thanks, that definitely works. I avoided trying that very basic code since I thought entry parameter was an alias of title in cite encyclopedia. Regards. Sanglahi86 (talk) 22:37, 20 April 2023 (UTC)

Automatically support month and year in SFN links
It is often the case that I quote a series of articles that appear in different months of a magazine or journal. So you might have Smith May 1995 and Smith August 1995. The suggested solution is to "mangle" the date by adding a letter to the end. I would be fine with this if the letter was separate from the date, but changing something like date=May 1995 to date=1995a really makes my skin crawl.

Yes, I know I can override it with a |ref...

... but, is there any reason the template can't do this itself? That is, if the sfn has "more stuff" in the date part than just the year, it picks a more specific cite? For instance, sfn|Smith|May1995|p=6 would attempt to match on links for last=Smith date=May 1995, and if that fails, tries last=Smith date=1995.

Maury Markowitz (talk) 17:13, 2 May 2023 (UTC)
 * I'm pretty sure this has been discussed and rejected before, not necessarily on this page. -- Red rose64 &#x1f339; (talk) 17:29, 2 May 2023 (UTC)
 * The only place where you need to display the letter suffix, which is the standard format recommended by CMOS and other style guides, is in the rendered short (sfn) footnote. Here's an example: This is some text. This is other text.


 * Sources
 * That doesn't look like anything "mangled" to me, and the visual impact and typing impact is minimal. View the wikitext to see how I made this happen. There may be another template, like Wikicite, that works better for your aesthetic needs. – Jonesey95 (talk) 00:58, 3 May 2023 (UTC)
 * I just opened up the same discussion, not being aware of this one. I completely agree that the template should support a month or season, not just a year, for precisely the scenario Maury Markowitz described. It seems to go against the background WP principle to introduce as little original research (maybe not exactly applicable here, but the spirit seems to apply) as possible, and to let the reliable sources do the talking. Plus, I agree that it just doesn't look right. Scholarly bibliographies outside of WP never this, to my knowledge. I say, if there is a natural disambiguator already built into the reference, why not use it instead of a contrived one?  Ergo Sum  00:38, 27 May 2023 (UTC)
 * Scholarly bibliographies outside of WP never this, to my knowledge. Oh ... never say that something never happens.  See  8th bullet point.  And just to show that it isn't only en.wiki, this google search.   is a variant of the  series of templates so it adheres to the generally accepted multiple-sources-with-the-same-author-and-date scheme.
 * —Trappist the monk (talk) 01:09, 27 May 2023 (UTC)
 * I took a look at John Bapst. I see that you are already using ref= in your citation templates. This creates the CITEREFlastYYYY anchor and it appears to be working. The Module:Footnotes used by sfn, harv, and harvnb has a section of code that checks parameters to see if they are a year with or without lowercase letter disambiguation, and it appears that it's written to interpret any unusual date/year names as author names. (Template editors and admins correct me if I'm wrong here.)
 * For sourcing edge cases you can always make the shortened footnote by hand. For example, the first citation: " " renders the incorrect visual text: "" You could:
 * Hand write this with a wikilink, " " which renders as, "Woodstock Letters, July 1888, p. 218"
 * Hand write this without a link: Woodstock Letters, July 1888, p. 218
 * Use citeref where the final parameter is displayed text, " " which renders as, ", p. 218"
 * And finally I experimented with a rigid harv template just meant to be used with sfnref and harvid for these kinds of edge cases, but I am hesitant to introduce another shortened footnote template if this is an uncommon issue. If there is a need for it something like, " " could render the same as the above examples.
 * → (using  here to simplify things)
 * If I change the to use 'Smith', it works:
 * —Trappist the monk (talk) 14:04, 1 November 2023 (UTC)
 * If I change the to use 'Smith', it works:
 * —Trappist the monk (talk) 14:04, 1 November 2023 (UTC)
 * If I change the to use 'Smith', it works:
 * —Trappist the monk (talk) 14:04, 1 November 2023 (UTC)
 * —Trappist the monk (talk) 14:04, 1 November 2023 (UTC)


 * Thanks. Clearly I'm having a more stupid day than I thought. I'm much obliged to you. --Tagishsimon (talk) 14:16, 1 November 2023 (UTC)

Change to documentation about four authors and more
I find that the Sfn format does not properly work (does not achieve "bi-directional link" functionality), if a work has multiple authors (..like 20) and the top 4 names are not listed completely. Ideally it would be better to correct the code and keep the functionality for just 1 author listed (the first author). If not, and in the meantime, the documentation of this page needs to be changed:

EXAMPLE: With this Cite using multiple authors: *

Sfn will not work (not poppup window to the ref, and no active link to the ref) if written with just one author:

Only this will work (a bit cumbersome!!):

Therefore I suggest the following changes to the documentation (or better, if possible, change the programming to allow for just one authors, if someone if able to...):

ORIGINAL TEXT: Author(s) and year The author and the year of publication are the only required parameters. Up to four authors can be given as parameters."
 * Parameters

NEEDS TO BE CHANGED TO: Author(s) and year The author and the year of publication are the only required parameters. If the authors are multiple, they have to be listed up to the fourth.
 * Parameters

ORIGINAL TEXT: Only the first four authors are required by the template. Listing more is not supported.
 * Large number of authors

NEEDS TO BE CHANGED TO: The first four authors are required by the template. Listing more is not supported. Listing less will disable the "bi-directional link" functionality. Comments welcome. पाटलिपुत्र (Pataliputra)  (talk) 06:04, 17 November 2023 (UTC)
 * Large number of authors
 * I tried your example, and it is working to spec, nothing needs to be changed in the template. The documentation is accurate, as far as it goes, but I can see why you were confused. The "Usage" section does say,
 * &lt;last2>–&lt;last4> – positional parameters; surnames of next three authors
 * but if that isn't clear enough, perhaps something could be added to the Parameters section as well. I made a slight change to the top line under Parameters, which describes the first four authors more clearly as being "required". I don't feel that more extensive changes are needed, but I hope this change resolves any misunderstanding. Mathglot (talk) 08:47, 17 November 2023 (UTC)


 * Hi Do you mean that if you use  with my Cite example above, you do get the full ref popup and "bi-directional link" functionality?  पाटलिपुत्र  (Pataliputra)  (talk) 09:23, 17 November 2023 (UTC)
 * So dropping the word "Only" from the original text would clarify the point. There's no need to says what happens if people don't use the template as documented. Kanguole 12:33, 17 November 2023 (UTC)
 * I have clarified the documentation text in question to make it more explicit. I hope this is helpful to less experienced editors who want to use this useful template family. – Jonesey95 (talk) 18:38, 17 November 2023 (UTC)
 * I took another crack at it as well (at the risk of some duplication from the previous edit, but to make it crystal clear—I hope). पाटलिपुत्र, with these changes from Jonesy and me, does it make more sense to you now? Mathglot (talk) 19:30, 17 November 2023 (UTC)
 * All very clear now! Thank you very much! पाटलिपुत्र  (Pataliputra)  (talk) 19:43, 17 November 2023 (UTC)

Change to documentation about maximum length for "loc="
I find that with Sfn the parameter loc= only works up to 1000 characters. Could we add the following text ("up to 1000 characters maximum") in order to warn users:

ORIGINAL TEXT: Adding additional comments or quotes The templates or  can be used to add quotes or additional comments into the footnote. This effect can also be achieved using by adding a quote or comment to |loc=.

TO BE CHANGED TO: Adding additional comments or quotes The templates or  can be used to add quotes or additional comments into the footnote. This effect can also be achieved using by adding a quote or comment to |loc= (up to 1000 characters maximum).

Thank you! पाटलिपुत्र (Pataliputra)  (talk) 16:43, 18 November 2023 (UTC)
 * Why would you want that many? -- Red rose64 &#x1f339; (talk) 22:09, 18 November 2023 (UTC)
 * Long quote or quotes, long notes etc... Better to have an explanation on the technical limitations of Sfn in this case, rather than leave users in the dark about why things don't work... We typically go to "documentation" when something doesn't work, so it's quite useful if the actual answers are there... पाटलिपुत्र  (Pataliputra)  (talk) 08:39, 19 November 2023 (UTC)
 * I'm opposed to this request. The parameter loc is absolutely not to be used for quotations, long, or short. It is for something else entirely, which is documented under . In short, it is a replacement for parameter p or pp when those params are not appropriate; for example, the book cover, unpaged copyright page, or even in tandem with one of the page parameters, where you could use loc to specify a figure or diagram number, as well as a page, or a page plus a footnote number, for example. If the description in the doc about param loc is not clear, let's fix it; but there is no need to make the max length longer; think of it as 'alt-page-number'; would you want a 1000-character long field, to describe the page number location in a book? Mathglot (talk) 09:21, 19 November 2023 (UTC)
 * I will have to review this situation further. In the past, there was a separate parameter for quotations, namely, ps, but apparently, according to the Nota bene in the doc, this has been deprecated, and quotations are now supposed to go in param loc. I unfortunately missed the Rfc that decided on that change, and on the face of it, I think it's a poor outcome, but maybe it was the best of a bunch of poorer alternatives. In any case, I have no answer for you right now, but will have to look further into this. For the time being, I would advise against using param loc for any type of quotation, and instead to borrow efn, and place your quotation there. There is no limit (that I am aware of) on the length of a quotation you may place in an explanatory footnote. In addition, efn's may be placed in the reference section at the end of the article, instead of encumbering some section with a 1000-character quotation in the middle of the section. See WP:LDR for how to do this, or ask here for further details. Mathglot (talk) 09:33, 19 November 2023 (UTC)
 * . Indeed the recommendation in this documentation is to use loc= for quotes, and quotes can be longish sometimes, or multiples quote fragments in the same ref can be necessary. In my mind, is not a ref, and is mainly used to expand on a subject in the editor's voice. It seems to me that loc= is fine (although the name is weird, quote= would be wonderful), but the so-far un-documented 1000 characters limit of loc= can be tight and bafling is one is unaware of it. I'm just trying to shift from the basic format to , and pointing out a few of the basic issues in doing so...  पाटलिपुत्र  (Pataliputra)  (talk) 10:00, 19 November 2023 (UTC)
 * I appreciate your questions; they are very much on point. I just don't have a good answer as of yet. Perhaps someone else will. Mathglot (talk) 10:17, 19 November 2023 (UTC)
 * The obvious solution is to use  :.
 * -- Michael Bednarek (talk) 10:21, 19 November 2023 (UTC)
 * Yes, the suggestion to use loc for comments or quotes should be withdrawn, and either this form or suggested instead  – putting quotes or comments inside short footnotes stretches them too far beyond their core purpose, which is to provide short references that get merged if referring to the same place. Kanguole 10:27, 19 November 2023 (UTC)
 * I look at it this way. If you feel that you need to supply a quote (of any lngth) with a ref, that suggests that you need to justify why that ref was used. If you need to provide a long quote, that suggests that the ref is weak and should probably not have been used in the first place. -- Red rose64 &#x1f339; (talk) 11:30, 19 November 2023 (UTC)
 * Suggests, yes, but sometimes it is justified. I have come across efn being used for lengthy quotes where the material is controversial in some measure and not easily accessible.  The result was edit warring until the quotes established the facts. Martin of Sheffield (talk) 11:41, 19 November 2023 (UTC)
 * Agree with Martin. In my case, I find that including a quotation when a source is not immediately available is a courtesy to readers and editors as it enhances short-run verifiability. I regularly do so, for example, when citing a book for which Google books does not offer a snippet that includes the page in question, or when I have access to an online source via a membership where TWL does not. On the flip side, I find including a quotation that anyone can seeby clicking the title in the ref pointless and a waste of space. Mathglot (talk) 19:02, 19 November 2023 (UTC)
 * Actually, I think loc= is very convenient, and even necessary (having without a possibility to provide quotes would be quite unhelpful), so I do support the current recommendation in the Documentation to use loc= for quotes, and I think it should be kept (I am only suggesting that the 1000 characters cap should be mentioned somewhere as a de-bugging technicality). Shifting again to another format, and a very cumbersome one at that, such as  everytime a quote is needed, is not, I'm afraid, an elegant solution, is also not user-friendly, and is quite a mess when editing an article... Also  is for notes, not references, so it is not a proper solution either... The current documentation provides a smart solution: it simply is necessary to have a quote option such as loc= within  .  पाटलिपुत्र  (Pataliputra)  (talk) 12:00, 19 November 2023 (UTC)
 * Elegance is such a subjective matter. You do realize that this massive quote or comment you're adding to loc is going into the fragment identifier of the URL, right? That's because loc, like itself, was designed for a different purpose, and doesn't fit this one.
 * Michael Bednarek's alternative does what you're asking for, and even gets the punctuation right: colon rather than comma. Kanguole 12:21, 19 November 2023 (UTC)
 * Two points in response to "efn is for notes, not references": First, there is nothing inherently different between ref tags and efn tags—an efn is just a ref tag with a default group of lower-alpha; that is, efn's by default are enumerated starting with 'a' and refs with '1'. Second, there is no particular reason that a quotation is better suited to a "reference" than an "explanatory note" as a quote is content, which I find well-suited to a note. Turning it around: including the quote (short or long) in the article but excluding the reference that identifies the source would be contrary to Wikipedia policy as it fails WP:Verifiability, so is not an option; however, including the reference and excluding the quote is just fine, the point being: the quote is not reference material, it is supplementary material not required by our guidelines, and thus may be of "explanatory" help. These are not the only two choices, as Michael and others have pointed out, but to the extent that efn is an optional, explanatory note, including the quotation in the explanatory note and not in the reference makes sense, because the quote does not identify the source, it reproduces content. That said, I find the quote param handy and I use it myself in a &lt;ref> tag, but as Kanguole said, the meaning of "sfn" is a short footnote, and optional, extended information, wherever it ends up, should surely not be there. Mathglot (talk) 18:36, 19 November 2023 (UTC)
 * Using loc to hold a quotation is semantically incorrect. I agree with others here that  and the other -form templates are intended to be .  If the quotation is important to the article, put the quotation in the article and cite it; don't clutter reference sections with quotations.  Quotations require citations; citations do not require quotations.
 * A single template using loc to hold a quotation will include the quotation five times in the article's rendered html.  For example this:
 * is translated by MediaWiki to this in the article body (Lorem ... appears twice):
 * and is translated by MediaWiki to this in the references section (Lorem ... appears three times):
 * Don't misuse loc to do something it is not designed to do.
 * I believe that the recommendation to use loc for quotations is wrong and should be removed from the documentation for all short-form templates that use Module:Footnotes.
 * —Trappist the monk (talk) 20:20, 19 November 2023 (UTC)
 * ✅. Removed advice in the documentation to use |loc= for quotations. Mathglot (talk) 20:36, 19 November 2023 (UTC)
 * Don't misuse loc to do something it is not designed to do.
 * I believe that the recommendation to use loc for quotations is wrong and should be removed from the documentation for all short-form templates that use Module:Footnotes.
 * —Trappist the monk (talk) 20:20, 19 November 2023 (UTC)
 * ✅. Removed advice in the documentation to use |loc= for quotations. Mathglot (talk) 20:36, 19 November 2023 (UTC)
 * —Trappist the monk (talk) 20:20, 19 November 2023 (UTC)
 * ✅. Removed advice in the documentation to use |loc= for quotations. Mathglot (talk) 20:36, 19 November 2023 (UTC)

Just a note
Using loc= for quotes has been policy for exactly 2 years now (User:Jonesey95). And we are now cancelling this policy after a short 24h discussion? What are content contributors supposed to do? Asking editors to juggle between ' and ' depending on whether there is a quote or not, is not reasonnable: it's mind-numbing and discouraging even for veterans. On the contrary, the loc= fonctionality in is clean and easy. If we can't use it, I wish somebody would take on the task of programming a simple, clean, coherent referencing system similar to it... like adding a quote= functionality to for example. Quotations are a key element of "easy verifiablity", using them should not be such a hassle. पाटलिपुत्र (Pataliputra)  (talk) 21:27, 19 November 2023 (UTC)
 * Your comments are well taken, and I understand your frustration, but a couple of points: firstly, this is an all-volunteer project, and not everything is in ship-shape order; problems abound, and this is very far from the worst of it. That said, your complaint deserves a response. Secondly, using loc for quotes is by no means policy, it's not even a guideline. It has some level of consensus, if it came out of an Rfc, and that deserves respect, so if you want to revert my doc change, go ahead, but I think it is terrible advice. "Loc" is short for "location"—i.e., part of the verifiability criterion of how to easily find the source location that verifies the assertion made by an editor in the article; that's what it is for; clearly, the Rfc decided to shoehorn quotations into loc because it solved some other problem that was, apparently, considered more serious.
 * And as far as "I wish somebody would take on the task of programming a simple, clean, coherent referencing system similar to it", Ouch!! We already have some volunteers who spend a large proportion of their time doing exactly that, for a paycheck of Zero per month; so, once again, "volunteer project". Yes, your issues are real and deserve action, and if you feel this is a deep and serious enough problem, maybe you could volunteer to take it on? Finally, I don't think quotations are "key" in verifiability at all—they represent content and don't verify anything; if quotations are worth keeping in the article, then perhaps they should be part of the article content and double-quoted, as MOS calls for, but surely not placed in a "short" footnote. Mathglot (talk) 21:58, 19 November 2023 (UTC)
 * Adding a quote= functionality to doesn't have to be complicated, especially since the lines would be identical with those of loc= we have today. I haven't seen the program, but normally duplicating the loc= lines and replacing "loc" with "quote" should be enough, and if we're lucky we can also drop the 1000 characters limit. Then, we can leave the philosophical question of whether quotes are useful of not to content creators. The quoting mechanism would be clean and simple:  So yes, I do volunteer to take it on, if that's any use.  पाटलिपुत्र  (Pataliputra)  (talk) 10:55, 20 November 2023 (UTC)
 * This is not about whether quotes can be included in references – Michael Bednarek has shown how that is readily done. It is about whether they belong in this short footnotes template, which is designed for a different purpose. Did you see Trappist's illustration of what this does to the output HTML? Kanguole 11:24, 20 November 2023 (UTC)
 * Wait, was there even an Rfc? I checked Archives 1 – 5, and I didn't find one. So, the doc is subject to change, and if there's disagreement, we should just talk it out. Mathglot (talk) 22:11, 19 November 2023 (UTC)
 * This is the discussion that led to adding this to the documentation – hardly a solid consensus. I also don't think previously given advice was solidly in favour of what was put in the documentation. Kanguole 22:16, 19 November 2023 (UTC)
 * Thanks for that link. In that case, we're perhaps in BRD land. I think Michael Bednarek's solution is viable, uses existing features without requiring volunteer time to alter anything, and does not "shoehorn" anything or twist the intended use of any feature out of shape. In addition, that solution has been in the documentation for at least four years now (third example), and I vote we stick with that. Mathglot (talk) 22:31, 19 November 2023 (UTC)
 * I fail to see how my approach is "mindnumbing and discouraging" compared to Pataliputra's suggestion to lump a quotation into loc. Apart from the encapsulating ref tags and the position of some braces, they amount to the same keystrokes. -- Michael Bednarek (talk) 02:01, 20 November 2023 (UTC)
 * Your recommendation (if I get it right) is to use a combination of three functionalities ( Sfn ,  Harvnb  and  ) with the following codes, depending whether we want to attach a quote or not:
 * If no quote:
 * If quote:
 * The policy for the last 2 years has allowed to use a single functionality ( Sfn ) whether there is a quote or not, and only use the loc= extension if there is a quote:
 * If no quote:
 * If quote:
 * I can see a difference, which can be quite huge when you contribute a lot of content, or when you are trying to sort out the source code of a page... पाटलिपुत्र  (Pataliputra)  (talk) 11:28, 20 November 2023 (UTC)
 * I will repeat what I've said before: there is no policy and no guideline that says what you claim. There was not even an Rfc that said that. There was just something written on a template doc page, like you, me, or some random IP could have written. And as far as what was on that doc page for two years, the solution to the issue, as reiterated by Michael, has been on that same page for four years (at least). It is also a bit difficult to provide a technical solution to a problem when we don't have the actual problem in view, so if you can please link the article and section where you are having this issue, the concrete realities of the particular problem would come into focus, enabling other editors here to better help you find a solution that might be workable for you. Mathglot (talk) 05:14, 21 November 2023 (UTC)

Special characters
sfn and harvid seem to be out of sync on handling special characters. See Collective work for several examples that now show up as redlinks. Thus

Generates a link to
 * CITEREFBernard_Safran:_Paintings_%E2%80%93_safran-arts

but

generates
 * CITEREFBernard_Safran:_Paintings_–_safran-arts

The effect is



Aymatth2 (talk) 14:42, 20 November 2023 (UTC)
 * Are you sure? I'm not seeing any errors in Collective work.  In your examples above, you don't include a target, so here is the target from Collective work:
 * Where is the error?
 * —Trappist the monk (talk) 15:02, 20 November 2023 (UTC)
 * I don't see that sfn generating a link with an url encoded dash, the way you have it. Rather, it generates a link to . If you are referring to footnote 1 in the top image caption, it links to the short footnote, which, so everything looks fine and I see no error here. Mathglot (talk) 05:28, 21 November 2023 (UTC)
 * —Trappist the monk (talk) 15:02, 20 November 2023 (UTC)
 * I don't see that sfn generating a link with an url encoded dash, the way you have it. Rather, it generates a link to . If you are referring to footnote 1 in the top image caption, it links to the short footnote, which, so everything looks fine and I see no error here. Mathglot (talk) 05:28, 21 November 2023 (UTC)


 * There is something odd going on. I do not see the problem on my laptop, but see the screenshot to the side which I just took on my phone, which I think is up to date Android/Chrome. Aymatth2 (talk) 17:41, 23 November 2023 (UTC)
 * That error message is not caused by but rather is caused by User:Ucucha/HarvErrors.js at User:Aymatth2/common.js in your common.js page.  Remove that line from your common.js and then refresh the page in the screen-cap.  The error message should go away.  If it does, try a different harv error script or report the error to Editor Ucucha.
 * —Trappist the monk (talk) 17:59, 23 November 2023 (UTC).

That did it. Duh. Thanks. Aymatth2 (talk) 21:45, 23 November 2023 (UTC)

Follow up: I wonder if the problem described above is the same problem that is described at T348928 where MediaWiki is incorrectly url-encoding the short-form link when it should be anchor-encoding the link:

—Trappist the monk (talk) 20:10, 29 November 2023 (UTC)

Mobile view sees a citation error; desktop view sees no problem. Eh???
It gets worse. Since when has é been a "special character"? (A rhetorical question! before someone comes back with "1247" .) At Lunar month, citation 8 gets an error but the cited source is certainly there. Exactly the same article read on desktop view sees no problem and [8] resolves as expected. It does not compute, Captain. --𝕁𝕄𝔽 (talk) 14:31, 12 April 2024 (UTC)
 * This is exactly the issue described (and apparently ignored) at T348928.
 * 'é' (U+00E9: Latin small letter e with acute) is not a 'special character' per se, but is a multibyte character. When rendering the html for the different views, MediaWiki differently encodes fragment wikilinks: anchor encoding for desktop view, uri encoding for mobile view.  This is not something that can be fixed here.
 * —Trappist the monk (talk) 15:33, 12 April 2024 (UTC)
 * Even though it can't be fixed here, I thought it worth putting it on the record for future archive searches. 𝕁𝕄𝔽 (talk) 17:33, 12 April 2024 (UTC)
 * Even though it can't be fixed here, I thought it worth putting it on the record for future archive searches. 𝕁𝕄𝔽 (talk) 17:33, 12 April 2024 (UTC)

How to use it for Proceedings
Proceedings are collection of works published by academic institutions, museums, etc. They usually have one or more high-profil scholars as editors, who may or may not participate with their own work included into collection. Other authors, whose number can vary (few to few dozens), write a chapter with a unique title each (sometimes one author can contribute two or more chapters on different subject) on different, but subjects related to the field, say, history of some heretical order. So, now we have a book as a collection of chapters written by different authors, chapters have unique titles, collection is edited by one or more persons who contributed or not something. So, this is not the same thing as multiple authors of one paper in journal.

Is it possible to cite such book with sfn, and if so, how? Imagine that you need to use few chapters in your wiki article but they should be used with separate footnote - every chapter has its title and writer, and the only common thing is the main title of the collection, date of publishing and an editor(s).

Example of one such Proceedings can be observed here: Zbornik radova - it is a first 11 pages with usual information and most importantly you can check Content ౪ Santa ౪  99°  14:07, 6 February 2024 (UTC)
 * Perhaps like this:
 * The above goes in §Bibliography. The short form references (in this example  because simpler) point to the  templates which, in turn, point to the  template.  Here are the  templates:
 * and here is the §Bibliography section:
 * Note the unique construction of the Šanjek and  templates; this to avoid circular or improper links between the templates –  uses   so  must not also use that CITREF id.
 * —Trappist the monk (talk) 15:28, 6 February 2024 (UTC)
 * Thanks, this looks more than promising, I am going to try how it works. @Trappist the monk, I really appreciate this, as it was always huge problem for me - I am using that kind of literature constantly (Proceedings, Yearbooks, Contributions, Collections, and similar) and it gets tiresome using RefToolbar (reflist with markup) in this case. Thanks. ౪ Santa ౪  99°  17:19, 6 February 2024 (UTC)
 * It works like a charm @Trappist the monk, and I thank you again so much, however, is there a way to get just a footnote number inline like "[56]", which sends → "Ančić 2005, p. 20" in References-reflist, and from there "Ančić 2005, p. 20" → Biblio. "Ančić, Mladen. "Bosanska Banovina i Njezino Okruženje u Prvoj Polovici 13. Stoljeća". In Šanjek (2005), pp. 11–26."? I just replaced "harvnb" with "sfn" and it works perfectly - thank you. -- ౪ Santa ౪ 99°  17:51, 6 February 2024 (UTC)
 * Note the unique construction of the Šanjek and  templates; this to avoid circular or improper links between the templates –  uses   so  must not also use that CITREF id.
 * —Trappist the monk (talk) 15:28, 6 February 2024 (UTC)
 * Thanks, this looks more than promising, I am going to try how it works. @Trappist the monk, I really appreciate this, as it was always huge problem for me - I am using that kind of literature constantly (Proceedings, Yearbooks, Contributions, Collections, and similar) and it gets tiresome using RefToolbar (reflist with markup) in this case. Thanks. ౪ Santa ౪  99°  17:19, 6 February 2024 (UTC)
 * It works like a charm @Trappist the monk, and I thank you again so much, however, is there a way to get just a footnote number inline like "[56]", which sends → "Ančić 2005, p. 20" in References-reflist, and from there "Ančić 2005, p. 20" → Biblio. "Ančić, Mladen. "Bosanska Banovina i Njezino Okruženje u Prvoj Polovici 13. Stoljeća". In Šanjek (2005), pp. 11–26."? I just replaced "harvnb" with "sfn" and it works perfectly - thank you. -- ౪ Santa ౪ 99°  17:51, 6 February 2024 (UTC)
 * Note the unique construction of the Šanjek and  templates; this to avoid circular or improper links between the templates –  uses   so  must not also use that CITREF id.
 * —Trappist the monk (talk) 15:28, 6 February 2024 (UTC)
 * Thanks, this looks more than promising, I am going to try how it works. @Trappist the monk, I really appreciate this, as it was always huge problem for me - I am using that kind of literature constantly (Proceedings, Yearbooks, Contributions, Collections, and similar) and it gets tiresome using RefToolbar (reflist with markup) in this case. Thanks. ౪ Santa ౪  99°  17:19, 6 February 2024 (UTC)
 * It works like a charm @Trappist the monk, and I thank you again so much, however, is there a way to get just a footnote number inline like "[56]", which sends → "Ančić 2005, p. 20" in References-reflist, and from there "Ančić 2005, p. 20" → Biblio. "Ančić, Mladen. "Bosanska Banovina i Njezino Okruženje u Prvoj Polovici 13. Stoljeća". In Šanjek (2005), pp. 11–26."? I just replaced "harvnb" with "sfn" and it works perfectly - thank you. -- ౪ Santa ౪ 99°  17:51, 6 February 2024 (UTC)

Issue with ps and pp being used together
There seems to be an issue with sfn when using the  and   parameters together. By default, in using both, you end up with two sentences without a space between them (see the Lindskoog example below). Some editors have tried to fix this by adding an extra  parameter, but then this gives you a comma you probably didn't intend. The comma either trails at the end of a sentence when you don't have a  parameter (pp. 18–19 example), or else separates two sentences when you do, instead of them being separated by a period (Gormley).

Also, when you have two sfn templates with the same  parameter but different   parameters, the engine renders them as the same citation, so the version with the   becomes unreadable (see the James Russell example).

{{markup The book explores{{sfn|Lewis|1950|pp=18–19|loc={{sp}}}} the themes of lions,{{sfn|Lewis|1950|pp=18–19|loc={{sp}}|ps=This is explored further by James Russell.}} witches{{sfn|Lewis|1950|pp=32–33|ps=This is explored further by Kathryn Lindskoog.}} and wardrobes.{{sfn|Lewis|1950|pp=64–66|loc={{sp}}|ps=This is explored further by Beatrice Gormley.}}

Timestamp parameter for videos
Would it be possible to add a parameter to the template which functions similarly to |p=, but instead marks a timestamp to make it easier to use Template:Cite AV media as reference? Antiquistik (talk) 17:39, 10 April 2024 (UTC)
 * You can use loc instead of p, it's for in-source location when p and pp are inappropriate. -- LCU A ctively D isinterested  «@» °∆t° 17:55, 10 April 2024 (UTC)
 * Or the obvious parameters time or minutes. -- Michael Bednarek (talk) 01:40, 11 April 2024 (UTC)
 * I'm confused unlike loc, which is available and used for this purpose, time and minutes don't work with sfn -- LCU A ctively D isinterested  «@» °∆t° 10:52, 11 April 2024 (UTC)

Confusion reigns. This is the talk page for sfn however the OP asked about Cite AV media. replied in the spirit of SFN whereas Michael answered correctly for AV media, which is why AD can't find the parameters in SFN! Martin of Sheffield (talk) 11:33, 11 April 2024 (UTC)


 * Ah I see the confusion, I took Would it be possible to add a parameter to the template as meaning this template, and that the OP meant Cite AV Media as reference to mean the cite that SFN is linking to. -- LCU A ctively D isinterested  «@» °∆t° 11:56, 11 April 2024 (UTC)
 * The OP wanted to do short references to particular timestamps in a video cited with Cite AV media, so loc is indeed the answer. Kanguole 13:50, 11 April 2024 (UTC)

Cite court
Can this be used with Cite court?--SRuizR  20:50, 28 April 2024 (UTC)


 * Yes you just have to setup the ref field as described in the Template:Cite court documentation. -- LCU A ctively D isinterested  «@» °∆t° 21:23, 28 April 2024 (UTC)


 * Oh, I didn't see that. Thanks.--SRuizR Flag of Costa Rica.svg 21:44, 28 April 2024 (UTC)

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

Error when using "ps" parameter and no "ps" for the same page
Hello, in Madam La Compt there is the following message: "Cite error: The named reference "FOOTNOTEMcDermott1949128" was defined multiple times with different content (see the help page)."

There are some and one

Do you know how I can get rid of the error? Thanks so much!–CaroleHenson (talk) 15:34, 21 May 2024 (UTC)
 * As a short-term solution I added another copy of the source and |ref= and –CaroleHenson (talk) 15:43, 21 May 2024 (UTC)
 * You can express what you're after with . Kanguole 15:48, 21 May 2024 (UTC)
 * Excellent, thanks, !–CaroleHenson (talk) 16:48, 21 May 2024 (UTC)
 * This is a misuse of ps, and is explicitly cautioned against at Template:Sfn. -- Red rose64 &#x1f339; (talk) 21:14, 21 May 2024 (UTC)
 * As fixed by Kanguole and communicated here.–CaroleHenson (talk) 23:32, 21 May 2024 (UTC)

work with Template:Cite Q?
Hello: Could someone please modify either template:cite Q or template:sfn so they work properly together by default?

See recent edits to Gwendolyn Grant (activist) for examples of the problem.

Thanks, DavidMCEddy (talk) 21:54, 5 July 2024 (UTC)


 * Sfn templates work by matching to the details in the source text of the cite (kind of that's just the simple way of putting it), as Cite Q has no author or year details in source text a false positive error will always occur. It's an issue that has been raised on the Cite Q template talkpage a few times. Until it is fixed you can add dummy duplicates of the missing text details to the cite, or use sfn whitelist to suppress the false positive error messages. -- LCU A ctively D isinterested  «@» °∆t° 22:21, 5 July 2024 (UTC)


 * Thanks. I've tried assigning "CNN Newsource" to different properties in Wikidata, so far without suppressing " : |author= has generic name (help)" from:
 * Can sfn whitelist suppress this complaint? If so, how? (I've tried a couple of things, so far without success.)
 * Thanks again, DavidMCEddy (talk) 23:53, 5 July 2024 (UTC)
 * No, sfn whitelist is unrelated; it suppresses the harv linking errors that you always get with sfn+cite Q. Your problem is badly formatted metadata that squeezes the information from the citation into the wrong parameters. The citation should probably have publisher=KMIZ and agency=CNN Newsource. I suspect there is a mismatch between how wikidata represents reference metadata and how the citation templates expect to see it, causing cite Q to try to hammer round pegs into square holes. I don't know enough about how cite Q works to persuade it to format the citation correctly. Why not just use cite news and fill in the metadata locally? —David Eppstein (talk) 00:04, 6 July 2024 (UTC)
 * No, sfn whitelist is unrelated; it suppresses the harv linking errors that you always get with sfn+cite Q. Your problem is badly formatted metadata that squeezes the information from the citation into the wrong parameters. The citation should probably have publisher=KMIZ and agency=CNN Newsource. I suspect there is a mismatch between how wikidata represents reference metadata and how the citation templates expect to see it, causing cite Q to try to hammer round pegs into square holes. I don't know enough about how cite Q works to persuade it to format the citation correctly. Why not just use cite news and fill in the metadata locally? —David Eppstein (talk) 00:04, 6 July 2024 (UTC)

Why is this discussion happening in twop places. Don't do that. Continue at Template talk:Cite Q.

—Trappist the monk (talk) 00:07, 6 July 2024 (UTC)

Why is this not working?
I have this, and this

Why is this giving me code errors?Blue Pumpkin Pie (talk) 21:20, 18 July 2024 (UTC)


 * The second instance of SfnRef is not the correct template to use, it should just be Sfn. The first instance seems like it should work to creat an anchor that the Sfn template can link to, but I also think it is unnecessary. The cite book template should be able to create the template by itself because there is nothing unusual about the citation. Jc3s5h (talk) 21:27, 18 July 2024 (UTC)
 * Where? Are you getting errors because you mistakenly used  when you should have used ?
 * In your examples, the template emits a CS1 maint: ref duplicates default message because   produces exactly the same   anchor ID as the  template does for itself.  The  template should be rewritten:
 * —Trappist the monk (talk) 21:30, 18 July 2024 (UTC)
 * In your examples, the template emits a CS1 maint: ref duplicates default message because   produces exactly the same   anchor ID as the  template does for itself.  The  template should be rewritten:
 * —Trappist the monk (talk) 21:30, 18 July 2024 (UTC)
 * —Trappist the monk (talk) 21:30, 18 July 2024 (UTC)
 * —Trappist the monk (talk) 21:30, 18 July 2024 (UTC)

Thank you for the advice. I didn't know that judging based on the documentation, I thought I had to use SfnRef because there's more than one author. But that helps me out a lot. thank you.Blue Pumpkin Pie (talk) 00:49, 19 July 2024 (UTC)