Template talk:SfnRef

Harvid vs SfnRef
I recently created a new template harvid without knowing about the existence of SfnRef, and the similarity of the two templates was pointed out to me. They now differ only in that SfnRef invokes anchorencode and harvid does not. It seems to me that the anchorencode call is not needed, as the citation templates all invoke anchorencode on thier ref arguments: can someone suggest an example that shows why the call to anchorencode might be necessary? Assuming it's not needed, I suggest that we merge the two templates, without "anchorencode". I sort of prefer the name "harvid" since it's more in keeping with the other Harvard template names, but it'd be OK for it to be a redirect. Eubulides (talk) 01:24, 14 December 2009 (UTC)


 * SfnRef was designed to be a companion to Sfn, thus the name. Not surprisingly, I prefer the SfnRef name, mostly because of the tie-in to Sfn, but also because the "ref" part indicates the cite parameter where SfnRef is used. I included anchorencode because the documentation for users who were constructing ref values manually said to do what anchorencode does. If all the templates that accept ref encode their arguments, do you know why the docs say to change spaces to underscores? Perhaps the docs are out of date. If so, then anchorencode can be removed. &mdash; John Cardinal (talk) 02:18, 14 December 2009 (UTC)


 * P.S. Your edit that eliminates white space means that SfnRef will not do exactly the same thing as Sfn because Sfn does not discard leading or trailing whitespace. If we retain the edit to SfnRef, we should make a similar edit to Sfn. They should treat the arguments exactly the same in terms of creating the ID. &mdash; John Cardinal (talk) 02:27, 14 December 2009 (UTC)


 * Sorry about the white space change: I clearly didn't understand the issues well enough, so I just now reverted it. Since citation/core uses anchorencode, citation, cite journal, cite news, etc., all encode their arguments. I suppose there may be other citation templates that don't use anchorencode, but if they do they're busted anyway, and I don't think we should worry about them. The treatment of white space around arguments has long been considered to be a bug in the Harvard citation templates, and I recently proposed a fix for that; see Template talk:Harvard citation . If/when this happens I assume that sfn etc. will remain compatible. I don't much care about whether SfnRef or harvid is the "canonical" name so long as one of the names begins with "harv", as I expect that people using the harv etc. won't want to remember SfnRef. (I chose "harvid" because it is easier to spell and pronounce than "harvref".)
 * To sum up, I propose moving the contents of harvid to SfnRef and making the former redirect to the latter, and merging their documentation; and fixing the harvard citations to use the same idea, as proposed in, discussed in Template talk:Harvard citation .
 * Eubulides (talk) 06:46, 14 December 2009 (UTC)
 * I am OK with merging the two, with a redirect from "Harvid". We need to figure out the whitespace issue but that's tactical. &mdash; John Cardinal (talk) 11:03, 14 December 2009 (UTC)
 * ... and I'd be in favor of making Sfn strip the spaces, too. I can't think of a good reason to retain spaces, and clearly a stray space could confound an editor who can't figure out why their links don't work. &mdash; John Cardinal (talk) 13:57, 14 December 2009 (UTC)
 * OK, thanks, I did all the above, by, , and , and redirecting harvid to SfnRef and harvid/doc to SfnRef/doc. Please let me know if this leads to problems. Eubulides (talk) 19:27, 14 December 2009 (UTC)
 * Looks good to me! I made some minor doc edits. I am glad you decided to change the whitespace handling in Sfn. &mdash; John Cardinal (talk) 23:56, 14 December 2009 (UTC)

et al.
When there are too many authors and you want to specify your own SfnRef with "Author et al. 2000a" or suchlike, the italics make the links break. Any workaround for this ? Shyamal (talk) 16:45, 23 April 2012 (UTC)
 * Don't do it that way - use the first four authors. For example, creates the anchor for . -- Red rose64 (talk) 17:15, 23 April 2012 (UTC)
 * That includes an et al. automatically but that is not italicised as it stylistically ought to. Shyamal (talk) 02:33, 24 April 2012 (UTC)
 * It was decided more than a year ago (see Template talk:Sfn/archive 1) that "et al." should not be italicised. However, there is an ongoing discussion at Template talk:Sfn about custom italicisation. -- Red rose64 (talk) 13:35, 24 April 2012 (UTC)

