Template talk:Sfn: Difference between revisions

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Content deleted Content added
Line 117: Line 117:
::::If your requirement is for a {{tlx|sfn}}-equivalent that does not have the <code><nowiki><ref></ref></nowiki></code> around it, try {{tlx|harvnb}}. --[[User:Redrose64|<span style="color:#d30000; background:#ffeeee">Red</span>rose64]] ([[User talk:Redrose64|talk]]) 13:38, 7 March 2010 (UTC)
::::If your requirement is for a {{tlx|sfn}}-equivalent that does not have the <code><nowiki><ref></ref></nowiki></code> around it, try {{tlx|harvnb}}. --[[User:Redrose64|<span style="color:#d30000; background:#ffeeee">Red</span>rose64]] ([[User talk:Redrose64|talk]]) 13:38, 7 March 2010 (UTC)


:::::Thank you for pointing out the existence of {{tlx|harvnb}}! I should have looked around at the related templates more. As for merging the notes with the general references, I may do that. I think it looks neater this way, but it's not the most important thing to me. (Anyway, I like regular numbered footnotes, and not the "nb X".) I also agree that one of the drawbacks to LDR (and not just my specific approach) is that you have to edit twice, once to add the material and once to add the reference. I'm not denying that Sfn has a strong appeal. However, I'm just not sold on the use of short footnotes for every citation, including journal articles. I like separating out books cited, as I have in [[Ruffed lemur]], which I modeled after many other Wiki articles in the biology section. Either way, I think I'm just going to run my approach by the people who regularly review my GACs and FACs and see how they feel, and make my tweaks based on that. Had I noticed {{tlx|harvnb}} prior to all of this, this conversation might not have been so long. Thank you very much for your time and for sharing your opinions. Although we differ in opinion, I'm glad I got to hear your side. You have made excellent points. &ndash; '''<span style="text-shadow:grey 0.1em 0.1em 0.3em; class=texhtml; font-family: Comic Sans MS;">[[User:Visionholder|<span style="color:darkgreen">VisionHolder</span>]] «[[User talk:Visionholder|<span style="color:olive"> talk </span>]]»</span>''' 14:37, 7 March 2010 (UTC)
:::::Thank you for pointing out the existence of {{tlx|harvnb}}! I should have looked around at the related templates more. As for merging the notes with the general references, I may do that. I think it looks neater this way, but it's not the most important thing to me. (Anyway, I like regular numbered footnotes, and not the "nb X".) I also agree that one of the drawbacks to LDR (and not just my specific approach) is that you have to edit twice, once to add the material and once to add the reference. I'm not denying that Sfn has a strong appeal. However, I'm just not sold on the use of short footnotes for every citation, including journal articles. I like separating out books cited, as I have in [[Ruffed lemur]], which I modeled after many other Wiki articles in the biology section. Either way, I think I'm just going to run my approach by the people who regularly review my GACs and FACs and see how they feel, and make my tweaks based on that. Had I noticed {{tlx|harvnb}} prior to all of this, this conversation might not have been so long. Thank you very much for your time and for sharing your opinions. Although we differ in opinion, I'm glad I got to hear your side. You have made excellent points. &ndash; '''<span style="text-shadow:grey 0.1em 0.1em 0.3em; class=texhtml; font-family: Comic Sans MS;">[[User:Visionholder|<span style="color:darkgreen">VisionHolder</span>]] «[[User talk:Visionholder|<span style="color:olive"> talk </span>]]»</span>''' 14:37, 7 March 2010 (UTC)
{{outdent|:::::}} How about using Sfn for all the in-text cootnotes, but use the following sections at the end of the document:
#Notes (for the footnotes produced by Sfn)
#References (header for the following two sections)
#Books (for any books referenced)
#Other sources (for all other sources including journal articles)
You can come up with your own scheme for how to divide the full citations; the key part is to simplify the method used to link the footnote in the prose to the full citation. — [[User:John Cardinal|John Cardinal]] ([[User talk:John Cardinal|talk]]) 15:39, 7 March 2010 (UTC)

Revision as of 15:39, 7 March 2010

Ref param

Contrary to what the doc says, {{sfn}} does not honour the ref=/Ref= parameter. Could someone fix this please? -- 89.15.54.157 (talk) 18:01, 22 February 2010 (UTC)[reply]
ps: Could emits of {{1}} etc please also be changed to {{echo|{{1}}}}? That way any leading/trailing whitespace in the anonymous parameters would be ignored.

It's not terribly clear admittedly, but the |ref= parameter is not intended to be placed in {{sfn}}, but is used with the associated cite template - whether that be {{citation}}, {{cite book}}, {{cite journal}}, etc.
Not sure what you mean by your "ps" though. --Redrose64 (talk) 18:09, 22 February 2010 (UTC)[reply]
  1. Ref= in {{citation}} etc is not much use unless you have a matching ref= elsewhere. As, for example, in {{harvnb}} and all the other {{harv*}} templates, where Ref= works just fine and always did.
    As would be obvious to anyone familiar with sfn and the harv family, {{sfn}}'s failure to support ref= forces an editor to use <ref name="...">{{harvnb|...|Ref=...}}</ref>. Ugh.
  2. Never mind my ps. Previously, {{sfn|abc|2010}} and {{sfn| abc|2010}} did not emit the same thing. Thus my ps. Evidently, someone fixed {sfn} already. (harvnb etc are still broken though)
-- 89.15.54.157 (talk) 19:45, 22 February 2010 (UTC)[reply]
Re your #1. You can't control the ref element created by Sfn; you adjust the ref parameter of the target citation when you use Sfn with something other than author names. So, for example, {{sfn|NARA|2009}} would need a citation such as {{cite web |title=... |ref=CITEREFNARA2009 }} or (using SfnRef) {{cite web |title=... |ref={{SfnRef|NARA|2009}} }}. You can't control both ends, but you can adjust the target, and that's enough. — John Cardinal (talk) 20:01, 22 February 2010 (UTC)[reply]
What you can do is to use {{SfnRef}} (or its alias {{harvid}}) as in this example:
{{sfn|Smith|Jones|2009|p=123}}
{{cite book ... |ref={{SfnRef|Smith|Jones|2009}} }}
However this approach is not necessary if the |last1= (etc.) and |year= parameters are used in the citation template, together with |ref=harv:
{{sfn|Smith|Jones|2009|p=123}}
{{cite book |last1=Smith |first1=M. |last2=Jones |first2=G.R. |year=2009 |ref=harv }}
--Redrose64 (talk) 21:19, 22 February 2010 (UTC)[reply]
The way you guys go on you'd think someone was asking you to solve the world's global warming problems. So, I just fixed the problem myself.

Foo said "Hello".[1] Bar said "Nice weather here".[2] Foo also announced that his chickens had the pox.[1]

  1. ^ a b Foo 2010, p. 10.
  2. ^ Bar 2010, p. 11.
  • Apple, Adam, ed. (2010), "First Plenary Discussion", Xoo Conference, pp. 5–50
Nothing especially exotic. This same sort of thing would be true for any collection of snippets where the individual snippets have attribution but not their own titles. -- 89.15.54.157 (talk) 23:28, 22 February 2010 (UTC)[reply]
Re: "The way you guys go on you'd think someone was asking you to solve the world's global warming problems." See WP:DICK. — John Cardinal (talk) 00:06, 23 February 2010 (UTC)[reply]
Do you seriously hold your response (last or any other) to be constructive, receptive, and thoughtful? Or are you just having a bad day? -- 89.15.54.157 (talk) 00:58, 23 February 2010 (UTC)[reply]
My comment directly above probably won't help because you seem committed to wasting time with snide remarks rather than concentrating on communicating clearly. Lastly, my day is going quite well. I never let ill-humored remarks from strangers with a bad attitude get in the way of that. — John Cardinal (talk) 01:24, 23 February 2010 (UTC)[reply]
I'm not committed to anything but a simple answer to a simple question. To that simple question, I was told that it wasn't possible, but that I was instead to twist myself into contortions (and that too, to accomplish something that I didn't want to accomplish). Then, when I pointed out that you were going over the top, and when I made the fix myself (showing how simple it was in reality) I was told that I was a dick. Then, when I pointed out that that was not a particularly constructive thing to say, and that you must be having a bad day to say such a thing, I'm told that I'm committed to wasting time with snide remarks.
In summary: first I was told to piss off, and then told I was a dick to not piss off, and then told I'm snide and ill-humored because I spot a pot calling a kettle black. You're quite right that your calling me (or anyone else) a m:DICK "won't help"; as the page tells you, that's a pretty DICKy thing to do. But whatever. Since its unlikely that you will start reflecting on what you or I have said, and since I have what I want, I'm going to vanish now. I wish you a better day tomorrow than you had today. Ciao. -- 89.15.54.157 (talk) 02:39, 23 February 2010 (UTC)[reply]
The thing is, your original post suggested to me that you had misunderstood the documentation because it was ambiguous. Accordingly, I clarified the documentation. You didn't actually say why you wanted to use |ref= inside {{sfn}} until after you had modified the template. The thing is, we tend not to modify a high-use template like this without good reason, and we hadn't actually seen the good reason. --Redrose64 (talk) 09:44, 23 February 2010 (UTC)[reply]

<If you fellows are through and can shake hands, I'm afraid I have to point out that the ref parameter broke the template, at least in Safari. I've rolled back the changes. I tried to do it in the sandbox, but its a little beyond me. Feel free to try to finish it, but please use the sandbox. Thanks. ---- CharlesGillingham (talk) 20:55, 24 February 2010 (UTC)[reply]

Rolllback and the ref/Ref parameter

Charles Gillingham rolled back the recent addition of ref= with an edit summary that said the change broke the template in Safari. Before ref= is re-introduced, I think we should discuss it. IMO, Sfn should be as lightweight as possible, and the ref= added a bunch of parameter references and a switch statement. I don't think the usage case is very common, and the example given above produces a bad result: the short references mention author names that aren't visible in the full citation. How is the reader supposed to know which full citation is paired with the short citations? Yes, the reader can click the link to have the full citation highlighted, but that only works in browsers that support the ":target" pseudo-class, and that means IE8 users don't see the highlight. (There may be a Javascript solution for that.) Anyway, I am not sure I'd vote for adding the ref= functionality. There is a workaround: the user can use {{harvnb}} with a REF element.

If we do add ref=, I recommend that we not implement both Ref= and ref=. Pick capitalized or not, and given the other parameters are not capitalized, ref= seems preferable. — John Cardinal (talk) 01:00, 25 February 2010 (UTC)[reply]

I agree that the ref parameter is unnecessary. It actually defeats the whole purpose of the template, which is to provide standardized link names (one for the footnote and one for the citation).
A better idea for your example is use {{sfn|Foo|2010|p=10}} and {{citation| author=Foo|editor-last=Apple|editor-first=Adam|year=2010|chapter=First Plenary Discussion|title=Xoo Conference|pages=5-50}}. Of course, if you really need your own special anchor name, you can always just type <ref>[[#Foo|Foo (2010), p. 10]]</ref>. You don't really need {{sfn}} to do this and John is right, there's no reason to complicate the code and introduce errors in some browsers. ---- CharlesGillingham (talk) 04:58, 25 February 2010 (UTC)[reply]

Adding a group parameter

Is it possible to add an optional "|group=" parameter so that notes can be separated from other citations, such as journal citations. – VisionHolder « talk » 18:58, 4 March 2010 (UTC)[reply]

Have a look at Reading Southern railway station to see {{sfn}} used in conjunction with books and journals, particularly refs 25, 40, 54. --Redrose64 (talk) 19:15, 4 March 2010 (UTC)[reply]
My problem is that I have a mix of references types, as discussed here. I'd like to be able to separate out the notes from the more complete references since I'm using LDR. If you want, after reading my LDR question take a look at one of my sandboxes, and you'll see what I'm dealing with. I just figured having a way to separate out my short footnotes (which I rarely use) might help me solve 3 of my 5 situations: journal citations (under References), regular books with page citations (under Notes), and regular books with chapter citations (under Notes). – VisionHolder « talk » 19:47, 4 March 2010 (UTC)[reply]
Why not use short references for everything? There's no need to separate sources by type, and you can use a short reference for any source. — John Cardinal (talk) 20:37, 4 March 2010 (UTC)[reply]
I'm starting to play with that possibility in my sandbox, but so far I would have to say that I would prefer a "|group=" option. – VisionHolder « talk » 22:01, 4 March 2010 (UTC)[reply]
Okay... one big problem with using Sfn for everything is that many of my journal articles have up to 10 authors. When that happens, the sfn ref looks like this: {{sfn|author1|author2|author3|author4|year}}. It doesn't look like much, but since you can never abbreviate it (unless you cheat using Template:SfnRef) numerous journal citations get ugly and difficult to read. I was hoping to eliminate this by using Template:R, but that can't happen if I'm using sfn for everything. (Too bad you can put all your sfn calls in the LDR by wrapping named ref tags around them.) Simply put, citing journals is best with LDR and the Template:R, while citing books is best (usually) with Sfn. This is why I would prefer to split out the short footnotes from the journal and web references. This is why I want a "|group=" parameter. – VisionHolder « talk » 23:03, 4 March 2010 (UTC)[reply]
If you have a long list of authors, use {{sfn|author1 et al|year}} and then make the ref= value match. — John Cardinal (talk) 00:16, 5 March 2010 (UTC)[reply]

This is what I'm looking to do. I managed it by doing my own CITEREF calls. I'm not sure how usable it would be or if the layout is acceptable for a references section, but if people like it, I could easily create a Sfn2 template. It looks like it's would only require stripping out the ref tag so that you can nest in a LDR block. Anyway, tell me what you think. (When you're looking at it, just imagine a huge article with a ton of references to journal articles, web pages, and complex books. Also notice the relative simplicity of the code compared to the complexity of the sources cited.) – VisionHolder « talk » 01:07, 5 March 2010 (UTC)[reply]

I don't care for the presentation of the source information on that page. Using "Yoder et al 1996" as a short footnote, and similar solutions for the other sources, is much better. — John Cardinal (talk) 04:42, 5 March 2010 (UTC)[reply]
P.S. I have used short footnotes on articles with hundreds of citations and it works fine. Most of the sources had at most a few authors, but some had 9 or 10, and there's no problem. — John Cardinal (talk) 04:44, 5 March 2010 (UTC)[reply]
P.P.S. (Sorry about the multiple edits.) I am not sure why you think using SfnRef is cheating. Some sources do not have author names, or have more than should be listed in a short footnote, and it's not clear how to make the cite template know what value the sfn has used. it's a simple and straightforward solution, and not cheating at all. — John Cardinal (talk) 04:54, 5 March 2010 (UTC)[reply]
I didn't mean to imply bad behavior on anyone's part. I'm sorry. I'll just retract that comment than trying to explain it. It was poorly worded. However, I do favor LDR and {{R}} (for consolidating and grouping), but {{Sfn}} doesn't work with it. Maybe instead of adding a group parameter, there could be a "noref" option to omit the ref tag so that the citation and CITEREF could be incorporated into LDR. But that's probably not even worth it, and honestly, I'm too tired at this point to think anything through. I'll take a look at everything again tomorrow and see if I can find a way to make it all work. I just have a serious problem with redundancy for large books of collected articles, and my solution is the only one that makes sense to me so far. Again, I'm sorry for the trouble. – VisionHolder « talk » 05:19, 5 March 2010 (UTC)[reply]
It should be noted that no special construct for "et al" is necessary - it is triggered automatically when {{sfn}} is given four authors. You can see this at work in Daniel Kinnear Clark, refs 11 & 14. Admittedly this uses {{cite book}}, but the effect for {{cite journal}} would be similar. --Redrose64 (talk) 11:36, 5 March 2010 (UTC)[reply]
Good point. I was taught to use "et al" after 2 authors and so I do it manually. — John Cardinal (talk) 14:27, 5 March 2010 (UTC)[reply]
Visionholder, you didn't cause any trouble and there is no need to apologize. I didn't think you were implying bad behavior on anyone's part, nor did I think you were behaving badly. We're just discussing the issue, and you asked for input on the method used in your sandbox, so I gave it! (Be careful what you ask for, I guess! <g>)
I understand that you favor LDR, no problem. I prefer Sfn, probably for at least one of the reasons that you like LDR (it reduces clutter in the prose), but I also like that Sfn automatically generates ref names so editors don't have to do it. Some editors complain that Sfn and LDR are too involved, and I think that mixing the two together in one article exacerbates that issue and will also be confusing for readers. I'd prefer to keep Sfn simple and avoid parameter clutter rather than add a group parameter/feature. If you are determined to add citation groups, why not approach it from the other direction? Put your non-Sfn refs into the non-default group. The REF element supports that, and I think that's true even for LDR. — John Cardinal (talk) 14:27, 5 March 2010 (UTC)[reply]

I agree with John. As I said in an earlier post, I think {{sfn}} is all about standardization, not flexibility. If I understand you right, you want to use both WP:CITE#List defined references and Shortened footnotes in the same article. Why not let shortened footnotes be the one without a group? And give a group to the LDR?

There is a way to use {{sfn}} with LDR. What if you used the standardized footnote name created by sfn? Like so:

Article text with a citation to an article.{{sfn|Smith|2007}}

Article text with a citation to a page in a book.{{sfn|Jones|2007|p = 3}}

== Notes ==
{{reflist| refs=
<ref name = "FOOTNOTESmith2007">Smith reference</ref>
}}

== References ==
* {{Citation|last=Jones|year=2007|Jones reference}}

I think standardized footnote names is a good thing. It's a little more dumb proof.

Thoughts? (A working version of this is at User:CharlesGillingham/TEMP) ---- CharlesGillingham (talk) 04:06, 6 March 2010 (UTC)[reply]

More thoughts on using sfn with list defined references

I've just had another thought, more radical this time. What if we changed the footnote name in {{sfn}} to be "Smith2009", rather than "FOOTNOTESmith2009". Then {{r}} and {{sfn}} would have exactly the same behavior: {{sfn|Smith}} would create a footnote named "Smith", just as {{r|Smith}} does. The only difference would be that (1) r puts a page number up in the superscript, merges with it's neighbors and takes a group. (2) sfn puts the page number into a shortened footnote and links to a full citation. Without the page number, they do the same thing.

If we want to make this change, we should do it soon, before someone uses the "FOOTNOTE" anchor directly. (That would be weird anyway.) ---- CharlesGillingham (talk) 05:12, 6 March 2010 (UTC)[reply]

Yet another thought: we could also create a template Template:SfnFootnote to be used in list defined references, so you could do this:

{{reflist|refs=
<ref name={{SfnFootnote|Smith|Jones|Brown}} ref={{citation|last=Smith ... }}</ref>
}}

Better still, is there a way for citation core to do this automatically if some flag is set? ---- CharlesGillingham (talk) 05:12, 6 March 2010 (UTC)[reply]

I'm sorry for not getting back to everyone sooner, and for simplicity, I'm going to start replying in this thread now. I do appreciate all the feedback and ideas. Admittedly, it is pretty late, and after a long night at work, my brain's a little fuzzy. It may just be easier for me to point to a major article in my sandbox that uses a full-formed version of my solution: my in-progress Lemur re-write. Be sure to look at the code in the References section, and note that I'm using {{R}} in the text body. Again, I'm keeping my heavily cited books separate from my journal articles and web cites to make things neat and organized. I've also indented the chapters and contained articles for the most complicated books (compilations). This minimizes redundancy (by not saying the same "|title=" over and over again for many refs) and keeps things organized. (This indentation is what I'm most worried about—is it too original? Does it violate referencing rules?) The method I'm using is already pretty straightforward, except for the use of CITEREFs. However, That could easily be turned into an Sfn-like template. Below is an example of what I'm currently using, as well as an example with a theoretical template (named Template:RCR) to simplify it:
<ref name="2006Lemurs2">[[#CITEREFJollySussman2006|Jolly, Sussman 2006]], pp. 19–40</ref>

<ref name="2006Lemurs2">{{RCR|Jolly|Sussman|2006|pp=19–40}}</ref>
This allows the user to chose their own ref name (which I prefer) and create a simple CITEREF-linked short footnote very similar to Sfn, but perfect for use with LDR and R. Basically, the {{RCR}} template is {{Sfn}}, minus the ref tag that is wraps around it... and maybe some other stuff I haven't been able to decipher yet. Anyway... I admit that I'm probably bringing this up on the wrong page. I should probably be preaching to the LDR crowd, not the Sfn crowd. But again, I do appreciate your feedback. – VisionHolder « talk » 07:28, 6 March 2010 (UTC)[reply]
I'll be blunt: I looked at the page, and I don't like it. You are using too many citation methods, including two different superscript styles ([nb N] and [N], two different inline styles (superscripted link and with and without parenthesized text) and three different sections at the end of the article. The sources for the page ought to be simpler, and they can be. Choose one style, and follow it. You're making an arbitrary distinction between books, journal articles, and other sources, and it doesn't help. — John Cardinal (talk) 10:55, 6 March 2010 (UTC)[reply]
Thanks for the example. It's still not clear to me why you need the special footnote name "2006Lemurs2", as opposed to the standard footnote name that is generated automatically by sfn.
I looked at the article, and I appreciate the hard work you are putting into it. It looks like a well researched article. Good work.
However, I agree with John that the citation style is too complicated. (1) I think it is a mistake to implement the shortened footnotes as list-defined references the way you are doing it. Now an editor has to add each new shortened footnote in two places, once in the text, and once down in the code. This seems very complicated to me. Also, many of the best editors are not computer professionals, and will find it difficult or impossible to find the shortened footnote inside what is, essentially, a dense block of computer code. (2) It's not necessary to separate the shortened footnotes from citations-in-footnotes. (Note that many thousands of articles in Wikipedia combine shortened footnotes and footnotes into the same section, for example Starship Troopers. This is the de-facto standard. ) ---- CharlesGillingham (talk) 18:30, 6 March 2010 (UTC)[reply]
If your requirement is for a {{sfn}}-equivalent that does not have the <ref></ref> around it, try {{harvnb}}. --Redrose64 (talk) 13:38, 7 March 2010 (UTC)[reply]
Thank you for pointing out the existence of {{harvnb}}! I should have looked around at the related templates more. As for merging the notes with the general references, I may do that. I think it looks neater this way, but it's not the most important thing to me. (Anyway, I like regular numbered footnotes, and not the "nb X".) I also agree that one of the drawbacks to LDR (and not just my specific approach) is that you have to edit twice, once to add the material and once to add the reference. I'm not denying that Sfn has a strong appeal. However, I'm just not sold on the use of short footnotes for every citation, including journal articles. I like separating out books cited, as I have in Ruffed lemur, which I modeled after many other Wiki articles in the biology section. Either way, I think I'm just going to run my approach by the people who regularly review my GACs and FACs and see how they feel, and make my tweaks based on that. Had I noticed {{harvnb}} prior to all of this, this conversation might not have been so long. Thank you very much for your time and for sharing your opinions. Although we differ in opinion, I'm glad I got to hear your side. You have made excellent points. – VisionHolder « talk » 14:37, 7 March 2010 (UTC)[reply]

How about using Sfn for all the in-text cootnotes, but use the following sections at the end of the document:

  1. Notes (for the footnotes produced by Sfn)
  2. References (header for the following two sections)
  3. Books (for any books referenced)
  4. Other sources (for all other sources including journal articles)

You can come up with your own scheme for how to divide the full citations; the key part is to simplify the method used to link the footnote in the prose to the full citation. — John Cardinal (talk) 15:39, 7 March 2010 (UTC)[reply]