Template talk:Sfn/Archive 2
Archive 1 | Archive 2 | Archive 3 | Archive 4 | Archive 5 |
Sfnp
As we add features here, we need to remember to update the variants: {{sfnp}} and {{sfnm}}. I added |paren=
to sandbox to add parenthesis for the year:
Markup | Renders as |
---|---|
{{sfn/sandbox|Smith|2005|p=25}}{{sfn/sandbox|Smith|2006|p=25|paren=y}}{{reflist}}{{refbegin}}* {{cite book |last=Smith |title=Book |year=2005 |ref=harv}}* {{cite book |last=Smith |title=Book |year=2006 |ref=harv}}{{refend}} | |
What we really need to do is create {{sfn/core}} with named parameters so we can keep all of the variants in sync. ---— Gadget850 (Ed) talk 07:51, 20 March 2012 (UTC)
- Obsoleted by #Core. ---— Gadget850 (Ed) talk 09:10, 3 April 2012 (UTC)
question on Harvb error in All Saints' Church, Shuart
I can't figure out why ref 38 in All Saints' Church, Shuart throws an error: "Harv error: link to #CITEREFLewis1732 doesn't point to any citation." Thanks, MathewTownsend (talk) 18:06, 4 April 2012 (UTC)
- It was the wrong year, but the problem has already been fixed. Ucucha (talk) 20:18, 4 April 2012 (UTC)
- Thanks! (I thought I checked for that - guess not.) MathewTownsend (talk) 20:23, 4 April 2012 (UTC)
Centralized talk page
Propose centralizing these talk pages here, as this is the most active talk page.
- Template talk:Harvard citation
- Template talk:Harvard citation no brackets
- Template talk:Harvard citation text
- Template talk:Harvcol
- Template talk:Harvcolnb
- Template talk:Harvcoltxt
- Template talk:Sfn
- Template talk:Sfnm
- Template talk:Sfnp
- Template talk:Harvard citation documentation
See WP:TALKCENT for details on the process. ---— Gadget850 (Ed) talk 09:39, 3 April 2012 (UTC)
- Support Blue Rasberry (talk) 13:25, 3 April 2012 (UTC)
- Oppose. Not a good idea. If talk activity is to be the criterion of where to move a discussion then why not merge with Wikipedia:Editor assistance/Requests? Better that discussions be organized by topic. While there might be some justification for pulling Sfnm and Sfnp here, and while this topic (Sfn) links with the various aspects of Harv, it is different enough to not warrant sucking in all the other less related topics into one confusing tar ball. ~ J. Johnson (JJ) (talk) 19:22, 4 April 2012 (UTC)
- The only difference between {{sfn}} and {{harvnb}} is that the former is wrapped in a
<ref>...</ref>
tag. Indeed, I proposed a #Core for the nine templates. ---— Gadget850 (Ed) talk 23:30, 4 April 2012 (UTC)- Indeed. But this is like saying nine kinds of bolts may – but note: need not – be put into a plastic bag. That doesn't make "plastic bag" the preferred reference term for "bolts" generally. Sfn mixes two different kinds of tools (should discussion of <ref> also be merged here?); that does not subordinate those tools, or their discussion, to this tool. And while Sfn uses Harv, it is not itself any form of Harv. Blurring these concepts would lead to more of the confusion of concept has made citation on Wikipedia unnecessarily difficult. We don't need to compound that. ~ J. Johnson (JJ) (talk) 23:16, 5 April 2012 (UTC)
{{sfn}}
doesn't mix<ref>...</ref>
with{{harv}}
- it encloses{{harvnb}}
in<ref>...</ref>
. The construct<ref name=id>
is a common one, and{{harvnb|author|year|p=n}}
</ref>{{sfn|author|year|p=n}}
does the same job in at least 21 fewer characters. This makes the wikicode significantly shorter, with the added benefit of ensuring the uniqueness of id. --Redrose64 (talk) 09:55, 6 April 2012 (UTC)- These templates are very similar in both use and in markup. Enough that changes to one template should be discussed and applied to all, and enough that queries about use of one applies to all. ---— Gadget850 (Ed) talk 11:26, 6 April 2012 (UTC)
- But sfn is an outlier in naming, at least. It would make more sense to me to centralize on one with a more central name, like {{harv}}. —David Eppstein (talk) 16:13, 6 April 2012 (UTC)
- These templates are very similar in both use and in markup. Enough that changes to one template should be discussed and applied to all, and enough that queries about use of one applies to all. ---— Gadget850 (Ed) talk 11:26, 6 April 2012 (UTC)
- Indeed. But this is like saying nine kinds of bolts may – but note: need not – be put into a plastic bag. That doesn't make "plastic bag" the preferred reference term for "bolts" generally. Sfn mixes two different kinds of tools (should discussion of <ref> also be merged here?); that does not subordinate those tools, or their discussion, to this tool. And while Sfn uses Harv, it is not itself any form of Harv. Blurring these concepts would lead to more of the confusion of concept has made citation on Wikipedia unnecessarily difficult. We don't need to compound that. ~ J. Johnson (JJ) (talk) 23:16, 5 April 2012 (UTC)
- The only difference between {{sfn}} and {{harvnb}} is that the former is wrapped in a
Request withdrawn ---— Gadget850 (Ed) talk 16:25, 6 April 2012 (UTC)
- Strong Support (although I'm sorry it's belated). These templates are nearly identical. If there is an issue with one of them, chances are the issue applies to all of them. If a change is made to one of them, the change should be made to all of them. Gadget: why the rush to withdraw? ---- CharlesGillingham (talk) 07:27, 7 April 2012 (UTC)
- Pretty obvious there is no consensus to do this nor where, so there is no sense in trying to bag these bolts. Will re-propose in six months. ---— Gadget850 (Ed) talk 12:12, 7 April 2012 (UTC)
- Also obvious that the inner working of these templates is not understood. So, even though they use a common doc page, we will just have to do some education before going to a central talk page. ---— Gadget850 (Ed) talk 17:20, 8 April 2012 (UTC)
- I suspect there would be no objection to merging the Sfn* talk pages. But dissimilarity between Sfn* and Harv* is not something that is likely to change with simply the passage of time. ~ J. Johnson (JJ) (talk) 19:52, 8 April 2012 (UTC)
- Also obvious that the inner working of these templates is not understood. So, even though they use a common doc page, we will just have to do some education before going to a central talk page. ---— Gadget850 (Ed) talk 17:20, 8 April 2012 (UTC)
- Pretty obvious there is no consensus to do this nor where, so there is no sense in trying to bag these bolts. Will re-propose in six months. ---— Gadget850 (Ed) talk 12:12, 7 April 2012 (UTC)
Harvard citations
- Was {{Harvard citations}} a deliberate omission or an oversight? It would seem to be a more natural choice of where to centralize than this one to me, as being in some sense the most general of the lot rather than the most specific. —David Eppstein (talk) 15:22, 3 April 2012 (UTC)
- I am pondering that one. It is very different from the listed templates and does not have the potential to update to a common core. ---— Gadget850 (Ed) talk 15:34, 3 April 2012 (UTC)
- {{Harvard citations}} should not be included. It is structured very differently than the other templates, and there is unlikely to be an overlap of issues. ---- CharlesGillingham (talk) 07:27, 7 April 2012 (UTC)
- I am pondering that one. It is very different from the listed templates and does not have the potential to update to a common core. ---— Gadget850 (Ed) talk 15:34, 3 April 2012 (UTC)
Core update
Given the commonality in markup for the following templates, I have developed a meta-template at {{Harvard citation/core}}. A version using this core is in each sandbox.
Note that {{Harvard citations}} is very different in implementation, thus is not supported by the meta-template.
Templates | Aliases | Sandbox |
---|---|---|
{{Harvard citation no brackets}} | {{harvnb}} | {{Harvard citation no brackets/sandbox}} |
{{Harvard citation}} | {{harv}} | {{Harvard citation/sandbox}} |
{{Harvard citation text}} | {{harvtxt}} | {{Harvard citation text/sandbox}} |
{{Harvcoltxt}} | {{Harvcoltxt/sandbox}} | |
{{Harvcol}} | {{Harvcol/sandbox}} | |
{{Harvcolnb}} | {{Harvcolnb/sandbox}} | |
{{sfn}} | {{sfn/sandbox}} | |
{{Sfnp}} | {{Sfnp/sandbox}} | |
{{Sfnm}} | {{Sfnm/sandbox}} |
Here are samples of the current implementations:
Markup | Renders as |
---|---|
{{Harvard citation no brackets |Smith |2015 |p=25}} | Smith 2015, p. 25 |
{{Harvard citation |Smith |2015 |p=25}} | (Smith 2015, p. 25) |
{{Harvard citation text |Smith |2015 |p=25}} | Smith (2015, p. 25) |
{{Harvcolnb |Smith |2015 |p=25}} | Smith 2015:25 |
{{Harvcol |Smith |2015 |p=25}} | (Smith 2015:25) |
{{Harvcoltxt |Smith |2015 |p=25}} | Smith (2015:25) |
{{sfn |Smith |2015 |p=25}} | |
{{sfnp |Smith |2020 |p=25}} | |
{{sfnm |1a1=Smith |1a2=Jones |1a3=Johnson |1y=2005 |1p=15 |2a1=Jones |2a2=Johnson |2a3=Smith |2y=2004 |2p=50}} | |
{{Harvard citation no brackets |Smith |p=25 |ref=smithref}} | Smith, p. 25 |
And samples using the new core:
Markup | Renders as |
---|---|
{{Harvard citation no brackets/sandbox |Smith |2015 |p=25}} | Smith 2015, p. 25 |
{{Harvard citation/sandbox |Smith |2015 |p=25}} | (Smith 2015, p. 25) |
{{Harvard citation text/sandbox |Smith |2015 |p=25}} | Smith (2015, p. 25) |
{{Harvcolnb/sandbox |Smith |2015 |p=25}} | Smith 2015:25 |
{{Harvcol/sandbox |Smith |2015 |p=25}} | (Smith 2015:25) |
{{Harvcoltxt/sandbox |Smith |2015 |p=25}} | Smith (2015:25) |
{{sfn/sandbox |Smith |2015 |p=25}} | |
{{sfnp/sandbox |Smith |2020 |p=25}} | |
{{sfnm/sandbox |1a1=Smith |1a2=Jones |1a3=Johnson |1y=2005 |1p=15 |2a1=Jones |2a2=Johnson |2a3=Smith |2y=2004 |2p=50}} | |
{{Harvard citation no brackets/sandbox |Smith |p=25 |ref=smithref}} | Smith, p. 25 |
- Smith (2015). Book.
{{cite book}}
: Invalid|ref=harv
(help) - Smith (2020). Book.
{{cite book}}
: Invalid|ref=harv
(help) - Smith. Book.
- Jones, John; Johnson, John; Smith, John (2004). Our First Book.
{{cite book}}
: Invalid|ref=harv
(help) - Smith, John; Jones, John; Johnson, John (2005). Our Second Book.
{{cite book}}
: Invalid|ref=harv
(help)
I propose updating to this core, as it would keep the related templates synchronized, thus simplifying upkeep. ---— Gadget850 (Ed) talk 01:32, 9 April 2012 (UTC)
- Strongly support this update being made. It will make no difference to users of these templates, but will make maintenance much easier. As an example, last month changes to allow both a page number/range and a location to be displayed were made to one of the "sfn*" templates, but not to the others. This kind of inconsistency can be removed entirely by having a central core template which is used by all the others but which is never directly used in articles. The approach works very well elsewhere (e.g. in the templates which create the taxoboxes visible in almost all articles about animals, plants and other organisms). Peter coxhead (talk) 08:05, 9 April 2012 (UTC)
- Looks reasonable enough. ~ J. Johnson (JJ) (talk) 22:22, 9 April 2012 (UTC)
- Support. I note that the new version also fixes an issue in sfnp where leading and trailing spaces in the year are significant. —David Eppstein (talk) 23:39, 9 April 2012 (UTC)
- Done except for {{sfnm}}. Need to dig into that some more to figure out what is wrong. ---— Gadget850 (Ed) talk 16:09, 28 April 2012 (UTC)
Can this be used with comic books?
I'm trying to upgrade some comic related articles and I've used this template a lot with film articles, but Template:Cite comic does not use a separate surname parameter and multiple issues of a comic can be released in a single year so I'm not clear how SFN differentiates between which I'm referencing. For example if I cite two comics in the same series by a single writer in a single year. Darkwarriorblake (talk) 14:35, 17 July 2012 (UTC)
- {{Cite comic}} does not support an anchor, see Template:Sfn#Citation format does not support anchors: .7B.7Bwikicite.7D.7D. See Template:Sfn#More than one work in a year. ---— Gadget850 (Ed) talk 15:14, 17 July 2012 (UTC)
- I added
|ref=
to {{cite comic/sandbox}}. Review and discuss at Template talk:Cite comic#Anchor. ---— Gadget850 (Ed) talk 15:16, 17 July 2012 (UTC)- Thanks for the input and change Gadget850, should prove useful. Darkwarriorblake (talk) 16:51, 17 July 2012 (UTC)
- Done ---— Gadget850 (Ed) talk 12:55, 31 July 2012 (UTC)
- Thanks for the input and change Gadget850, should prove useful. Darkwarriorblake (talk) 16:51, 17 July 2012 (UTC)
- I added
Template documentation
The template documentation should include a simple list or table for the available parameters.
For instance, I am attempting to cite a not-so-unusual source: a book with different authors for each chapter. Since the book itself only has editors, and not an author, per se, I was wondering if 'editors' (plural) was a viable parameter, and if 'chapter' had a parameter, and if there was some means of including a 'chapter title'. Ideally, there would be a 'chapter author' for multiple citations. Unfortunately, the examples given did not provide anything appropriate to this situation. My point is: a parameter list would provide guidance for essentially any situation. ~Eric F 74.60.29.141 (talk) 15:07, 27 October 2012 (UTC)
- I found it here:Template:Cite_book -- perhaps a link "For usage information..." at the top of the page? ~E 74.60.29.141 (talk) 15:19, 27 October 2012 (UTC)
Can I have a little help?
On the article Throffer, the template is struggling to link one of my sources (Steiner 1974-75) to its entry in the bibliography. I assume this is because the citation has two years. Is there a way around this? J Milburn (talk) 17:28, 23 February 2013 (UTC)
Lua version is broken
Using {{sfn}}
: One.[1] Two.[2] Three.[1] Four.[2]
Using {{sfn/sandbox}}
: One.[1] Two.[2] Three.[1] Four.[2]
As shown above, the Lua version omits the small-letter backlinks which were present before. This is a bug. --Redrose64 (talk) 22:41, 2 April 2013 (UTC)
- Filed as bugzilla:46815. Dragons flight (talk) 23:24, 2 April 2013 (UTC)
- I'm now seeing some strange behavior on Adriaen van der Donck. Namely, number 15 (O'Donnell 1968 xxxviii.) is using the small letter backlinks, whereas other multiple citations aren't, but it's rendering it as O'Donnell & 1968 xxxviii, which is breaking the link to the full reference. Laura Scudder | talk 21:13, 3 April 2013 (UTC)
- Two problems there. One is the
{{sfn}}
bug that I described above; the other is that the article contained{{sfn|O'Donnell|1968|xxxviii}}
which is misuse of the third positional parameter - it should have been a named parameter as in{{sfn|O'Donnell|1968|p=xxxviii}}
. - Since bugzilla:46815 doesn't yet have a solution, I've reverted
{{sfn}}
to the last working version (this means that Module:Footnotes is not used). I've also put the version of{{sfn}}
that had been live into{{sfn/sandbox}}
so that the above demo continues to exhibit a difference. --Redrose64 (talk) 16:13, 4 April 2013 (UTC)
- Two problems there. One is the
- I'm now seeing some strange behavior on Adriaen van der Donck. Namely, number 15 (O'Donnell 1968 xxxviii.) is using the small letter backlinks, whereas other multiple citations aren't, but it's rendering it as O'Donnell & 1968 xxxviii, which is breaking the link to the full reference. Laura Scudder | talk 21:13, 3 April 2013 (UTC)
- The next update for Lua should include the frame:extensionTag function which is a functional work-around for this issue. I was told about 2 weeks ago that the relevant incremental release for Mediawiki would probably be this week, so we may have a solution soon, but I don't know for sure. Dragons flight (talk) 16:37, 4 April 2013 (UTC)
- I've restored the Lua version. The underlying ref bug is not actually fixed, but the recent update to Mediawiki provided a work-around so that I could make the Lua module work anyway. Dragons flight (talk) 23:37, 8 April 2013 (UTC)
Multiple Volume in same year
How do you differentiated volume 1 of a work form volume 2 of another work with the same title, same author, and same publication year.--KAVEBEAR (talk) 09:14, 5 June 2013 (UTC)
- When the same author/authors have more than one publication in a year the usual practice (not just on Wikipedia) is to add a lowercase letter to the year - eg 1997a, 1997b etc. (both in the cite/citation template and in the sfn template) Aa77zz (talk) 09:48, 5 June 2013 (UTC)
- Template:Sfn#More than one work in a year -- Gadget850 talk 10:28, 5 June 2013 (UTC)
SFN link
Can someone help me get the Coplans link to the references section working at Whaam!.--TonyTheTiger (T/C/BIO/WP:CHICAGO/WP:FOUR) 15:56, 21 July 2013 (UTC)
- Done, see here --Redrose64 (talk) 16:23, 21 July 2013 (UTC)
- Done as well! I've had a go at the references section and tidied it a bit. The harvard references for the four books are now:
- id="CITEREFAlloway1983"
- id="CITEREFBader2009"
- id="CITEREFCoplans1972"
- id="CITEREFWaldman1993"
- You just need to use {{sfn|Coplans|1983|p=?}}. Even the Waldman (1993) link ought to work satisfactorily. HTH, Martin of Sheffield (talk) 16:49, 21 July 2013 (UTC)
- Thanks.--TonyTheTiger (T/C/BIO/WP:CHICAGO/WP:FOUR) 16:53, 21 July 2013 (UTC)
Two authors and no year
I occasionally come across a web page where there is no easily definable year, see for instance [1]. Since there is no year, the reference ({{sfn|Lane|Singh}}) correctly produces #CITEREFLaneSingh but displays as Lane & Singh not Lane & Singh. Is there any way to force the correct display whilst keeping the automatic linking from text through citation to bibliography? Martin of Sheffield (talk) 22:43, 7 July 2013 (UTC)
- The last value is being parsed as the year, not the author, thus the lack of the ampersand. I don't see any current way to fix this. The best way would be to add
|year=none
to the module to explicitly suppress the year. -- Gadget850 talk 18:22, 22 July 2013 (UTC)- Thanks for the suggestion. I've used year=unknown for Lane & Singh on the Richard Watts page. Martin of Sheffield (talk) 22:18, 22 July 2013 (UTC)
- Having no year of publication seems so gravely deficient I wonder if it ought to be considered an error condition. But on the assumption that there are some cases where we have to finesse not having a year: couldn't Harvid be used for this? ~ J. Johnson (JJ) (talk) 22:32, 22 July 2013 (UTC)
- The problem is not in the references, template:citation generates them quite correctly. The problem lies with how the inline reference is displayed. The inline reference correctly links using CITEREF, but incorecctly displays the last author as if the author were a year. I can't see that template:harvid would help this, but if you know better please explain. The only alternative I know to using year=unknown is to use <ref>{{harv|Lane & Singh}}</ref> which of course does not link through. As regards the lack of a year, please have a look at [2]. The provenance is excellent, the sponsors being the charity themselves, and some conclusions are noteworthy but I have not been able to find a year. Should I include apparently good information or reject it due to a fault in the web site? Martin of Sheffield (talk) 23:06, 22 July 2013 (UTC)
- Using the wget utility on the the above link to retrieve the raw HTML, and then using the MS-DOS dir command on the retrieved file shows me
16/04/2013 11:45 9,164 richardwatts1.html
- that's BST, therefore the true datestamp is 10:45, 16 April 2013 (UTC) --Redrose64 (talk) 14:30, 23 July 2013 (UTC)- Excellent lateral thinking. I know for a fact that the page is significantly older than that (accessdate = 21 June 2012) but is the best alternative there is. I checked to make sure that MS wasn't "doing its own thing" and confirmed it using ls -l
-rw-r--r-- 1 jmr users 9164 Apr 16 11:45 richardwatts1.html
I even grep'ed for the string "20", but could only see the visible "middle of the 20th Century". - More generally though, there needs to be a way of dealing with multiple authors without a date. wget and checking the date is probably a bit geeky for many editors. Martin of Sheffield (talk) 17:47, 23 July 2013 (UTC)
- Excellent lateral thinking. I know for a fact that the page is significantly older than that (accessdate = 21 June 2012) but is the best alternative there is. I checked to make sure that MS wasn't "doing its own thing" and confirmed it using ls -l
- Using the wget utility on the the above link to retrieve the raw HTML, and then using the MS-DOS dir command on the retrieved file shows me
- The problem is not in the references, template:citation generates them quite correctly. The problem lies with how the inline reference is displayed. The inline reference correctly links using CITEREF, but incorecctly displays the last author as if the author were a year. I can't see that template:harvid would help this, but if you know better please explain. The only alternative I know to using year=unknown is to use <ref>{{harv|Lane & Singh}}</ref> which of course does not link through. As regards the lack of a year, please have a look at [2]. The provenance is excellent, the sponsors being the charity themselves, and some conclusions are noteworthy but I have not been able to find a year. Should I include apparently good information or reject it due to a fault in the web site? Martin of Sheffield (talk) 23:06, 22 July 2013 (UTC)
- Having no year of publication seems so gravely deficient I wonder if it ought to be considered an error condition. But on the assumption that there are some cases where we have to finesse not having a year: couldn't Harvid be used for this? ~ J. Johnson (JJ) (talk) 22:32, 22 July 2013 (UTC)
- Thanks for the suggestion. I've used year=unknown for Lane & Singh on the Richard Watts page. Martin of Sheffield (talk) 22:18, 22 July 2013 (UTC)
Yes! I thought I had done something like this before. Try this:
*[[#{{Harvid|Smith|Jones}}|Smith & Jones]]
Which with something like this:
*{{citation |ref={{harvid|Smith|Jones}} |year= ''undated'' |last1= Smith |first1= A. |last2= Jones |first2= B. |title= Some source with no date}}.
gives us "Smith & Jones" linking to:
- Smith, A.; Jones, B. (undated), Some source with no date
{{citation}}
: Check date values in:|year=
(help)CS1 maint: ref duplicates default (link).
Which implies a harv link can be made to display any way we want it. ~ J. Johnson (JJ) (talk) 20:08, 24 July 2013 (UTC)
- I altered the
|ref=
to pull in{{harvid|Smith|Jones}}
- an exact match of the one used inside the<ref>...</ref>
. If they match, somebody who arrives later on will have a better idea of the method (CITEREF... is somewhat obscure) --Redrose64 (talk) 21:42, 24 July 2013 (UTC)- Thanks to both of you. I've altered Richard Watts to use
<ref>[[#{{harvid|Lane|Singh}}|Lane & Singh]]</ref>
in the text. As J. Johnson suggested, this generates the correctly formatted entry in the {{references}} section and the appropriate CITEREFLaneSingh. I simply removed the "year=unknown" parameter from the citation in the bibliography, there is no need for an explicit ref parameter, the default is correct. Harvid is indeed flexible, see template:NHLE for an example of hijacking the year. I'll have a go at including this work around in the documentation for sfn. Once again, thanks. Martin of Sheffield (talk) 22:00, 24 July 2013 (UTC)
- Thanks to both of you. I've altered Richard Watts to use
- I have generally preferred using the explicit CITEREF as I know exactly what I'm getting. But perhaps using parallel harv templates is more straightforward? I wouldn't mind if we could determine a preferred practice here. ~ J. Johnson (JJ) (talk) 22:01, 24 July 2013 (UTC)
Self-referencing link?
Don't see what the use of having a citation that self-references the article you are in, and does not actually point a new reader to the actual cite. Why not have a named citation that the reader can see and doesn't have to "look for" in a list of citations.
There's an irony here inasmuch as we stop newbies from using self-referencing links. Student7 (talk) 14:50, 30 August 2013 (UTC)
- Well, it doesn't reference the article you are in – it just requires a second step to find the full reference.
- But consider the alternative when a book is used many times in an article, and page references are given, as for example the use of Anderson (2001) in Cactus#References. The alternative to the use of the Harvard style links in the list of references is to repeat the full book citation every time – there are more than 25 such uses. What's the point of 25+ repetitions of "Anderson, Edward F. (2001), The Cactus Family, Pentland, Oregon: Timber Press, ISBN 978-0-88192-498-5"? Peter coxhead (talk) 15:38, 30 August 2013 (UTC)
What does the #invoke magic word do?
Because the Ringo Starr page on the Beatles Wiki was in a terrible mess (caused by somebody copying a previous version of the Wikipedia equivalent in a totally clueless fashion, resulting amongst other things in two different tables of contents, the Wikipedia one and the local one), I have just copied the current version over; unfortunately this involves copying the templates used, if they don't exist there.
I have hit a major roadblock copyng this (sfn) template; the #invoke magic word isn't recognised by Wikia's version of the cite parser, and neither the magic-words documentation nor the cite-parser documentation explains this either. I need to know so that I can recreate this functionality by some other means. Please reply on my userpage there, User:RobertATfm. — 188.29.16.101 (talk) 14:21, 13 October 2013 (UTC)
- It's listed at Help:Magic words#Other and that directs you to Wikipedia:Lua which in turn links to mw:Extension:Scribunto; that extension needs to be installed on the wiki concerned. If you don't want to do that, you can use a pre-Lua version of
{{sfn}}
- the last one is here. --Redrose64 (talk) 18:25, 13 October 2013 (UTC)
Several page numbers to same book
I have used the sfn template on Wells Cathedral which we are working towards an FA nomination. One book (Smith 1975 - currently ref No: 101) has been used to support several claims. Another editor who has a copy of the book says that all the text is included on pages 1-2 and 25. What would be the page number syntax to show this within the sfn template as I can't see it in any of the examples given?— Rod talk 13:19, 20 November 2013 (UTC)
Proposed addition of a 'url' parameter
For me the sfn template is an elegant approach to citing an article. Unfortunately, the use of a separate reference appears to limit the use of links to individual online book web pages. Since the sfn template carries the page information for the reference, I decided I would like to be able to add a 'url' to a specific online book page. Currently it appears possible to do this by passing the link directly in the page field. However, I would like to propose making this a separate parameter, such as 'url='. Here's an example:
Referencing this statement.[1]
Notes:
References:
- Ryan, Craig (2003), The Pre-astronauts: Manned Ballooning on the Threshold of Space, Naval Institute Press, ISBN 1591147484.
- example sfn entry: {{sfn|Ryan|2003|pp=[http://books.google.com/books?id=1QS38bu9iTwC&pg=PA51 51–54]}}
- proposed sfn entry: {{sfn|Ryan|2003|pp=51–54|url=http://books.google.com/books?id=1QS38bu9iTwC&pg=PA51}}
Does this seem reasonable? Praemonitus (talk) 18:53, 20 April 2013 (UTC)
- Agreed. --SlothMcCarty (talk) 23:28, 10 January 2014 (UTC)
Multi-year ranges produce in {{sfn}} produce different results that those produced by {{cite Journal}}
When the publication date for a journal consists of a multi-year range, the span id produced by {{sfn}} differs from those generated by {{cite Journal}}. An example is:
- {{Cite journal |last=Farlow |first=Archa Malcolm | title = Arizona's Admission to Statehood | journal = Annual Publication of the Historical Society of Southern California | volume = 9 | issue = 1/2 | pages = 132–153 | publisher = University of California Press | date = 1912–1913 | jstor = 41168902 |ref=harv}}
which produces a span id of "CITEREFFarlow1912.E2.80.931913", while
- {{sfn|Farlow|1912-1913|p=152}}
produces a corresponding span id of "CITEREFFarlow1912-1913". Things would work better if the two matched. --Allen3 talk 01:35, 16 April 2014 (UTC)
- Using an en-dash character instead of "–" fixed it. It seems that
{{sfn}}
handles – properly, but Module:Citation/CS1 doesn't – the{{cite journal}}
produces "CITEREFFarlow", while {{sfn|Farlow|1912–1913|p=152}} produces "CITEREFFarlow1912.E2.80.931913". This is mentioned in the table at Module talk:Citation/CS1/Archive 10#Update to the live CS1 module week of 2014-03-23. Kanguole 07:39, 16 April 2014 (UTC)- In the example given by Allen3, the
|date=1912–1913
in{{cite journal}}
does indeed use an en-dash - the character, not the entity–
whereas the{{sfn}}
doesn't use a dash of any form - it uses a hyphen-minus (the character typed on a normal keyboard). If you alter{{sfn|Farlow|1912-1913|p=152}}
to{{sfn|Farlow|1912–1913|p=152}}
it will work, because the{{sfn}}
will now generate the URL fragment#CITEREFFarlow1912.E2.80.931913
to match the anchor in the{{cite journal}}
. --Redrose64 (talk) 08:22, 16 April 2014 (UTC)
- In the example given by Allen3, the
Citation has multiple authors and no date
In section citation has multiple authors and no date it's suggested to use <ref>[[#{{harvid|Lane|Singh}}|Lane & Singh]]</ref>
instead of {{sfn|Lane|Singh}}
. Is it also OK to add a |date=n.d.
to citation and use {{sfn|Lane|Singh|n.d.}}
instead?
Example.[1]
- Lane, Kieran; Singh, Karun (n.d.), "Richard Watts", Richard Watts Charities, retrieved 21 June 2012 — Preceding unsigned comment added by دالبا (talk • contribs) 19:28, 21 June 2014
- I have never seen the point of "n.d." The
{{sfn|Lane|Singh}}
form works perfectly well if the|year=
and|date=
parameters are omitted from the{{citation}}
. --Redrose64 (talk) 19:32, 21 June 2014 (UTC)<ref>[[#{{harvid|Lane|Singh}}|Lane & Singh]]</ref>
produces a footnote "Lane & Singh" with a CITEREFLaneSingh which is what is normally required.
produces a footnote of "Lane Singh" with a CITEREFLaneSingh. The linkage works fine but the displayed footnote is inadequate. For example:[1][2]{{sfn|Lane|Singh}}
- Personally I'd be worried about using "n.d." Remember WP:RF, what would a reader who is interested in the citations but doesn't understand Wiki markup think? Martin of Sheffield (talk) 22:24, 1 July 2014 (UTC)
- Although it may seem unusual for some readers but it's recommended by Harvard style guide for situations where there is no known date and no approximate date can be estimated. (Maybe it's OK to leave it out, but I hope this discussion won't go so far as prohibiting its usage.) Dalba 05:32, 2 July 2014 (UTC)
- Perhaps; but
{{sfn}}
is not Harvard and was never intended to be. Wikipedia does not enforce any one style, save that in order to qualify for featured article status, the citation style must be consistent within the article. --Redrose64 (talk) 11:35, 2 July 2014 (UTC)- By a curious coincidence I was recently wondering about dropping the year from a standard author-date (but not necessarily Harvard reference!) type of citation. Not for lack of a year, just for not being necessary. It seems to me that inclusion of the year is so standard that anyone with any familiarity with citations would find such a citation odd. Getting back to the case considered here, where no date is available, that does happen. And I wonder if the lack of a year is odd enough that that something (e.g., "n.d.") ought to be supplied in it place. In the print environment this is recommended as a placeholder where a data might be forthcoming. In our environment it could indicate that the absence of the year is not due to inadvertence, or some editor's goofy "style". ~ J. Johnson (JJ) (talk) 18:54, 2 July 2014 (UTC)
- The problem as I see is that a reader who is unfamiliar with academic works but is intelligent, as WP:RF says a high school pupil, won't know what "n.d." means. If they see "Lane & Singh p. 3" it is pretty clear. "Lane & Singh (2009) p. 3" is also pretty self explanatory if you see an entry such as "Lane, Keiran & Singh, Karun (2009) ..." in the bibliography. Likewise constructs such as "2009?" or possibly even "c. 2009" work. However,, without consulting the Harvard manual of style, what does "n.d." mean? "Nunc dimittus?", "nearly done" or possibly Singh has the initials N.D. but doesn't like to use them, or alternatively they might be Singh's nickname. If you must use a placeholder then avoid technical jargon: "Lane & Singh (date unknown)" is a clear as a bell. Martin of Sheffield (talk) 22:36, 2 July 2014 (UTC)
- The advantage of "n.d." in the print environment is that it could be replaced by a four digit date without upsetting any of the formatting. We, of course, are not concerned about that, and I think "date unknown" is quite satisfactory. The question is whether, in cases where the date (year) is unknown, it is satisfactory to omit the date entirely, without any explanation, or whether some indication be given ("n.d.", "date unknown", "????" or whatever) lest a reader think the omission is due to inadvertence. ~ J. Johnson (JJ) (talk) 19:13, 3 July 2014 (UTC)
- The problem as I see is that a reader who is unfamiliar with academic works but is intelligent, as WP:RF says a high school pupil, won't know what "n.d." means. If they see "Lane & Singh p. 3" it is pretty clear. "Lane & Singh (2009) p. 3" is also pretty self explanatory if you see an entry such as "Lane, Keiran & Singh, Karun (2009) ..." in the bibliography. Likewise constructs such as "2009?" or possibly even "c. 2009" work. However,, without consulting the Harvard manual of style, what does "n.d." mean? "Nunc dimittus?", "nearly done" or possibly Singh has the initials N.D. but doesn't like to use them, or alternatively they might be Singh's nickname. If you must use a placeholder then avoid technical jargon: "Lane & Singh (date unknown)" is a clear as a bell. Martin of Sheffield (talk) 22:36, 2 July 2014 (UTC)
- By a curious coincidence I was recently wondering about dropping the year from a standard author-date (but not necessarily Harvard reference!) type of citation. Not for lack of a year, just for not being necessary. It seems to me that inclusion of the year is so standard that anyone with any familiarity with citations would find such a citation odd. Getting back to the case considered here, where no date is available, that does happen. And I wonder if the lack of a year is odd enough that that something (e.g., "n.d.") ought to be supplied in it place. In the print environment this is recommended as a placeholder where a data might be forthcoming. In our environment it could indicate that the absence of the year is not due to inadvertence, or some editor's goofy "style". ~ J. Johnson (JJ) (talk) 18:54, 2 July 2014 (UTC)
- Perhaps; but
- Although it may seem unusual for some readers but it's recommended by Harvard style guide for situations where there is no known date and no approximate date can be estimated. (Maybe it's OK to leave it out, but I hope this discussion won't go so far as prohibiting its usage.) Dalba 05:32, 2 July 2014 (UTC)
- Personally I'd be worried about using "n.d." Remember WP:RF, what would a reader who is interested in the citations but doesn't understand Wiki markup think? Martin of Sheffield (talk) 22:24, 1 July 2014 (UTC)
"Script Error" in Statue of Liberty
Statue of Liberty is very messed up right now, as it has "Script Error" in big red bold all over it, apparently where sfn is used. Is someone looking at this?
Oddly it seems OK in Opera and Firefox, but fails in Chrome "Version 36.0.1985.125 m" on Windows 8. The first instance is on the last words of "Origin":
- which Bartholdi would later bring to the Statue of Liberty.Script error
A quick survey of a few other pages which use sfn shows no problems for me. Opening the article with Chrome in an incognito window gives me the same error, though. johantheghost (talk) 16:51, 10 August 2014 (UTC)
Well, it was happening consistently through restarts etc., but now it's OK... maybe a server glitch? johantheghost (talk) 03:33, 11 August 2014 (UTC)
Source in source
Is there a good way to cite an article in an anthology (book or otherwise), with just a short listing for the book which links to the full entry? This would be like sfn, but would include the author and title of the article. There is now a Template:Source in source to do this. But it is now limited in its capability. Is there a better way to do this, perhaps with sfn? DougHill (talk) 23:53, 22 August 2014 (UTC)
Could someone check my syntax?
I'd tried to implement {{sfn}} at Cakewalk to stop the References section looking too cluttered with replicated citations of the same thing, just with different page numbers, but it threw up errors each time. Could someone please check my code? Thanks! It Is Me Here t / c 19:59, 1 September 2014 (UTC)
- @It Is Me Here: The
{{sfn}}
template cannot be used inside<ref>...</ref>
. Either remove the<ref>
and</ref>
wherever{{sfn}}
is used, or use{{harvnb}}
instead of{{sfn}}
(but still inside<ref>...</ref>
). --Redrose64 (talk) 21:01, 1 September 2014 (UTC)- That is correct. For the diff you have provided, with the callout consisting of just the template, I would suggest removing the ref tags and leaving just sfn as that will result in simpler source. --Mirokado (talk) 22:07, 1 September 2014 (UTC)
- To editor Redrose64: OK, thanks, I've gone for the
{{harvnb}}
option. Now, the internal links Fletcher 1984 and Stearns & Stearns 1994 at Cakewalk#Notes work, but Baldwin 1981 doesn't. Any ideas? It Is Me Here t / c 22:55, 1 September 2014 (UTC){{cite jstor}}
doesn't recognise|ref=harv
, nor does it pass it along the chain. Even if it did, the other links in the chain don't recognise it or pass it along either; so rather than amend each one, it's easier to go right to the end and do this. --Redrose64 (talk) 23:06, 1 September 2014 (UTC)- Is that a bug, or intentional? Would it make sense to start a thread about this at Template talk:Cite jstor? It Is Me Here t / c 12:20, 2 September 2014 (UTC)
- I don't know; jstor is outside my field (the identifiers that I typically use are isbn, lccn and oclc), so I never use
{{cite jstor}}
. --Redrose64 (talk) 14:15, 2 September 2014 (UTC)- Along with some other templates, {{cite jstor}} shouldn't be used for any new sources at present, as it relied on software on the old tool server, now defunct. See its documentation. Peter coxhead (talk) 14:28, 2 September 2014 (UTC)
- I don't know; jstor is outside my field (the identifiers that I typically use are isbn, lccn and oclc), so I never use
- Is that a bug, or intentional? Would it make sense to start a thread about this at Template talk:Cite jstor? It Is Me Here t / c 12:20, 2 September 2014 (UTC)
Broken wrt {cite doi}
Recently, there and edit was made (not here, but I don't know where it was), that breaks {sfn} behaviour wrt {{cite doi}} (possibly because {cite doi} was deprecated recvently). That breaking edit is unacceptable. It is up to the closing process (actors) to cleanup any undesired (newly introduced) usage. That could be a bot in this case. -DePiep (talk) 09:11, 13 October 2014 (UTC)
- @DePiep: The
{{sfn}}
template hasn't been edited in six months, and{{cite doi}}
not in eight months. What is this breakage, and on what pages does it manifest itself? --Redrose64 (talk) 12:17, 13 October 2014 (UTC)- Indeed, I don't know where the edit was made. This question is evolving at Module_talk:Citation/CS1#Where_dos_this_break_come_from.3F (I'm sorry, bad I did multi-forum this). -DePiep (talk) 13:02, 13 October 2014 (UTC)
Postscript
"The postscript is only effective the first time sfn is used for a particular author, year and location." Is this deliberate or is it a bug? I can't see any obvious reason why this would be a good thing, but equally it's presumably quite easy to change with the addition of an extra conditional? Unless I'm missing something there could well be occasions when a two refs would want to refer to the same page, but not quote the same text or make the same point. JimmyGuano (talk) 07:55, 1 January 2015 (UTC)
- In that, probably rare, case consider using |loc= to disambiguate the quotations: {{sfn|Jones|1984|loc= p. 34, para 1|ps= (but he contradicts himself below)}} and {{sfn|Jones|1984|p=34}}.[1][2]
- Martin of Sheffield (talk) 13:51, 1 January 2015 (UTC)
- Thanks - that does look like a viable workaround. I'm still not clear why this situation is the case though? JimmyGuano (talk) 07:26, 3 January 2015 (UTC)
- I think because virtually always editors are content to simply cite pages (indeed getting them to do that can be an issue). {{sfn}} is explicitly aimed to collect citations, and the tuple (author, date, page) is nearly always adequate. Off hand, except for references to multicolumn works (newspapers, physically large encyclopaedias), I can't recall seeing detail finer than that. As an alternative to using |ps= to add a note, you can always use the {{efn}} mechanism. See Hartley Colliery Disaster for an example of footnotes. HTH, Martin of Sheffield (talk) 13:44, 3 January 2015 (UTC)
- @JimmyGuano:When two instances of
{{sfn}}
have identical authors, year,|p=
|pp=
|loc=
they are treated as entirely identical, regardless of any other parameters that may be present. This is because it is only those eight parameters which are used to construct thename=
attribute of a<ref name=...>
tag, and when the MediaWiki software finds two such tags with identical names, it assumes that they are identical in all other respects, and only displays the information pertaining to the first instance. You can get a similar effect with regular<ref>...</ref>
tags:First claim;<ref name=Smith2015p1>Smith (2015), p. 1 "The Government announced that some taxes were to be increased"</ref> Second claim.<ref name=Smith2015p1>Smith (2015), p. 1 "The Government announced that some restrictions would be imposed"</ref>
- gives
- @JimmyGuano:When two instances of
- I think because virtually always editors are content to simply cite pages (indeed getting them to do that can be an issue). {{sfn}} is explicitly aimed to collect citations, and the tuple (author, date, page) is nearly always adequate. Off hand, except for references to multicolumn works (newspapers, physically large encyclopaedias), I can't recall seeing detail finer than that. As an alternative to using |ps= to add a note, you can always use the {{efn}} mechanism. See Hartley Colliery Disaster for an example of footnotes. HTH, Martin of Sheffield (talk) 13:44, 3 January 2015 (UTC)
- Thanks - that does look like a viable workaround. I'm still not clear why this situation is the case though? JimmyGuano (talk) 07:26, 3 January 2015 (UTC)
- Notice how the two refs are merged, with the text of the second being ignored. --Redrose64 (talk) 16:17, 3 January 2015 (UTC)
- Thanks Redrose, very good point about the similar <ref></ref> behaviour. Just to make it absolutely clear, in your example the whole of the text is being ignored, even the repeated citation:
One<ref name=Smith2015p1>Smith (2015), p. 1 "Comment 1"</ref> Two<ref name=Smith2015p1>Text with no relation to Smith</ref> Three<ref name=Smith2015p1/>
The third instance shows the more typical way of doing this, instead of a <ref></ref> pair you can close the tag off internally.- One[1] Two[1] Three[1]
- Notice how the two refs are merged, with the text of the second being ignored. --Redrose64 (talk) 16:17, 3 January 2015 (UTC)
- Personally I prefer the {{sfn}} method. With ref tags you need to invent a name which is unique and which you reuse as appropriate. Too much work for late night sessions, {{sfn}} does all the work for you! Martin of Sheffield (talk) 20:12, 3 January 2015 (UTC)
- In the (rare) cases that I use
{{sfn}}
to cite two different items on the same page, I would use the|loc=
parameter instead of|p=
, as in{{sfn|Smith|2015|loc=p. 1, paragraph 2}}
{{sfn|Smith|2015|loc=p. 1, paragraph 4}}
or for a newspaper{{sfn|Smith|2015|loc=p. 1, col. 2}}
{{sfn|Smith|2015|loc=p. 1, col. 4}}
- these are treated as distinct refs because the|loc=
parameters differ. --Redrose64 (talk) 20:25, 3 January 2015 (UTC)- Thanks both - I understand now. I had assumed that there was a piece of logic that separated out the footnotes where the author, date and page were not the same, and it would therefore be quite straightforward to add "and if ps is different too". Now you've explained how it works I appreciate that it isn't that simple. The workaround you've explained seems the way forward when this is needed. I'm a big fan of sfn in general too - a very elegant footnoting solution. Apologies for the awkward question! JimmyGuano (talk) 20:40, 3 January 2015 (UTC)
- In the (rare) cases that I use
- Personally I prefer the {{sfn}} method. With ref tags you need to invent a name which is unique and which you reuse as appropriate. Too much work for late night sessions, {{sfn}} does all the work for you! Martin of Sheffield (talk) 20:12, 3 January 2015 (UTC)
No author name in citation template
In section No author name in citation template it lists examples of referencing by book title or periodical title rather than author, but there are two issues.
- Book and periodical titles are ordinarily in italics. The examples show italics in the main footnote but not in the short footnote. It should say definitively whether short footnotes should have book and periodical title in italics, and the examples should be consistent with this.
- Some Wikipedia articles may reference multiple articles in the same periodical, some with authors and some without. For consistency, it may be desirable to list all such articles by publication. For example, 1992 European Community Monitor Mission helicopter downing#News reports lists 5 articles in The New York Times, one of which comes from Reuters and does not have a listed author, and the article references all news stories using short footnotes referencing the periodical name even if the author is listed in the long footnote, which I think is stylistically more pleasing than using authors for some news stories. I edited this article to italicize periodical names —Anomalocaris (talk) 21:32, 1 July 2014 (UTC)
- Please see Template talk:Sfn#Title-Date with wiki markup in link above, which discusses work titles in sfn. Clearly the preference is for italics for work titles and I would agree with that. If you are working a lot with sfn etc it would be a good idea to install User:Ucucha/HarvErrors.js. If you do that you will see several red messages reporting problems in the article you mentioned. It is rather difficult to catch these without some automated help. --Mirokado (talk) 01:08, 2 July 2014 (UTC)
- Mirokado: Thank you for your comment. It's nice that there has been some discussion of book or periodical titles in italics on this talk page, but I am talking about the lack of discussion of this topic at Template:Sfn#No_author_name_in_citation_template, where it is needed. —Anomalocaris (talk) 10:20, 4 July 2014 (UTC)
I posted this under {{citation}}, but perhaps the experts here could have a think?
I've recently been working on Tir national and am trying to tie up the citations. One problem that has surfaced is the lack of authors for web sites, particularly those in a foreign (to me) language. In order to get an anchor for short form footnotes, I have simply forced the ref to be the title: ref = CITEREFTir_National for example. In the absence of an author the title displays first and so both the electronic linkage and the human's view agree: ^Tir National looks right.
The problem comes with long names. A title such as: "Ancienne caserne Prince Baudouin, dite également caserne Dailly" can hardly be called SHORT form! Basing the anchor on a subset works electronically but is confusing to the reader. What I'm trying is putting (in this case) "History:" before the citation, then using ref = CITEREFHistory and {{sfn|History}}. I did look at the display options, specifically author-mask, but that only works when there is a real author. Advice/comments please! Martin of Sheffield (talk) 14:32, 22 January 2015 (UTC)
- @Martin of Sheffield:
{{Sfn}}
is for use when different pages or sections in a work are referred to. To use it, you only give the full citation to the work once (either the first time it appears in the article or in a separate Bibliography section) and then use expressions like{{sfn|Smith|2010|p=100}}
,{{sfn|Smith|2010|p=110}}
,{{sfn|Smith|2010|p=220}}
, etc. to refer to different pages in the work. You don't need to do this for web citations as they don't have pages or chapters, so you don't need{{sfn}}
. Just use<ref name=SOMENAME>FULL WEB CITATION</ref>
the first time and then<ref name=SOMENAME/>
thereafter. Peter coxhead (talk) 17:29, 22 January 2015 (UTC)- @Peter coxhead: We seem to have two threads on this; it's also under discussion at Template talk:Citation#Anchors. --Redrose64 (talk) 17:40, 22 January 2015 (UTC)
translate page ranges to ndash
I use sfn as my primary cite markup. Recently I was admonished because I used "minus signs" in page ranges instead of ndash. Is there any reason sfn couldn't translate these for me? Maury Markowitz (talk) 22:12, 18 February 2015 (UTC)
- My guess is that you actually used hyphens ("-"). The minus sign ("−") is different from the en-dash ("–") and em-dash ("—"). Anyway, one reason is that sometimes you want to refer to a single page that has a hyphen in its number. There is no good way of distinguishing those correctly formed but hyphenated pages from mistyped page ranges. —David Eppstein (talk) 00:46, 19 February 2015 (UTC)
- Sure there is, pp vs. p. The alternative requires significant work for basically zero benefit to the end user. Maury Markowitz (talk) 15:55, 19 February 2015 (UTC)
User:Ucucha/HarvErrors
I think it would be helpful to to add to the template documenation that the tool at User:Ucucha/HarvErrors will give an error message when the coding is wrong. Dudley Miles (talk) 18:57, 3 March 2015 (UTC)
- I don't think having a citeref that is never linked to should be classified as an error. That would prevent many/most uses of {{citation}}, for instance, which automatically makes citerefs. But the warning about links that don't go anywhere does look useful. —David Eppstein (talk) 19:23, 3 March 2015 (UTC)
- I agree that it is annoying that the tool gives false error messages when citation is used without harv refs, but it is extremely useful in picking up errors. Dudley Miles (talk) 20:03, 3 March 2015 (UTC)
- I made a copy in my userspace at User:David Eppstein/HarvErrors.js with only the messages about missing link targets, and not about unused link targets. (The other difference is that I write-protected it so that vandals can't inject bad javascript into your Wikipedia page views.) I'm already finding it very useful. —David Eppstein (talk) 00:16, 4 March 2015 (UTC)
- You don't need a customised script. You can do it using the normal script: all you need to do is to add to Special:MyPage/common.css. --Redrose64 (talk) 11:31, 4 March 2015 (UTC)
span.citation strong.error { display: none; }
- Thanks very much Redrose64. Brilliant. Dudley Miles (talk) 12:34, 4 March 2015 (UTC)
- You don't need a customised script. You can do it using the normal script: all you need to do is to add
- I made a copy in my userspace at User:David Eppstein/HarvErrors.js with only the messages about missing link targets, and not about unused link targets. (The other difference is that I write-protected it so that vandals can't inject bad javascript into your Wikipedia page views.) I'm already finding it very useful. —David Eppstein (talk) 00:16, 4 March 2015 (UTC)
- I agree that it is annoying that the tool gives false error messages when citation is used without harv refs, but it is extremely useful in picking up errors. Dudley Miles (talk) 20:03, 3 March 2015 (UTC)
Request TemplateData
Would someone who knows what they're doing be willing to add TemplateData to sfn? I'd try it myself but I don't like experimenting with such a widely used template. As far as I can see there's no TemplateData currently; no parameters descriptions appear in the VE template dialog. Mike Christie (talk - contribs - library) 10:44, 16 April 2015 (UTC)
- The documentation is mostly in
{{Harvard citation documentation}}
which is shared with several others. --Redrose64 (talk) 14:33, 16 April 2015 (UTC)- The reason I asked is that in adding an sfn earlier I saw no template data come up in VE. Would that mean I just have to copy the relevant portions of the Harvard citation documentation over to sfn's TemplateData? Mike Christie (talk - contribs - library) 14:50, 16 April 2015 (UTC)
- What relevant portions would those be? --Redrose64 (talk) 16:49, 16 April 2015 (UTC)
- I'm not familiar with sfn (I'm trying to learn how to use it on an article I'm working on) so I don't know what the most commonly used fields would be. To see what I'm seeing, edit an article in VE, choose Insert -> Template and put "sfn" in the template name field, then click "Add template". The resulting dialog has no fields displayed, so I've no idea what to put in. If you do the same with "cite book" instead of "sfn", you'll see numerous fields pop up for the fields in cite book that are most often entered. That's what I want to have happen with sfn. So I guess the answer to your question is "whatever fields a user of sfn would expect to be defined"; I'm not really sure which they are because I don't know my way around sfn yet. Mike Christie (talk - contribs - library) 17:21, 16 April 2015 (UTC)
- I never bother with "Add template" - to see what parameters are valid, I use the template's own documentation. In brief:
{{sfn}}
recognises eight parameters, but three are mutually exclusive, so a maximum of six may be used simultaneously. Five of the six are positional (unnamed) parameters: the surnames of up to four authors, plus a year. The remaining parameter may be either|p=
|pp=
or|loc=
and these last three correspond directly with the|page=
|pages=
or|at=
parameters in{{cite book}}
. For working examples see NBR 224 and 420 Classes, but you've got the right idea here. Are you experiencing some difficulty with the usage? --Redrose64 (talk) 19:44, 16 April 2015 (UTC)- That edit was basically copied from another one, but I had to do it in the wikitext editor. I'd really like to use the visual editor if I can; I find it more productive, but I don't think it's possible to use a template in the visual editor if there's no templatedata for it. You're right, I can figure it out the old-fashioned way; I was just hoping to use VE. Mike Christie (talk - contribs - library) 19:52, 16 April 2015 (UTC)
- I never bother with "Add template" - to see what parameters are valid, I use the template's own documentation. In brief:
- I'm not familiar with sfn (I'm trying to learn how to use it on an article I'm working on) so I don't know what the most commonly used fields would be. To see what I'm seeing, edit an article in VE, choose Insert -> Template and put "sfn" in the template name field, then click "Add template". The resulting dialog has no fields displayed, so I've no idea what to put in. If you do the same with "cite book" instead of "sfn", you'll see numerous fields pop up for the fields in cite book that are most often entered. That's what I want to have happen with sfn. So I guess the answer to your question is "whatever fields a user of sfn would expect to be defined"; I'm not really sure which they are because I don't know my way around sfn yet. Mike Christie (talk - contribs - library) 17:21, 16 April 2015 (UTC)
- What relevant portions would those be? --Redrose64 (talk) 16:49, 16 April 2015 (UTC)
- The reason I asked is that in adding an sfn earlier I saw no template data come up in VE. Would that mean I just have to copy the relevant portions of the Harvard citation documentation over to sfn's TemplateData? Mike Christie (talk - contribs - library) 14:50, 16 April 2015 (UTC)
Is it the case that parameter 1 is the author name, parameter 2 is the year if no parameter 3 is given, but is another author if there is a parameter 3, and so on up to parameter 5? I understand there are named parameters mentioned in the documentation; I'm just trying to get a clear definition of the interpretation of the unnamed ones so I can create the TemplateData for the basic ones. Mike Christie (talk - contribs - library) 10:04, 17 April 2015 (UTC)
- Yes. The unnamed parameters are between 1 and 4 author last names (which must match the corresponding author last names in the citation to which it links) followed by a year (matching the year of the date in the citation to which it links). So the formats can be
{{sfn|last1|year|...}}, {{sfn|last1|last2|year|...}}, {{sfn|last1|last2|last3|year|...}} or {{sfn|last1|last2|last3|last4|year|...}}
, where ... represents the optional named parameters. Note that there are two other possible named parameters:|ref=
and|ps=
or|postscript=
.{{Sfnp}}
has the same parameters, but puts parentheses round the year on output. Peter coxhead (talk) 10:43, 17 April 2015 (UTC)- Thanks; that's what I thought. I'll see if I can build the TemplateData with that. Mike Christie (talk - contribs - library) 10:48, 17 April 2015 (UTC)
Sfn nested
I'd like to use {{sfn}} within a footnote (e.g., {{refn|Blah blah blah footnote side conversation.{{sfn|Author|2004}} }}
but the sfn doesn't stack with other instances used throughout the article. Instead it dumps the ref in its own automatic section at the bottom of the page. What are my options for handling this? I'd prefer if this footnote's footnote pointed to the "Author 2004" short entry (in reflist) alongside the others. – czar 17:15, 24 May 2015 (UTC)
- Have you tried {{efn|blah}} instead of refn? It does not seem to cause the problem. Dudley Miles (talk) 17:20, 24 May 2015 (UTC)
- I have, and it solves the issue, but I'd prefer to have the footnote appear as a normal ref in the {{reflist}} rather than having to use {{notelist}} as well. I thought {{refn}} is supposed to be specifically for nested refs? It might have something to do with how refn is processed. The example article is Albany Free School. No matter where my refn rests in the article, it won't place the nested sfn in the main reflist. Is there any way to have the same effect as sfn (with the short harv style, direct link, and stacking instances) with just the
<ref>
tags? – czar 17:37, 24 May 2015 (UTC)- There is a related discussion at Template talk:Refn#Refn references getting sent to the bottom of the page?, it's not a problem with either
{{sfn}}
or{{refn}}
. Have a look how I did it at LB&SCR A1X Class W8 Freshwater#Notes. --Redrose64 (talk) 18:15, 24 May 2015 (UTC)- Was just going to post that it is more of a refn than a sfn thing. Will follow up there. – czar 18:20, 24 May 2015 (UTC)
- There is a related discussion at Template talk:Refn#Refn references getting sent to the bottom of the page?, it's not a problem with either
- I have, and it solves the issue, but I'd prefer to have the footnote appear as a normal ref in the {{reflist}} rather than having to use {{notelist}} as well. I thought {{refn}} is supposed to be specifically for nested refs? It might have something to do with how refn is processed. The example article is Albany Free School. No matter where my refn rests in the article, it won't place the nested sfn in the main reflist. Is there any way to have the same effect as sfn (with the short harv style, direct link, and stacking instances) with just the
Shortcuts
Would it be useful to reserve {{s}} and/or {{sf}} as {{sfn}} shortcuts? They would be easy to repurpose (not in high use) and would save us a few keystrokes and screen real estate on a high use template. – czar 18:39, 24 May 2015 (UTC)
Protected edit request on 26 May 2015
We need the code for Be.wiki.org. Where could we see it? Belarus2578 (talk) 10:31, 26 May 2015 (UTC)
Documentation for pp=
The template page doesn't explain or provide examples of the pp parameter. How do you specify a page range? With a dash? ndash? comma? This needs to be documented, and, ideally, one of the examples should use it. — J D (talk) 14:51, 24 July 2015 (UTC)
Group as namespace vs. visual style selector
This is probably the wrong place to ask, but since I'm at a loss as to the correct venue and Sfn was what I was trying to use to solve my problem, and I expect at least some interested editors might be watching here, I'm taking a chance y'all can at least point me in the right direction.
The case is this: I have a navbox that contains encyclopedic content (a family tree), and thus needs to be verifiable. Since the navbox is transcluded onto several articles in mainspace, just stuffing Sfn+Reflist in the template will interfere with references on the page it is transcluded into. My approach to solving this was to try to put the navbox's refs into a separate group. However, the first problem I ran across is that Sfn doesn't appear to support a |group parameter. The second was that there's no apparent way to supress wikilinking the short footnote (the links form the navbox will also conflict with those of the page it's transcluded onto).
So my next attempt was to use {{Efn}}, which does support a |group parameter. However it seems to overload it so that setting it affects both which "namespace" (in CS terms, not Wiki terms) the refs are in and how the reference markers are displayed. And, crucially, for that reason restricts the valid arguments to "lower-alpha", "lower-greek" etc. (the predefined ones). Which means the navbox can't invent its own namespace to reduce the chance of collisions with the pages it's used on.
And finally, I've resorted to just plain <ref group="foo"> (which I, incidentally, would prefer not to for various reasons anyway), but find that this ends up creating footnote markers of the form "foo 1" (or "navboxwsft" in my first attempt). That is, the plain ref tag overloads the |group parameter to mean both which namespace to use and how to display the marker.
In summary: *sigh*
So… What my wishlist contains just now is the following:
- A way to suppress generating the wikilink
- A way to place the ref in a separate (CS) namespace, that has no side effects (not overloaded; does not affect list-style-type or prefix the footnote marker)
- A way to choose a list-style-type that matches {{Reflist}}, i.e. such that Sfn and Reflist can be set to display lower-greek (or whatever)
- A way to tune the footnote marker prefix / display distinct from the namespace, for instance |group=randomstring and |note-prefix=nb. (should be able to combine with list-style-type, e.g. "nb. 1" or "fn. α")
Am I hopelessly confused here? Did I miss anything? And is this the wrong venue for this question? If so, can anyone point me at the right place?
PS. For those who are curious (or just want to point and laugh), the template in question is {{William Shakespeare family tree}} (transcluded on several high-visibility articles, so edit with care!). --Xover (talk) 06:14, 2 September 2015 (UTC)
- I don't really understand why you think you need groups. This is intended to be used as a navbox at the end of an article, after the references section of that article, right? So if you just use <ref>/{{sfn}} and {{reflist}} with no group name, all the previous references should be cleared by the reference section, and you can get your own set of footnote numbers that don't interfere with anything. That is, if you have an article containing