Add quote field?
Maybe it is inappropriate for this type of referencing but has anyone ever discussed a quote field? My issue with using books as references is that someone can say they say anything and if you don't have access to the book there is nothing you can do about it. A quote field, while still potentially made up, can be searched and investigated further to justify it is backing up what is being sourced. Darkwarriorblake (talk) 16:53, 12 October 2013 (UTC)
 * Why is it necessary? isn't intended for use in places where its output might be visible - it's used to create anchors for links. If I were to put  (for example) into article text, it would show as  which is neither meaningful nor useful. The intended usage is in markup like   or   -- Red rose64 (talk) 19:08, 12 October 2013 (UTC)
 * Fair enough, is there an alternative on here? Or possibly a way where you hover over the anchor link in prose the box that pops up could reveal the quote? It's not always possible to use a quote as the information may span several pages but I think quotes are useful. For instance I worked on Saturday Night Live, but ebooks are not great when it comes to getting accurate page numbers, at least with the readers I have used. So the page numebrs are now off for the sources used on there, and since it is over a year since I added them, I'm not having to re-read a 400 page book to re-find the info because I don't have original quotes I can search for. In that sense I think it's useful for confirming info as well. Darkwarriorblake (talk) 21:59, 13 October 2013 (UTC)
 * It depends upon how you're using . If it's like  the only way available is to append the quote after the page number, as in
 * if you're using or similar, you can also put the quote after the template, but it's better to use the quote parameter:
 * -- Red rose64 (talk) 22:45, 13 October 2013 (UTC)
 * Thanks for the info Redrose. Darkwarriorblake (talk) 22:54, 19 October 2013 (UTC)
 * -- Red rose64 (talk) 22:45, 13 October 2013 (UTC)
 * Thanks for the info Redrose. Darkwarriorblake (talk) 22:54, 19 October 2013 (UTC)

Now do I make the anchor (target?) without a cite tag
I think cite tags are an abomination, so I don't use them. I also thing SFN is all the world's goodness wrapped in a panda, so I use them. Now how do I make the sfn anchor/target without the cite template? See the bottom of this for an example. Note that clicking on one of the SFNs in the body takes you to the correct cite, but clicking on the cite does not take you to the correct bib. Maury Markowitz (talk) 15:19, 4 January 2015 (UTC)
 * You can use . Taking only the first one as an example, presently it is  you would amend this to   The reference parameter holds the existing plain text reference, without change. The ref parameter (which can be placed last instead of first, if you prefer) holds the  -- Red rose64 (talk) 16:08, 4 January 2015 (UTC)
 * Thanks... I'm not sure that helps the syntax much though. Is there a "stand alone" syntax that I can put at the start of the line without having to wrap everything?Maury Markowitz (talk) 16:54, 4 January 2015 (UTC)
 * Yes, you can use, as in  but that has the disadvantage that it doesn't enclose the reference text, which means that it's not semantically linked to the ref text, and so the ref text doesn't gain a blue background when you click on a link that takes you to it. To see what I mean about a blue background, go to Template:Wikicite (but not using Internet Explorer), and click one of the "Atwood (2003)" links. -- Red rose64 (talk) 17:22, 4 January 2015 (UTC)

Accommodate month/season in date parameter for multiple works in same year
I am currently experienced an issue on John Bapst, where I am trying to enter a month and year in the date parameter because there are several works that have the same year and no author. The template reads this month-year combo as a second author, instead of as a date. Presently, the only way to get the template to display properly is to put a letter at the end of the year, which is less preferable to using the actual month of publication. Can someone knowledgable about the workings of this template implement this relatively minor change?  Ergo Sum  02:32, 26 May 2023 (UTC)


 * Have you tried the "|publication-date=" instead of "|year=" parameter? Moxy -Maple Leaf (Pantone).svg 03:12, 26 May 2023 (UTC)
 * See this recent discussion, with a rendered example. – Jonesey95 (talk) 05:18, 26 May 2023 (UTC)
 * Do you mean in e.g. Cite journal? If so, yes, I've tried that and it does not seem to make a difference.  Ergo Sum  00:33, 27 May 2023 (UTC)

Can I just use one parameter?
This template and sfn will allow an editor to create short references like. Is this a feature for weird situations, like case citation, where  makes less sense? Or is this a bug/hack that should be avoided? Thanks, Rjjiii  (talk) 03:48, 28 December 2023 (UTC)
 * Are all or most of your long-form references organized in some sort of rational numerical order? If so then I see no problem doing as you suggest.  In the vast majority of cases, long-form references are not organized that way so inserting an oddball numerical long-form reference into a list of name-date long-form references is probably not a good idea.  Remember that readers can/do print hard-copy articles so the correct long-form reference should be easy to find simply by reading the reference list.
 * —Trappist the monk (talk) 04:01, 28 December 2023 (UTC)
 * Oh, no, that's Bluebook; I usually get by with just the standard names and dates. The context missing from my first post is that Bluebook's standard full citation looks like this:
 * And the standard short form citation looks like this:
 * at 435
 * I wasn't sure if this was supported by the template or a kind of misuse that could not be counted on. Thanks, Rjjiii  (talk) 04:10, 28 December 2023 (UTC)
 * I wasn't sure if this was supported by the template or a kind of misuse that could not be counted on. Thanks, Rjjiii  (talk) 04:10, 28 December 2023 (UTC)

Proposed updates to documentation
I'll try to start on this either later this week or sometime next week. Feedback is welcome, Rjjiii  (talk) 06:26, 3 April 2024 (UTC)
 * 1) Revise the explanation of parameters so that it is more clear that a surname is not required.
 * 2) Somewhere near the top of the article include either a table or a series of small sections showing common use cases, similar to these explanations of how to create citations with unusual or missing information:
 * 3) Remove or greatly condense the "Deprecated inline use" section. It does not seem very relevant to creating the link anchors.

Posting example table for feedback:

Example bibliography



Rjjiii (talk) 05:36, 4 April 2024 (UTC)


 * Just updated the documentation., does this address some of the issues you raised at Module talk:Footnotes? Rjjiii  (talk) 20:33, 5 April 2024 (UTC)
 * YES! This is a LOT better :)
 * Please give me a few days to examine/respond.   Yiba  (talk | contribs) 03:00, 6 April 2024 (UTC)
 * This may not be what you expected, or asked for, but here are my comments:
 * The more I think about what I see as problems on Wikipedia documentation, the more I see cases of smaller issues being rooted in higher-level problems.
 * I feel one major reason why Wikipedia documentation is difficult to use, is because the distinction between Template:cite journal and Template:Cite journal/doc (and of course other pages and their corresponding /doc pages including SfnRef and SfnRef/doc) was ill-defined ad hoc. (or more likely, /doc's were created simply because the main pages became too long, without a differentiation with clear-cut purpose, with difficult-to-find Help: pages added.) If this mess is not cleaned up, your nice change on Template:SfnRef (and my unsuccessful edit and proposal discussed on Module talk:Footnotes) might just feed the information overloading for first-time readers.
 * Differentiating them into a "practical use guide (for newbies)" (e.g. Template:SfnRef) and a "full documentation" (e.g. Template:SfnRef/doc) will eventually clean up the mess, and the often complicated and intertwined issues will become easier to recognize/understand, and become easier to fix.
 * I do realize this is a huge undertaking if tried to implement all at once, but deciding on these simple definitions with the intent to gradually conforming the docs to the new definitions may be reasonable.
 * For example:
 * Wikipedian language (which may be the highest-level problem) including "short citation", the difference between "Anchor and AnchorID" and "Author= and Last=", etc. may confuse newbies without an explanation. So I feel words should be carefully chosen, and lingo (or rather, words with complicated Wiki concepts behind) should be excluded from a practical guide.
 * A statement like " is often used as  " may be worth being added up front, before showing the good Rolling Stone example. That example kills two birds, 1. Explains why SfnRef is needed, and 2. Shows an usage example. This makes it excellent for a documentation, but may not for a newbie.
 * "The above documentation is transcluded from Template:SfnRef/doc." is not for the newbies. "This is a practical guide for the use of . See Template:SfnRef/doc for full documentation." is.
 * and info are not for the newbies. First-time readers should not be confused on "Sfnref anchor markup" vs. "Short citation markup". That "Short citation markup" column in the wikitable would be better replaced by "Paired with:" column with a list of cite web, book, magazine, news, etc. paired full citation examples, although it is an excellent column for a full documentation.
 * I prefer (for both practical guide and full documentation):
 * MoMA 2024.
 * over:
 * because (I realized after you showed your solution to me) sometimes Anchorname has a different first character from author/publisher name, and the first format makes looking up the full citation on a long list in Bibliography a lot easier. For example, if Annual Review of Fluid Mechanics is mostly known as RFM and 'RFM' is used as the anchor name (and if Bibliography has over 40 entries), the first format above will naturally list it under R in Bibliography list of full citations, the second format would encourage the editor to list it under 'A'. Since a reader normally looks up the full citation (in Bibliography) from a short citation (on the article text showing "RFM 2024"), the second format listed near the top of bibliography makes looking up very difficult.
 * "Other Harvard templates", |ref=harv info, "Documentation subpage", "Vcite", "High-use", "Deprecated", "What's new", "COinS", "Vancouver system/style", " ", "Full parameter set", etc. do not have a place for newbies, but "Popular parameters" does.
 * Please try to imagine a use-guide page without the clutter and lingo. Then you will see where I'm coming from, although I realize only few of the above are useful to you at this time.
 * Yiba (talk | contribs) 02:15, 8 April 2024 (UTC)
 * Some of that is directly useful. If that center column of short citation markup is too much, I could either remove it or move the full citations up into that column. If having the parameters in the first column is distracting, they can just be removed. Also, I don't think anyone would object if you placed an example usage somewhere up top like:
 * Regarding your broader concerns:
 * The "/doc" stuff is how the underlying software handles template documentation and Template Data.
 * "Help" pages like H:FN, H:SFN, and H:CS1 are intended to give that kind of broader overview.
 * It's a legit concern that the documentation can lack coherency.
 * I think a big challenge for the documentation is just there is more work than volunteer time to do the work.
 * Thanks for all your input, Rjjiii  (talk) 04:16, 8 April 2024 (UTC)
 * Center column on the table showing the paired full citation examples will be a huge help for first-time readers. I have declared to keep myself from editing docs.    Yiba  (talk | contribs) 08:23, 8 April 2024 (UTC)
 * Thanks for all your input, Rjjiii  (talk) 04:16, 8 April 2024 (UTC)
 * Center column on the table showing the paired full citation examples will be a huge help for first-time readers. I have declared to keep myself from editing docs.    Yiba  (talk | contribs) 08:23, 8 April 2024 (UTC)