Template talk:Sfn/Archive 5
This is an archive of past discussions about Template:Sfn. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 | ← | Archive 3 | Archive 4 | Archive 5 |
New {{resfn}} template
I have just created the {{resfn}}
template for invoking again a reference already defined via {{sfn}}
. Any comments/ideas? --Grufo (talk) 09:25, 20 September 2020 (UTC)
- Isn't that the same as using
{{sfn}}
again? Kanguole 09:32, 20 September 2020 (UTC)- Great, you are right. I don't know why I kept getting errors when using
{{sfn}}
again on the same page, and I always ended up typing the very annoying<ref name="FOOTNOTESmith200626">...</ref>
. I apologize for the waste of template then. --Grufo (talk) 09:40, 20 September 2020 (UTC) - (edit conflict)I've been trying to work out what
{{resfn}}
does, I noticed it and it was new to me. As Kanguole says, it appears to just duplicate using{{sfn}}
a second time. Wherein is the purpose? Martin of Sheffield (talk) 09:42, 20 September 2020 (UTC)- The purpose is that of avoiding the error "The named reference blabla was defined multiple times with different content" (or something similar), which at the moment I am not able to reproduce anymore :/ Any tips from other editors' personal experience? --Grufo (talk) 09:46, 20 September 2020 (UTC)
- Great, you are right. I don't know why I kept getting errors when using
Found it!
Go to the page Marriage in ancient Rome, start editing it, and search for the text <ref name="FOOTNOTEStocquart1907305" />
. Replace it with {{sfn|Stocquart|1907|p=305}}
. You will notice that the following text will appear among the references:
Cite error: The named reference "FOOTNOTEStocquart1907305" was defined multiple times with different content (see the help page).
Now replace instead <ref name="FOOTNOTEStocquart1907305" />
with {{resfn|Stocquart|1907|p=305}}
, and see what happens.
--Grufo (talk) 10:24, 20 September 2020 (UTC)
- See also Old revision of Wikipedia:Sandbox for a more concise example --Grufo (talk) 10:55, 20 September 2020 (UTC)
- OK, now I see what the problem is. When you use the
|ps=
parameter{{sfn}}
spots the additional text. It is not used in the CITEREF string, and so will combine the two references, and then complain. Generally try to remeber that "sfn" stands for "shortened foot note" and avoid verbose inflations. I would suggest using{{sfn}}
in its simple form and adding an extended footnote ({{efn}})if appropriate.[1][a] The{{sfn}}
mechanism will then work as expected.[1]
- OK, now I see what the problem is. When you use the
Notes
- ^ "From matrimonium, we should distinguish; First, concubinatus, a union authorized under Augustus from the leges Julia et Papia, between persons of unequal condition, provided the man had no uxor. The concubina was neither uxor nor pellex, but uxoris loco. The children, issue of such a union, are neither legitimi nor spurii, but naturales. (Cod. 5, 27.) Second, contubernium is the perfectly regular and valid relation between a free man and a slave, or between two slaves. Through the civil law, it produced all the effects arising from the natural law.
References
- ^ a b Stocquart 1907.
- Stocquart, Emile (March 1907). Sherman, Charles Phineas (ed.). "Marriage in Roman law". Yale Law Journal. 16 (5). Translated by Bierkan, Andrew T.: 303–327. doi:10.2307/785389. Retrieved 2020-09-15.
- @Martin of Sheffield: But this is exactly why I created this template. The ps= case is one example, but there might be other cases where
{{sfn}}
defines a named reference multiple times. The{{resfn}}
template grants instead that a reference is never redefined. --Grufo (talk) 11:29, 20 September 2020 (UTC)
- @Martin of Sheffield: But this is exactly why I created this template. The ps= case is one example, but there might be other cases where
- (edit conflict)
- No templates in section headers. I removed the section headers from your above posts.
- Including extraneous text in a short form reference template (
{{sfn}}
,{{harv}}
, and the like) is clearly contrary to the purpose of the templates: to be short. If the text that is included in the|ps=
parameter is important to the article, use it in the article and then cite it. Don't clutter references with non-reference text. Yeah, I know, other editors disagree with this position. - If this
{{resfn}}
template is to be retained, it should probably be implemented by Module:Footnotes. - —Trappist the monk (talk) 11:33, 20 September 2020 (UTC)
- The "short" in "shortened footnote template" refers to the short way of citing a source (only surname and year), given afterwards in full details in the Bibliography. But it does not refer to how long what a source states must be. It is a normal usage in literature to have long quotations in footnotes followed by "Smith 2002" (for example). --Grufo (talk) 11:41, 20 September 2020 (UTC)
- You see,
other editors disagree with this position
. - —Trappist the monk (talk) 14:58, 20 September 2020 (UTC)
- Whatever our disagreement about a quoted text might be, this template is not about the |ps= parameter, this template is about all the possible cases in which
{{sfn}}
might redefine a named reference, and it will always work simply because{{resfn}}
refuses to create new named references, no matter how you invoke it. --Grufo (talk) 15:04, 20 September 2020 (UTC)- Why so defensive? Where have I said anything about how
{{resfn}}
works or what it does? - —Trappist the monk (talk) 15:13, 20 September 2020 (UTC)
- You are right, Trappist. I have been involved in quite many wiki disputes lately and I might have just got used to it. --Grufo (talk) 15:17, 20 September 2020 (UTC)
- Why so defensive? Where have I said anything about how
- Whatever our disagreement about a quoted text might be, this template is not about the |ps= parameter, this template is about all the possible cases in which
- You see,
- The "short" in "shortened footnote template" refers to the short way of citing a source (only surname and year), given afterwards in full details in the Bibliography. But it does not refer to how long what a source states must be. It is a normal usage in literature to have long quotations in footnotes followed by "Smith 2002" (for example). --Grufo (talk) 11:41, 20 September 2020 (UTC)
@Trappist the monk: I don't even know what programming language Module:Footnotes is (is that php? perl?), so I really would not be able to contribute. And even just the current {{resfn}}
template is more like a beta version of a proposal than anything more. But if the idea is good I hope other editors more experts than me in dealing with Wikimedia templates can improve it. --Grufo (talk) 12:15, 20 September 2020 (UTC)
- Lua.
- —Trappist the monk (talk) 14:58, 20 September 2020 (UTC)
- @Trappist the monk: Ok, so, Module:Footnotes has a function, named
strip_url()
, to which{{sfn}}
's parameters|p=
,|pp=
,|page=
,|pages=
and|loc=
are passed for sanitization. Unfortunatelystrip_url()
is not a public function, so my template cannot access it. This means that none of the above parameters is sanitized in my template. This should not be a problem with every-day usage of|p=
,|pp=
,|page=
,|pages=
, but it definitely constitutes a problem with|loc=
, whose support cannot be implemented without accessing the same Lua function (strip_url()
). - I have seen just now that you are the author of Module:Footnotes. What would you think about exporting
strip_url()
as a public function? As until few hours ago I did not even know what Lua looked like, I will just stop here. - --Grufo (talk) 16:21, 20 September 2020 (UTC)
- I was thinking that with a tweak,
sfn()
could render{{resfn}}
by skipping the call tocore()
and settingresult
to an empty string. - —Trappist the monk (talk) 00:24, 21 September 2020 (UTC)
- Yes, from within Module:Footnotes it would be really simple to implement
{{resfn}}
, since it literally consists in producing a void content. --Grufo (talk) 14:02, 21 September 2020 (UTC)
- Yes, from within Module:Footnotes it would be really simple to implement
- I was thinking that with a tweak,
- @Trappist the monk: Ok, so, Module:Footnotes has a function, named
Recently reverted mentions of the new resfn template in other template documentation
I noticed in my watchlist that Redrose64 reverted Grufo's edits mentioning the new {{resfn}} template in other template documentation (see 1, 2, 3). Since this page appears to be where most of the discussion of Grufo's new {{resfn}} template is happening, I thought I would mention the reverts here since the reverts suggest some conflict about the rationale for the new template.
Like Redrose64 (apparently), I am skeptical about the need for the new {{resfn}} template. Why create a new template—why not just document this particular limitation of {{sfn}} in its documentation and explain how to work around it using a named <ref />
tag? It may be too rare of a limitation to justify a new template: Grufo even had trouble reproducing the limitation, as seen above! Biogeographist (talk) 02:27, 21 September 2020 (UTC)
- The text that was reverted did not adequately explain why someone would use {{resfn}}, so it was not helpful. There is more at Template talk:Resfn. As far as I can tell, {{resfn}}'s functionality is supposed to be "act like sfn but use the
|ps=
value from the originally defined sfn template with the same author/year/page combination". But I am a poor mind-reader. The template's author claims, but has not yet demonstrated, that there may be other uses. I created a testcases page to try to help the template's author show how the template might be useful. – Jonesey95 (talk) 04:15, 21 September 2020 (UTC)- The edits that I reverted showed no situation that
{{sfn}}
could not have been used for, no suggestion that any advantage was being provided by using{{resfn}}
instead. What I saw was a misunderstanding of the purpose of{{sfn}}
, it is designed for multiple use, and may be seen used in that way at several recent TfAs, such as Ismail I of Granada, Battle of the Bagradas River (255 BC) or Qibla. --Redrose64 🌹 (talk) 10:24, 21 September 2020 (UTC)
- The edits that I reverted showed no situation that
- Thank you for your intervention, Biogeographist. I think first we need to make clear what we are talking about. If we look at a footnote, we can schematize it as follow:
<ref name=REF_NAME>REF_CONTENT</ref>
. When an editor invokes {{sfn}}, the latter always produces an output forREF_NAME
, but it might produce an output forREF_CONTENT
or not, depending on several considerations. Currently, in the cases where {{sfn}} would emit aREF_CONTENT
despite an editor does not want it, the only solution is to write by hand<ref name=REF_NAME />
(using a very complicateREF_NAME
) – which is a bit bizarre, since there is currently an effort from Wikipedia against having to write by hand the<ref>
tag. - Take the example I gave above from Marriage in ancient Rome. Imagine someone erases from the page
{{sfn|Stocquart|1907|p=305}}
and consequently<ref name="FOOTNOTEStocquart1907305" />
returns an error. For someone not skilled enough in HTML, finding whatFOOTNOTEStocquart1907305
referred to will be a nightmare. While if the {{resfn}} was used instead of<ref name="FOOTNOTEStocquart1907305" />
, it would be as simple as switching back from {{resfn}} to {{sfn}}. - In summary, {{resfn}} is nothing else than a variant of {{sfn}} where
REF_CONTENT
is always void, no matter how {{resfn}} is invoked. - --Grufo (talk) 14:00, 21 September 2020 (UTC)
- Thanks for the explanation—that makes it much clearer for me. If the template is kept, I agree with others that the documentation should be much clearer. What you just wrote above is a good first step. I wasn't aware that
there is currently an effort from Wikipedia against having to write by hand the
. Biogeographist (talk) 14:42, 21 September 2020 (UTC)<ref>
tag- The
<ref>
tag is not deprecated, the effort is just visible from the number of templates produced (and actively used) for footnotes. The relationship between {{resfn}} and {{sfn}} would bit more or less like the one between {{r}} and a generic named note not defined via {{sfn}}. --Grufo (talk) 15:32, 21 September 2020 (UTC)- I'm glad to hear that the humble
<ref>
tag is not passé, since I am more inclined to write<ref name=Smithsays>{{harvtxt|Smith|2020|p=1}} says blah blah blah...</ref>
and<ref name=Smithsays/>
than to try to stuff it all into a {{sfn}} template, though I will happily use {{sfn}} for short citations without the "blah blah blah..." Biogeographist (talk) 17:24, 21 September 2020 (UTC)
- I'm glad to hear that the humble
- The construction in Marriage in ancient Rome is strange, and one that I have never seen in my editing of thousands of articles using {{sfn}}. I'm not sure why someone wouldn't just follow the guidance in this template's documentation and use
{{harvnb|Stocquart|1907|p=305}}
inside ref tags, which is much easier to parse and will not break if the original sfn template is removed. If resfn is a shortcut to that syntax, its documentation should explain that usage. – Jonesey95 (talk) 15:43, 21 September 2020 (UTC)- The {{harvnb}} template is not specific for creating a void
REF_CONTENT
, but its purpose is that of not enclosing a reference within the<ref>...</ref>
tags (so, nearly the opposite). As such, if used for our scenario, it would have the inconvenience of duplicating identical footnotes. It seems to me that using {{harvnb}} for our case is more like an ugly workaround for something that {{resfn}} would do with a better result. --Grufo (talk) 16:01, 21 September 2020 (UTC){{sfn}}
works fine for identical footnotes. The problem arise when you want to make them different, using|ps=
. There's no sensible way to merge them in that case. Kanguole 16:11, 21 September 2020 (UTC)- That of a different
|ps=
is a different case. As the two footnotes would effectively be two different footnotes, if a differentiation is to be implemented this must be done within the {{sfn}} template. This could be done by introducing a|marker=
parameter for example, or by hashing the|ps=
parameter via Lua – but these are just ideas for another discussion with {{sfn}}'s author. But it would not concern {{resfn}}, as the latter deals only with producing a shortened footnote with an emptyREF_CONTENT
.- Kanguole: If two sfn footnotes have different
|ps=
values but the same author/year/page values, they are different footnotes, and they currently generate an error message. The documented{{harvnb|Stocquart|1907|p=305}}
inside ref tags method is the only way to work around the problem today, AFAIK. The new {{resfn}} template reuses the|ps=
value from the first {{sfn}} template (as shown in this test case), so it does not meet the need (yet?) of people who want to use two sfn footnotes with different|ps=
values but that otherwise match. – Jonesey95 (talk) 20:10, 21 September 2020 (UTC) - I'm still not convinced of the need. Here's the relevant portion of Marriage in ancient Rome#Concubinage: There are five instances of
A ''[[concubinatus]]'' (Latin for "concubinage" – see also ''[[wikt:concubina|concubina]]'', "concubine", considered milder than ''[[wikt:paelex|paelex]]'', and ''[[wikt:concubinus|concubinus]]'', "bridegroom") was an institution of quasi-marriage between Roman citizens who for various reasons did not want to enter into a full marriage.{{sfn|Stocquart|1907|p=304}}{{sfn|Treggiari|1981|p=58|ps=, note #42: "Marriage existed if there was ''affectio maritalis'' on the part of both parties. For the difficulty of determining whether a relationship was marriage, see for example [[Cicero|Cic.]] ''[[De Oratore|de Or.]]'' 1.183, [[Quintilian|Quint.]] ''Decl.'' 247 (Ritter 11.15), ''Dig.'' 23.2.24, Mod. 24.1.32.13, [[Ulpian|Ulp.]]; 39.5.31 pr., Pap."}} The institution was often found in unbalanced couples, where one of the members belonged to a higher social class or where one of the two was [[libertus|freed]] and the other one was [[Ingenui|freeborn]].{{sfn|Rawson|1974|p=288|ps=: "Concubinage seems to have been most frequent amongst freed persons."}} However it differed from a ''[[contubernium]]'', where at least one of the partners was a slave (see below).{{sfn|Stocquart|1907|p=305|ps=: "From ''matrimonium'', we should distinguish; First, ''concubinatus'', a union authorized under Augustus from the ''leges [[Lex Julia|Julia]] et [[Lex Papia Poppaea|Papia]]'', between persons of unequal condition, provided the man had no ''uxor''. The ''concubina'' was neither ''uxor'' nor ''pellex'', but ''uxoris loco''. The children, issue of such a union, are neither ''legitimi'' nor ''spurii'', but ''naturales''. (Cod. 5, 27.) Second, ''contubernium'' is the perfectly regular and valid relation between a free man and a slave, or between two slaves. Through the civil law, it produced all the effects arising from the natural law.}}{{sfn|Treggiari|1981|p=53}}
{{sfn}}
here, three of which use|ps=
and they're all rather lengthy. The point about{{sfn}}
is that it produces shortened footnotes, that's why it has the name. If you feel that you need to give such a huge amount of supporting information for a reference, that tells me that one of these things is occurring:- it's not a reliable source so you're attempting to boost its credibility
- you're synthesising your own interpretation of the source text by "showing your working" to show how one leads to the other
- you feel that the source uses some obscure terms which could benefit from explanation
- you need to clarify which portion of the source supports the referenced sentence, but a page number is insufficiently precise, so use a direct quotation
- I really hope it's 3 or 4; for no. 3, have you considered using
{{efn}}
/{{notelist}}
for those explns, or even making them part of the main text? For no. 4, it would be better to use e.g.{{sfn|Smith|2020|loc=p. 123, para. 4}}
which is distinct from{{sfn|Smith|2020|p=123}}
and no error will be thrown if both are used. - I have been back through the archives of this page, and the following are relevant: Template talk:Sfn/Archive 1#Allowing quotes as an attribute; Template talk:Sfn/Archive 1#Option to remove terminal full stop in short form; Template talk:Sfn/Archive 2#Postscript; Wikipedia:Village pump (technical)/Archive 141#Citation error; Template talk:Sfn/Archive 2#Interaction with new cite error detection; this edit; Template talk:Sfn/Archive 2#Muiltiple sfns with a single "ps:" field; and Template talk:Sfn/Archive 3#Problem with "ps". --Redrose64 🌹 (talk) 20:49, 21 September 2020 (UTC)
- @Redrose64: Despite in the case of a long
|ps=
I would definitely opt for {{resfn}}, the template itself is not directly related to the length of a quotation. I have created a comparison of the same short quotation referenced many times, in one case using only {{sfn}} and in the other case using {{sfn}} + {{resfn}}. You can find my comparison here. As you can see, using only {{sfn}} you have to repeat the same quotation many times – and I have chosen a very short sentence for this example. --Grufo (talk) 21:41, 21 September 2020 (UTC)- I've just tried to add an alternative to show that your example is incomplete. However the sandbox is never still and your example has been overwritten many times now. It would be better in future to use your personal sandbox to avoid this issue. I've copied your original to one of my sandboxes here (genuine contributors to this discussion are invited to add to it). I've added another stanza showing how to do it in two different ways using the existing templates. Martin of Sheffield (talk) 08:03, 22 September 2020 (UTC)
- @Redrose64: Despite in the case of a long
- Kanguole: If two sfn footnotes have different
- That of a different
- The {{harvnb}} template is not specific for creating a void
- The
- Thanks for the explanation—that makes it much clearer for me. If the template is kept, I agree with others that the documentation should be much clearer. What you just wrote above is a good first step. I wasn't aware that
That is what I meant with my answer to Jonesey95. Your example (at User:Martin of Sheffield/sandbox3 § Using standard templates) produces a result that is not desirable in my opinion: two different footnotes and the disappearance of the quotation in one. Of course this could be solved by using <ref name="SOMENAME">{{harvnb|...}}</ref>
the first time, and <ref name="SOMENAME" />
all the other times… But then we would just be using our old affectionate <ref>
tag for all our notes. P.S. Thank you for giving us a sandbox under your username. Whether we use that or we use the public Wikipedia:Sandbox for our examples, we should always reference our edits as {{oldid}} or {{oldid2}} as I did before, so that our links are truly permanent. --Grufo (talk) 09:56, 22 September 2020 (UTC)
- (edit conflict) There are only two different references because I forced "eiusmod" to be different to show the alternative. I could have more easily just used the
{{sfn}}
and then reference [3] would not exist. I don't follow "the disappearance of the quotation in one". It is clearly there under footnote [a]. Martin of Sheffield (talk) 10:19, 22 September 2020 (UTC)- The note after “ullamco” does not have a quotation. And if you do insert it in the same way you did for the first line (the note after “sed do”) it will be a very confusing quoting… Imagine you had many sources in the same point… We would see something like [1][a][2][3][b][5] – a nightmare. --Grufo (talk) 10:48, 22 September 2020 (UTC)
FWIW I like this new template. It seems like a much better way of resolving the cite error than what Help:Cite errors/Cite error references duplicate key#Sfn recommends at present. – SD0001 (talk) 07:21, 21 September 2020 (UTC)
- FWIW I agree. --Grufo (talk) 14:21, 21 September 2020 (UTC)
- I am late to this discussion, but to avoid this issue, I would use
|loc=
as the in-source location when the author-year-page are identical. Btw the error used to be generated with various iterations of {{sfn}}, including {{sfnm}} in the same page. So this:{{sfn|Author|2020|p=1}}
in the same page as this:{{sfnm|1a=Author|1y=2020|1p=1|2a=Author2|2y=2019|2p=2}}
would also generate an error. At least until a few years back, it is not the case now. My solution was{{sfn|Author|2020|p=1}}
and in subsequent usage,{{sfn|Author|2020|loc={{p.|1}}}}
. The|loc=
label also works in the rarer case where you have more than two such instances, as long as you format the location differently e.g.{{sfn|Author|2020|loc=p. 1}}
. All these are still hacks of course. 98.0.246.242 (talk) 02:13, 30 December 2020 (UTC)
- I am late to this discussion, but to avoid this issue, I would use
Web citations
I am trying to fix sfn errors in Christopher Codrington. References 9 and 10 are to undated websites so the sfns don't link to the sources. Should they be changed from sfn to cite web style, or is there a better way to resolve this? TSventon (talk) 20:29, 21 January 2021 (UTC)
- You might rewrite them as:
{{sfn|Codrington College|ref=Codrington College}}
{{sfn|The Codrington School|ref=The Codrington School}}
- —Trappist the monk (talk) 20:43, 21 January 2021 (UTC)
- Or use {{sfnref}} inside the
|ref=
parameter of {{cite web}}, like this. I think that is more common. – Jonesey95 (talk) 20:46, 21 January 2021 (UTC)- Thank you Trappist the monk and Jonesey95 I fixed my own sfn error at Association for the Education of Women but Codrington was a bit more complex. TSventon (talk) 22:08, 21 January 2021 (UTC)
- Or use {{sfnref}} inside the
Problem with ps=
- smith (2021), an article by smith
- The location within the text belongs in
|loc=
rather than|ps=
, e.g. X[4], Y[5], Z[4] Kanguole 13:06, 30 January 2021 (UTC)- Thanks. Wtmitchell (talk) (earlier Boracay Bill) 15:36, 30 January 2021 (UTC)
References
- ^ smith 2021, article 123.
- ^ smith 2021, article 456.
- ^ a b smith 2021, article 123. Cite error: The named reference "FOOTNOTEsmith2021" was defined multiple times with different content (see the help page).
- ^ a b smith 2021, article 123.
- ^ smith 2021, article 456.
Translator without author
The sfn template doesn't seem to work if the ref has a translator without an author, which is the case with most of the ancient Hindu texts. What is broken is the clicking of the "Last 2000" link as well as the modal window that appears when you hover your mouse over the link.
<ref>{{cite book |title=Title |translator-last=Last |translator-first=First |year=2000}}</ref> {{sfn|Last|2000|p=2}}
Jroberson108 (talk) 04:15, 7 March 2021 (UTC)
- Use
|ref={{sfnref|Last|2000}}
in the {{cite book}} template to create a match for the {{sfn}} template. See Template:SfnRef#Examples. – Jonesey95 (talk) 05:56, 7 March 2021 (UTC)
Does ref= do anything?
I am finding examples of people setting it to harv. AManWithNoPlan (talk) 15:59, 18 April 2021 (UTC)
- In the citation templates,
|ref=harv
used to set the name of the reference using author surnames and year, but that behaviour is now the default, so|ref=harv
is redundant. I don't think it ever did anything useful in{{sfn}}
. Kanguole 16:44, 18 April 2021 (UTC) - It is possible to set
|ref=harv
in an{{sfn}}
template:{{sfn|Blue|Black|2021|ref=harv}}
- That creates a link to an anchor
#harv
so one could do this (using the above{{sfn}}
[1]:{{anchor|harv}}Some text linked from the {{tld|sfn}}
→ Some text linked from the{{sfn}}
References
- The target 'Some text ...' doesn't highlight blue because it isn't wrapped in a
<span id="CITEREF...">...</span>
tag. |ref=
in{{sfn}}
allows editors to override or customize the target link; useful I suppose when linking to non-cs1|2 targets.- —Trappist the monk (talk) 16:57, 18 April 2021 (UTC)
- There were 568 articles using
|ref=
as of the most recent monthly Template Data report. If|ref=
is set to "harv", it is probably an error. – Jonesey95 (talk) 21:49, 18 April 2021 (UTC)
- There were 568 articles using
- @AManWithNoPlan:, You asked if
|ref=
does anything? Besides the|ref=harv
example you asked about and which has already been answered, it can be used to set the value to be used with{{sfn}}
when no authors (or no year) are available in a citation, or where there are a lot of authors, and you want a shorter sfn. Typically, this is done with the aid of template {{harvid}} because it's much easier that way. See several examples of this at Liberation of France#Works cited, including{{sfn|JOFF}}
for linking to a reference coded as{{cite book ... |ref={{harvid|JOFF}} }}
for the official journal of Free France, which is a governmental bulletin something like the Congressional Record. Mathglot (talk) 18:38, 18 May 2021 (UTC)
Problems dereferencing sfns embedded in remote NoteTagged passages
Hi, in articles with large numbers of citations, I use sfn's and template notetag to remove the inline <ref> clutter in the interests of making it less confusing for new contributors to make additions. However in the case of notetagged material, if it has an sfn within it, I cannot place the note at the end of the article and refer to it by name, or I will get redtext warnings that the sfn referents were not resolved. An example may make this more clear. For example, in the Trumpism article, notetag Jones2012 works just fine because it has no sfns. But notetag|name=Goldberg1 text does not if it is moved to the notes section as with the Jones note. If you try this and preview the result, you will see the error red text I am talking about. I have tried Ref=sfnref to address what I anticipate is a template processing order of dereferencing issue, but to no avail. Putting <ref>'s in the notetag works, but this solution junks up the footnote section with voluminous material that belongs in the bibliography section. Any suggestions? I can live with the inline notetag clutter as you see in the example article but I suspect others may have found a solution to this annoying situation. If there is no immediate answer, please ping me even if your suggested solution occurs to you years from now. Thanks in advance for any suggestions on workarounds which will be reasonably copyable by wiki editors. Even random ideas on what I could experiment with. J JMesserly (talk) 02:33, 18 May 2021 (UTC)
- You might be looking for Wikipedia:Nesting footnotes. – Jonesey95 (talk) 13:57, 18 May 2021 (UTC)
- Thanks for the pointer, but the example I gave with <ref>s inside a notetag is effectively what the Nesting footnotes page describes with refs within a refn. That does work, but is unacceptable for the stated formatting reasons. It does give me an idea on something else this page does not describe but the wikimedia engine might support. Thanks. J JMesserly (talk) 20:44, 18 May 2021 (UTC)
- @J JMesserly: When I ran into something similar to what you are describing, someone helped me tie what I was seeing into a known bug being tracked on Phabricator. I can't remember who it was; maybe Izno or WhatamIdoing? Mathglot (talk) 18:00, 18 May 2021 (UTC)
- @J JMesserly, if you don't want to look at wikitext markup code any more than necessary, then have you considered using the visual editor instead? It works like a word processor. Click on https://en.wikipedia.org/w/index.php?title=Trumpism&veaction=edit to see it in action. It's awesome for tables (insert, delete, and rearrange columns at the click of a button...) and really helpful for copyediting. There's no real need for anyone to be dealing with clutter in the interface. WhatamIdoing (talk) 00:59, 19 May 2021 (UTC)
- I have gotten quite comfortable with wikitext over the past 18 years and was quite annoyed with the visual editor when it came out and haven't taken a more recent look. I guess I assumed wrongly that novice editors would be intimidated by the heavy citation markup of complicated articles like Trumpism. (300+ cites). It's good to know that this is less of a problem than I thought. Do most people use this now? If so, then my motivation for finding a solution to this would be much reduced. 01:46, 19 May 2021 (UTC)
- @J JMesserly, if you don't want to look at wikitext markup code any more than necessary, then have you considered using the visual editor instead? It works like a word processor. Click on https://en.wikipedia.org/w/index.php?title=Trumpism&veaction=edit to see it in action. It's awesome for tables (insert, delete, and rearrange columns at the click of a button...) and really helpful for copyediting. There's no real need for anyone to be dealing with clutter in the interface. WhatamIdoing (talk) 00:59, 19 May 2021 (UTC)
Sfn with author and abbreviation but no year
I'm not 100pc sure whether this is the best place to look. Regardless, I'm working a lot with Sfn for modern works and I'd also like to use them for ancient ones. While the citation of Plutarch, Life of Brutus (for example) can be worked around page numbers using the loc
parameter, the date isn't important at all.
While I can get Sfn to produce serviceable author-year pairs for modern works and also for the translation editions of ancient ones, when you have "Plutarch 1917" and "Plutarch 1918" referring to "Life of Pompey" and "Life of Brutus" respectively, this becomes less useful.
Instead, is it possible to get Sfn to produce footnotes like "Plut. Brut. 3.2" or "Plutarch, Life of Brutus 3.2" where the title of the work (Brut, Life of Brutus) is given a wiki-link? I've already tried something like creating a harvid Plutarch|''Life of Brutus''
but this is interpreted as a separate author (ie "Plutarch & Life of Brutus") rather than something like a title, so I'm stumped. Ifly6 (talk) 04:07, 21 May 2021 (UTC)
- (edit conflict) You could do something with {{sfnref}} like |ref={{sfnref|Plutarch, ''Life of Brutus''}} and then call it with {{harv|Plutarch, ''Life of Brutus''|loc=3.2}} So that'd look like:
- Plutarch, Life of Brutus, 3.2 — short citation linked to....
- Plutarch. Life of Brutus. Translated by Translator. Publisher.
{{cite book}}
:|translator=
has generic name (help) — full citation, with {{sfnref}} in|ref=
- @Ifly6:, Yes, you can, use the
|ref=
parameter, and the {{harvid}} template.[1] Mathglot (talk) 08:44, 21 May 2021 (UTC)
Works cited
- Plutarch (1 December 2015). Plutarch's Lives: Life of Brutus. CreateSpace Independent Publishing Platform. ISBN 978-1-5196-2540-3.
Refs and notes
- ^ Plutarch: Life of Brutus, p. 12345.
- My thanks both to Umimmak and Mathglot for showing me this alternative formulation. Ifly6 (talk) 16:13, 21 May 2021 (UTC)
Sfn usage with multiple sources with no years
Hello, looking at the template page, I don't see an example usage with more than one source from the same author but with no year for both sources, so I'm not sure how I can repeat 2007a and 2007b type usage when doing something like source1: {{sfn|Author|n.d.e}} and source2: {{sfn|Author|n.d.e}}. My specific example is here on this edit - I use n.d.e. and n.d., which feels improper. Does anyone have a suggestion on this? --Engineerchange (talk) 02:03, 29 May 2021 (UTC)
- @Engineerchange: you can use {{harvid}} similar to the example above. Ping me if you need a fuller explanation. Mathglot (talk) 02:24, 29 May 2021 (UTC)
- In this particular case, you are using a distinct "Author" too (ACS1 and ACS2), so there would be no need to distinguish the date parameters. Why "ACS", did you intend "ACM" (Anacostia Community Museum)? Some editors use work titles (or parts of them) in italics when necessary, which is where you would need
{{harvid}}
in the citation : in this case you could use During Slavery and in Maryland as short distinctive names. The date parameter can be omitted with a single "Author" – "n.d.e." is just cluttering up the table here. --Mirokado (talk) 02:34, 29 May 2021 (UTC)- @Mirokado: excellent! worked like a gem, thank you! --Engineerchange (talk) 02:50, 29 May 2021 (UTC)
Throwing an error when a reference is absent?
What needs to happen to change the code for "{{sfn}}
" to check to see if the reference cited is actually available and to provide a user friendly error message when it's not?
User:Tamerlanahayav added {{sfn|Geiger|2012|p=86}} to World War II without adding the reference. When I clicked on "Geiger", it did nothing, because it did not know where to go. That's a deficiency in the article on "World War II", but I would think there should be a way to inform a user when they've added a reference to something that's not there. In this case, {{sfn|Geiger|2012|p=86}} displays with "Geiger 2012" blue and underlined, which suggests that I should be able to click on it and get more information about it. However, in this case, when I click on it, nothing happens.
At minimum, I think it should display as red to make it easier for the user who inserted {{sfn|Geiger|2012|p=86}} to see that something is missing. I think it would be better if it displayed a more informative error message when a user presses "Show preview".
Thanks, DavidMCEddy (talk) 14:42, 19 June 2021 (UTC)
- See Category:Harv and Sfn template errors to learn how to show various errors.
- —Trappist the monk (talk) 14:46, 19 June 2021 (UTC)
- Thanks, but shouldn't the software be REQUIRED to notify a user when they insert a reference like {{sfn|Geiger|2012|p=86}} without a complete citation to "Geiger 2012" someplace else in that Wikipedia article?
- Currently, users get no notice of a need to add a reference to which something like {{sfn|Geiger|2012|p=86}} refers. In other contexts, when someone inserts a broken link, it appears as red. That alerts the user that there's something wrong. This doesn't do that.
- User:Tamerlanahayav may eventually see my complaint above and fix the error introduced by inserting {{sfn|Geiger|2012|p=86}} without the complete citation. I think a user who commits an error like this should be notified immediately , like they are when they introduce other broken links. It shouldn't require someone like me to pester them ;-) DavidMCEddy (talk)
- Were it up to me, I would have Module:Footnotes emit visible error messages. Alas, it is not up to me. The community have decided that because of the issue of false positives, the error messages emitted by Module:Footnotes must be hidden from editors who have not elected to enable error message display.
- —Trappist the monk (talk) 16:37, 19 June 2021 (UTC)
- @DavidMCEddy: Re
when someone inserts a broken link, it appears as red
andI think a user who commits an error like this should be notified immediately , like they are when they introduce other broken links.
- red links are not "broken links", they are also not necessarily errors. See WP:REDDEAL. --Redrose64 🌹 (talk) 08:21, 20 June 2021 (UTC)
- @Redrose64: Thanks for the reference to WP:REDDEAL.
- What do you think should happen when a user inserts something like {{sfn|Geiger|2012|p=86}} into an article for which no reference mating "Geiger|2012" can be found in that article?
- In this case, User:Tamerlanahayav received no notice of a problem at the time. I posted a question here just over two hours later that included {{re|Tamerlanahayav}}, and another user reverted the addition entirely roughly 14 hours later, noting, "unverifiable without full citation, presumably copied from another article without attribution. This is a GA."
- However, if User:Tamerlanahayav does not have a working email properly associated with their account (and they are "Watching" that article), they may never find out there's a problem with what they did unless they manually happen to check that article again. DavidMCEddy (talk) 13:48, 20 June 2021 (UTC)
- While I came down on the side of hiding the warnings by default (and let's remember that the on-switch, and Category:Harv and Sfn no-target errors at 25K+ entries, are there for gnomes' pleasure), I interpreted DavidMCEddy's request to ask for a warning message on preview only. No doubt that's an over-interpretation, and I seriously doubt it's possible for the preview to suppress warning on pre-existing sfn/harv errors, but I can dream. David Brooks (talk) 14:22, 20 June 2021 (UTC)
- There are some cases of spurious errors which only appear in preview mode, so that would be a hindrance for editors who have not chosen to see them. --Mirokado (talk) 14:53, 20 June 2021 (UTC)
- @Editor Mirokado:
There are some cases of spurious errors which only appear in preview mode
Are you talking about{{sfn}}
errors? If you are, can you provide evidence to support that claim? Can you provide examples of where these errors occur? - —Trappist the monk (talk) 15:42, 20 June 2021 (UTC)
- Thanks for encouraging me to investigate further. While doing so I noticed Category:Harv and Sfn template errors#Displaying error messages and updated to your current script User:Trappist the monk/HarvErrors.js. With that new script the problems I was seeing seem to have gone away. Well done. --Mirokado (talk) 22:26, 20 June 2021 (UTC)
- @Editor Mirokado:
- There are some cases of spurious errors which only appear in preview mode, so that would be a hindrance for editors who have not chosen to see them. --Mirokado (talk) 14:53, 20 June 2021 (UTC)
- While I came down on the side of hiding the warnings by default (and let's remember that the on-switch, and Category:Harv and Sfn no-target errors at 25K+ entries, are there for gnomes' pleasure), I interpreted DavidMCEddy's request to ask for a warning message on preview only. No doubt that's an over-interpretation, and I seriously doubt it's possible for the preview to suppress warning on pre-existing sfn/harv errors, but I can dream. David Brooks (talk) 14:22, 20 June 2021 (UTC)
Problems with Sfn
@Tamerlanahayav: {{sfn|Geiger|2012|p=86}} was just added to World War II without adding anything like Geiger (2012) to the World War II#References. As a result, when I clicked on Geiger, I got nothing. I don't have any idea about how to find that reference.
Beyond that, I'm negatively impressed with the use of "{{sfn}}
" because it's very hard for someone not familiar with Wikipedia to understand.
I vastly prefer to enter a reference into Wikidata and then reference it using template:Cite Q. This has the same problem of being hard for someone not familiar with Wikipedia to understand, except that you can click on the QID and it will take you to the Wikidata entry. In this case, clicking on "Geiger 2012" did NOTHING for me except generate mild frustration at not being able to find the said reference.
To illustrate the use of "Cite Q", suppose I want to cite Kahneman's Thinking, Fast and Slow: I start by entering that name into https://www.wikidata.org/. This tells me it's already there with a QID = Q983718. I take that QID to wherever I want to use it and write, {{cite Q|Q983718}}<!-- Kahneman, Thinking, Fast and Slow-->. This displays as Daniel Kahneman (25 October 2011), Thinking, Fast and Slow, New York: Farrar, Straus and Giroux, OCLC 706020998, OL 15992072W, Wikidata Q983718.
I add ...<!-- ... -->, which is a comment, so an editor can see what's actually being cited.
If I don't find the item I want in Wikidata, I can create a Wikidata entry for it. It takes me more time to create a Wikidata entry than to complete a citation template in an article, but that's only true if the item is not already in Wikidata.
AND using WikiCite / Wikidata like this has other advantages:
- If the item is already in Wikidata, it's much quicker to cite it than to complete a standard citation template.
- A Wikidata entry is more robust to link rot, because if the same resource is cited in multiple places, fixing it once fixes it for all uses. That's not true if the template is completed separately for each use.
- Similarly, Wikidata entries that are used multiple places are more likely to be more accurate and more complete and therefore more valuable than individual citation templates, because when I look at a Wikidata entry that's already there, I often find a way to improve it.
- Also, in entering "Author" in Wikidata, I nearly always use a Wikidata entry for that author. Again for an author who is not already in Wikidata, this is more work. However, when there is more than one person with the same name like James Brown (disambiguation), Wikidata makes it relatively easy to be clear about which "James Brown" is being cited in a particular context. By contrast, I don't know how to make such distinctions using the more traditional citation templates.
By the way, Mike Peel and Andy Mabbett have offered to make a presentation at Wikimania 2021, August 13-17, on "Automatically maintained citations with Wikidata and Cite Q". This year's Wikimania will be virtual, which means that anyone interested should be able to attend without travel. I've attended Wikimania three times before and WikiConference North America twice, including the virtual conference late last year. I've found them to be quite valuable. For example, I learned what I know about WikiCite mostly from asking questions at Hackathons at previous Wikimanias. DavidMCEddy (talk) 03:55, 19 June 2021 (UTC)
- This is not really the place to express your opinion of
{{sfn}}
or to discuss perceived benefits or drawbacks of cs1|2 /{{cite q}}
/ Wikidata. This is the correct venue if you have an issue with{{sfn}}
that needs to be addressed. - —Trappist the monk (talk) 10:46, 19 June 2021 (UTC)
- An off-topic ramble, indeed. I love the assertion that sfn is confusing but Cite Q is somehow easier and better. I especially enjoy that the above example of Cite Q has an author name that would not comply with CITEVAR in most articles, along with an ISBN used as an ASIN, which displays a red error message. The former issue has been discussed at length at the Cite Q talk page. The latter, thank goodness, is subject to DavidMCEddy's assertion that Wikidata entries are easy to improve. (BTW, the answer to the implied question in the last bullet is
|author-link=
, which is documented at e.g. Template:Cite_book#Authors). – Jonesey95 (talk) 13:46, 19 June 2021 (UTC) - Yep. A complete waste of byteage. Cite Q indeed, for a litany of errors. ——Serial 13:56, 19 June 2021 (UTC)
- An off-topic ramble, indeed. I love the assertion that sfn is confusing but Cite Q is somehow easier and better. I especially enjoy that the above example of Cite Q has an author name that would not comply with CITEVAR in most articles, along with an ISBN used as an ASIN, which displays a red error message. The former issue has been discussed at length at the Cite Q talk page. The latter, thank goodness, is subject to DavidMCEddy's assertion that Wikidata entries are easy to improve. (BTW, the answer to the implied question in the last bullet is
I just want to address the first thing you brought up at the top. I am strongly opposed to the idea of "automatically" fixing a reference like the one above. The citation is bad, and it should remain bad until an editor is able to check the source (by reading the actual source) and make sure that it actually verifies the text. This citation is missing -- it's a {{citation needed}}. Automatic fixes should not be applied. ---- CharlesGillingham (talk) 22:24, 27 June 2021 (UTC)
Prefatory signals
Is there a way (or would it be possible to add one) to add prefatory signals to this template? For instance, could a parameter be added that would turn a "Smith 1998, p. 1" citation into "see Smith 1998, p. 1" or "but see Smith 1998, p. 1" citations, to signal citations that add general support, or that, while relevant, go against the trend? --Usernameunique (talk) 04:32, 12 August 2021 (UTC)
- Usernameunique, the straightforward way to do this at present is with {{harvnb}}; i.e.
<ref>''however, see'' {{harvnb|Smith|1998|p=1}}</ref>
. Wham2001 (talk) 06:48, 12 August 2021 (UTC)
Request for help from Teahouse
Teahouse volunteer here. Anyone know how to help this person? Wikipedia:Teahouse#Hu Nhu: Formatting Assistance TimTempleton (talk) (cont) 22:15, 11 August 2021 (UTC)
- Hello all, I inquired of the Teahouse about this help. I have just discovered the problem and will address it. Kind regards,Hu Nhu (talk) 23:31, 11 August 2021 (UTC)
- Solved - it was a piping issue. Not a template problem. TimTempleton (talk) (cont) 20:53, 12 August 2021 (UTC)
Adding a URL for the page or location with linked text
I'm looking for an equivalent to |section-url=
in the {{cite}} templates. Using the technique described in Template:Sfn#Adding a URL for the page or location, e.g., {{sfn|loc=[url foo]|p=[url bar]}}
, the citation displays with external link icons linked to the appropriate location. Is there a way to suppress those icons and instead link directly from the location and page number text? Shmuel (Seymour J.) Metz Username:Chatul (talk) 16:48, 9 December 2020 (UTC)
- External links, including those linked by
|chapter-url=
, are shown with an external link icon to indicate to the reader that they are leaving Wikipedia. It's a feature. Do you have an example of a place where that should be suppressed, and an explanation of why that should happen? – Jonesey95 (talk) 17:24, 9 December 2020 (UTC)- Probably not desirable for a consistent appearance, but to answer the question, there is a way to suppress the external link icon using {{plain link}}:
{{sfn|Smith|2020|loc={{plain link|url foo}}|p={{plain link|url bar}}}}
[1]
References
- ^ Smith 2020, p. foo.
Link rot in sfn
I worry that Wikipedia's various "link rot" tools don't consider the links in {{sfn}}, and that many links from {{sfn}} point nowhere. (We currently add links to {{sfn}} by using the workaround of placing a hand-written direct link in the |loc=
or |p=
parameter.)
So my question is: do the current "link rot" bots consider these kind of handwritten links? If not, then could we:
- Add
|url=
,|access-date=
,|archive-date=
and other relevant parameters to {{sfn}} (preferably using the same code that is used by {{citation}} and other "CS1" templates). - Notify the editors who maintain the various "link rot" bots to implement support for {{sfn}} as well.
Anyone up for this work? I'm afraid it's beyond my technical expertise. ---- CharlesGillingham (talk) 23:04, 7 September 2021 (UTC)
- Non-working links from sfn and similar templates to full references are tracked via Category:Harv and Sfn no-target errors and an error message that is currently hidden by default due to some false positives. There is more information about the tracking at the category page. The proposed parameters do not belong in sfn templates; they belong in the full references to which these templates link. – Jonesey95 (talk) 00:53, 8 September 2021 (UTC)
- I'm not talking about the internal links, I'm talking about a reference to external URL, such as:
{{harv|Smith|2011|p=[http://en.wikipedia.org 3]}}
which renders as (Smith 2011, p. 3). There may be several links to different pages of the same book; thus the full citation is not an option for these links. ---- CharlesGillingham (talk) 01:36, 8 September 2021 (UTC)- Oh, I see what you mean. I don't know why link rot scripts and bots would be unable to tag dead links within the
|p=
parameter, like this: (Smith 2011, p. 3[dead link ]) – Jonesey95 (talk) 02:15, 8 September 2021 (UTC)
- Oh, I see what you mean. I don't know why link rot scripts and bots would be unable to tag dead links within the
- I'm not talking about the internal links, I'm talking about a reference to external URL, such as:
- The answer is not to link to specfic pages in eg Google books or archive.org items but trust that if the item as a whole is listed in the general references that a reader can go to the url and locate the specified page from there.GraemeLeggett (talk) 17:16, 14 September 2021 (UTC)
References
- Smith (2011). Title.
Add automatic endash for page number range?
Hi there! In Talk:Antoine Ephrem Cartier/GA1, the reviewer asked for an endash in the |pages=
parameter for the {{sfn}} templates. The CS1 templates automatically display an endash when a hyphen is used. Could that same functionality be added to {{sfn}}?
Examples:
{{cite news|title=Cite news example 1|pages=79{{en dash}}99}}
→ [1]{{cite news|title=Cite news example 2|pages=79-99}}
→ [2]{{sfn|Sfn example 3|pages=79{{en dash}}99}}
→ [3]{{sfn|Sfn example 4|pages=79-99}}
→ [4]
References
- ^ "Cite news example 1". pp. 79–99.
- ^ "Cite news example 2". pp. 79–99.
- ^ Sfn example 3, pp. 79–99.
- ^ Sfn example 4, pp. 79–99.
Thanks! GoingBatty (talk) 22:10, 8 September 2021 (UTC)
- Would that all pagination had the same format. Alas, it doesn't. Were we to do as you suggest there would likely be smiles all around until someone complained about Module:Footnotes improperly converting the hyphen in a hyphenated page number to an endash. So then we have to implement the accept-this-as-written markup. Do we really need this? Do we really need this?
- —Trappist the monk (talk) 23:37, 8 September 2021 (UTC)
- @Trappist the monk: Sure - just as much as we need it in the CS1 templates. To avoid the issue you mentioned, I suggest implementing it in the
|pages=
parameter, not the|page=
parameter. Thanks! GoingBatty (talk) 01:40, 9 September 2021 (UTC)- That does not
avoid the issue
:|pp=2-1-2-3
,|pp=2-31 ''ff.''
. - —Trappist the monk (talk) 11:26, 9 September 2021 (UTC)
- @Trappist the monk: You are correct! In those edge cases, editors can use the same workaround that's being discussed at Help_talk:Citation_Style_1#{{hyphen}}_converted_to_dash. GoingBatty (talk) 12:44, 9 September 2021 (UTC)
- It might be worth noting that this has been added recently to the {{r}}, {{rp}} and {{ran}} citation templates as well, including support for the accept-this-as-written syntax (only for the plural page parameters
|pages=
/|pp=
and|quote-pages=
/|qpp=
(and aliases). See Template_talk:R#Hyphens_to_dashes. --Matthiaspaul (talk) 13:08, 13 September 2021 (UTC)
- It might be worth noting that this has been added recently to the {{r}}, {{rp}} and {{ran}} citation templates as well, including support for the accept-this-as-written syntax (only for the plural page parameters
- @Trappist the monk: You are correct! In those edge cases, editors can use the same workaround that's being discussed at Help_talk:Citation_Style_1#{{hyphen}}_converted_to_dash. GoingBatty (talk) 12:44, 9 September 2021 (UTC)
- That does not
- @Trappist the monk: Sure - just as much as we need it in the CS1 templates. To avoid the issue you mentioned, I suggest implementing it in the
- I can see that I've lost this round. It would probably be best to move
hyphen_to_dash()
from Module:Citation/CS1 to Module:Citation/CS1/Utilities where it can be exported (along withis_set()
andhas_accept_as_written()
). Modules wanting to endashify hyphens then simplyrequire ('Module:Citation/CS1/Utilities')
. That way there is only one copy ofhyphen_to_dash()
to maintain; now there are at least three... - —Trappist the monk (talk) 15:07, 13 September 2021 (UTC)
- Does this add much runtime? Some articles have hundreds of uses of this template. Kanguole 10:03, 14 September 2021 (UTC)
- Adds some, certainly. Enough to worry about? Don't know. The additional code is only executed when
|pp=
or|pages=
is present and has a value. - —Trappist the monk (talk) 12:04, 14 September 2021 (UTC)
{{sfn}}
is most useful with either|p=
or|pp=
, so that would be a very common case. Kanguole 12:23, 14 September 2021 (UTC)- Of course, but as I said the
additional code is only executed when
but is not executed when|pp=
or|pages=
is present and has a value|p=
or|page=
is the insource-location parameter. I blanked my sandbox and wrote a simple{{cite book}}
template to act as a target and then created 1000{{harvnb}}
templates:{{cite book |title=Title |last=Name |date=2021}} *{{harvnb|Name|2021|pp=2-5}} ... + 998 more *{{harvnb|Name|2021|pp=2-5}}
- Previewing that and looking at the Parser profiling data I got:
- Lua time usage 1.462/10.000 seconds
- Lua memory usage 5,277,646/52,428,800 bytes
- then I changed
|pp=
to|p=
, previewed and got:- Lua time usage 1.044/10.000 seconds
- Lua memory usage 5,285,110/52,428,800 bytes
- then I changed back to
|pp=
, previewed and got:- Lua time usage 1.004/10.000 seconds
- Lua memory usage 5,277,646/52,428,800 bytes
- Then I changed
{{harvnb}}
to{{sfn}}
, previewed and got:- Lua time usage 2.351/10.000 seconds
- Lua memory usage 5,463,754/52,428,800 bytes
- Switched to
|p=
, previewed and got- Lua time usage 2.122/10.000 seconds
- Lua memory usage 5,428,951/52,428,800 bytes
- Worst-case in my simple experiment appears to be 400ms so a 400us-per-template penalty.
- —Trappist the monk (talk) 13:07, 14 September 2021 (UTC)
- Which, I think, is neglectible for the achieved improvement of usability, appearance, and consistency across citation templates. Thanks for adding it.
- --Matthiaspaul (talk) 16:20, 14 September 2021 (UTC)
- Of course, but as I said the
- Adds some, certainly. Enough to worry about? Don't know. The additional code is only executed when
- :clover: No competition, we're all just striving for the best-possible solution, so we are all winning.
- Yeah, merging the variants makes a lot of sense to keep things in sync (but the String2 variant already has some minor but important functional changes and an additional parameter for use in the family of r-templates, still, it would be possible to recombine adding a boolean to switch the behaviour).
- --Matthiaspaul (talk) 16:20, 14 September 2021 (UTC)
- Are you taking care of your proposed change in CS1 to move its hyphen2dash() into Module:Citation/CS1/Utilities so that the freshly forked hyphen2dash() function in Module:Footnotes can move back into CS1 after the next round of CS1 updates? Or should I?
- The modified hyphen2dash() function from Module:String2 is so far only used by {{r/ref}} and {{rp}}. I could take care of making the necessary adjustments for a separate entry point (with the necessary extra parameter) for this into Module:Citation/CS1/Utilities once the CS1 function has moved there.
- --Matthiaspaul (talk) 12:23, 16 September 2021 (UTC)
- Moved to Module:Citation/CS1/Utilities/sandbox; removed from Module:Footnotes/sandbox.
{{Harvard citation no brackets/sandbox|Name|2021|pp=2-5}}
- Name 2021, pp. 2–5
{{Harvard citation no brackets/sandbox|Name|2021|pp=((2-5))}}
- Name 2021, pp. 2-5
{{Harvard citation no brackets/sandbox|Name|2021|pp=((2-5)), 2-9}}
- Name 2021, pp. 2-5, 2–9
{{Sfnm/sandbox|Smith|2005|1pp=1-5|Jones|2004|2pp=((2-5))|Name|2021|3pp=((2-5)), 2-9}}
- Moved to Module:Citation/CS1/Utilities/sandbox; removed from Module:Footnotes/sandbox.
- Does this add much runtime? Some articles have hundreds of uses of this template. Kanguole 10:03, 14 September 2021 (UTC)
References
- ^ Smith 2005, pp. 1–5 ; Jones 2004, pp. 2-5 ; Name 2021, pp. 2-5, 2–9 .
Support for "quote" parameter
As we move from the era of print to web-based everything, page numbers are disappearing, and even "loc" becomes somewhat less useful. "quote" is becoming common for other citation systems, and I would argue it is time that sfn supported it as well. Maury Markowitz (talk) 14:16, 24 November 2021 (UTC)
- See the archives of this talk page, where advice is repeatedly given on how to house a quotation or other comment within a reference. I have updated the guidance at Template:Sfn#Adding additional comments or quotes to match that repeated advice. – Jonesey95 (talk) 15:54, 24 November 2021 (UTC)
- The rationale is that the point of {{sfn}} is to produce short citations that are merged when they refer to the same location. Including quotes would make a mess of that. Kanguole 16:36, 24 November 2021 (UTC)
- Ok, but...
- In the first reply, using loc instead of quote does nothing. It's literally the same result, yet less obvious to the editor. Semantic content is valuable. Am I missing something?
- I get the basis for the second point, but that seems like tilting at windmills. Making people use some other tag instead of sfn isn't going to make the refs section any shorter, but it will, generally, make the source text harder to read. Yes, sfn can definitely improve the results in the display version, but it also has value in the source as well.
- Maury Markowitz (talk) 18:25, 29 November 2021 (UTC)
- Ok, but...
p vs. pp detection
It's really easily to mistakenly do something like {{sfn|Sdkb|2021|p=147,148}}
, using |p=
instead of |pp=
. Could we make this template so that it's smarter and automatically detects and corrects or warns about instances like this? {{u|Sdkb}} talk 07:03, 7 December 2021 (UTC)
- The documentation does not spell out exactly how to write the page numbers. It does say that the value for pp should be a comma-separated list. So another correct way to write Sdkb's example would be
{{sfn|Sdkb|2021|p=147, 148}}
. - In the case of the p parameter and a book of over 1000 pages, an editor might write p=1,280 and that would work. Nothing in the documentation forbids it. So distinguishing between two pages in a short work and one page in a long work would be tricky. Tricky behind-the-scenes corrections tend to confuse editors. Jc3s5h (talk) 23:27, 7 December 2021 (UTC)
- Oh, ack, that's a good point about the page numbers (perhaps my example above is referring to page 147,148 in a really long book lol). I guess that makes this infeasible. {{u|Sdkb}} talk 00:18, 8 December 2021 (UTC)
At loc mode
Proposal: sync short refs (including Harvard) with CS1/2 by:
- Renaming
|locn=
to|atn=
. First by aliasing them - Add
|mode=
per CS1 to provide field separator choice
I don't know how many RfCs this may need, but it is an idea. 68.173.76.118 (talk) 15:50, 13 February 2022 (UTC)
Automatically linking page numbers: my sfn dream
I had a dream about sfn. I was hoping someone could tell me how feasible it would be. First, thanks to those who maintain this template—I use it all the time with books, often with many sfn citations to any given volume. This, of course, means that verifying any citation is a multi-click process, first the footnote number to the short footnote to the full citation to the source URL then back to the short footnote (to recall the page number) then back to the source URL to lookup the specific page reference. This could be made a lot shorter by linking the page number in the footnote, which some do, but it is often cumbersome both within the wikitext and to do consistently. The Internet Archive (IA) hosts just about every book I reference (available for checkout in one-hour increments) and is often the best place to link. What if sfn linked to the IA book page number automatically?
Is sfn able to detect the full citation? If so, and it could either see the IA book URL and/or a dedicated IA parameter, then it would be reasonable to automate the linking of any sfn that has a linked IA book id. Eh? czar 06:08, 2 January 2022 (UTC)
- I do not think that IA covers all the material, although it may include all cited material for individual Wiki articles. A more subtle problem maybe related to scanning. I have encountered errors, mis-scans and missing items several times. I don't know what scan-proofing regime the IA employs. It seems they relegate the proofing to the scan sources (often, scan "farms") themselves. This is not be entirely reassuring, as scan proofig becomes an opaque practice, that one basically has to take on faith, unless one has access to the source in alternate media. Personally I would use IA only when I am certain that the scan is a faithful repro. 68.173.76.118 (talk) 15:43, 13 February 2022 (UTC)
- I am referring specifically to IA's library uploads, which with rare exception have been fully accurate in my experience. (What matters is the image of the page, not the quality of the OCR automated transliteration, if that's what you mean.) IA lets users link to a specific page (for example), which is perfect for sfn's purposes. This would only cover books that are in IA's (large) repository, so of course it would not cover all cited material in all articles, just the ones that have already linked to the IA upload in its citation. czar 15:54, 13 February 2022 (UTC)
- I see. I guess the proposal is actionable for such IA sources then. It seems this will require tighter integration (read: added logic) to both CS1 modules and Sfn modules. As for an id, I don't think Wikipedia should be making or synthesizing ad hoc identifiers for other entities' assets. But there is {{Internet Archive}} that could be used in CS1 parameter
|id=
, to begin with. 68.173.76.118 (talk) 16:12, 13 February 2022 (UTC)
- I see. I guess the proposal is actionable for such IA sources then. It seems this will require tighter integration (read: added logic) to both CS1 modules and Sfn modules. As for an id, I don't think Wikipedia should be making or synthesizing ad hoc identifiers for other entities' assets. But there is {{Internet Archive}} that could be used in CS1 parameter
Where to put relative to reflist?
Hi, I'm cleaning up references at oil refinery, and I was just wondering, where do I put the template relative to the {{reflist}} template? Under it? Above it? A new section wholly? My temporary solution (i.e. before I publish it) is to put the book links in a new section titled "Bibliography". Cheers X-750 List of articles that I have screwed over 13:15, 20 August 2022 (UTC)
- Just like any other reference,
{{sfn}}
goes right at the place in the article text that the source supports. - —Trappist the monk (talk) 14:22, 20 August 2022 (UTC)
- Trappist the monk I think it's my fault for not clarifying, but I meant the actual citation itself, i.e. the {{cite book}} thingy. I know where the sfn tag itself goes, just wondering where the citation it links to should be. Apologies for not being clear on that. X-750 List of articles that I have screwed over 22:25, 20 August 2022 (UTC)
- There is a script: User:Trappist the monk/HarvErrors.js. The script has a doc page (such as it is...). The script has a testcases page that illustrates how I think short-form and long-form citations should be placed.
- You might find the script handy if you are doing much with
{{sfn}}
/{{harv}}
et al. - —Trappist the monk (talk) 22:43, 20 August 2022 (UTC)
- Trappist the monk I think it's my fault for not clarifying, but I meant the actual citation itself, i.e. the {{cite book}} thingy. I know where the sfn tag itself goes, just wondering where the citation it links to should be. Apologies for not being clear on that. X-750 List of articles that I have screwed over 22:25, 20 August 2022 (UTC)
- See MOS:REFERENCES and WP:CITESHORT. If you are using short footnotes and separate full citations, they usually go either in two separate sections (e.g. "Notes" and "References") or in two subsections of the "References" section (which could be named e.g. "Notes" and "Works cited"). The section with the full citations should go after the section with the footnotes. —David Eppstein (talk) 23:44, 20 August 2022 (UTC)
Square brackets around year?
A request that I suspect is somewhat complicated, but nevertheless, I ask: with {{sfnp}}
would it be possible to have a version where the parentheses are rendered as square brackets? ie [2022] instead of (2022). The reason being that the High Court of Australia uses square brackets in citations to indicate the year of a decision: eg Dietrich v The Queen [1992] HCA 57. Regards, Goldsztajn (talk) 10:41, 18 October 2022 (UTC)
Names for the references?
Is it possible to add a name for ease of repeating? I just tried out the same template twice in a row and it did properly duplicate the reference number and have a single entry in the reflist, with two backlinks. But would it be possible to name them? Being able to cite multiple times, say, {sfn|foo|2023|p=50|refname=foo-50} and then subsequent calls would just go to {sfn|refname=foo-50} would be easier to work with than having to run {sfn|foo|2023|p=50} five times. --Golbez (talk) 17:33, 13 February 2023 (UTC)
- Take a look at {{harvnb}} (documentation and examples here). If you put it inside a ref tag, you can then repeat the named ref instead of repeating all of the harvnb details. – Jonesey95 (talk) 20:02, 13 February 2023 (UTC)
- @Golbez: One of the principal design features of
{{sfn}}
is that it does not need ref names. Another is that it's self-adjusting if one use is amended, you don't need to worry if the others are all still appropriate. Imagine that{{sfn|foo|2023|p=50}}
is used five times, because five different pieces of content are all verified by the same page. If you remove the first of these five, the ref detail does not need to be moved to one of the others, because it's already there. Now consider the situation that the first of the five pieces is expanded, perhaps by using material from page 51, you alter that one ref to{{sfn|foo|2023|pp=50–51}}
but leave the others alone because they don't use anything from page 51. --Redrose64 🌹 (talk) 11:51, 14 February 2023 (UTC)- Fair. I get it. This is a useful tool, but not for that purpose, and there are others for it. Thanks you two for explaining! :) --Golbez (talk) 15:06, 14 February 2023 (UTC)
Does WP:CITEVAR bar use of sfn in articles without pre arranged consensus?
Hi, I used sfn for some new citations in the Emotion article and my edit had the sfns removed in this edit for the reason that, referencing WP:CITEVAR, that I cannot introduce a new "citation style" without first gaining consensus.
I can see the POV of the editor, which by extension also means that editors cannot even employ cite templates for articles that do not yet employ them. I am a long time wikipedian but am seeking advice on how to avoid the time sink of fielding these sorts of objections in the future. I needed a place in the article to put the refbegin stuff and so I placed it in a separate subsection. I suppose I could have omitted the subsection and simply put the refbegin immediately following reflist in order to be a less visually obvious and thereby avoid this sort of objection. But it is not very tidy.
On the other hand, is the editor correct and sfn should not be introduced to an article without first gaining consensus on its use?
Any thoughts? J JMesserly (talk) 01:03, 6 March 2023 (UTC)
- I haven't looked at Emotion so I don't know what's appropriate for that article. It seems to me that if an article has citations that are well-done and, at some point, were consistent, then the existing style should be maintained. If the article has become much longer and contains many more citations that it used to, it might be time to discuss on the talk page whether it is time to introduce {{sfn}} to better organize the citations. There are other methods, such as {{Rp}}, that compete with sfn. I think it would be particularly inappropriate to introduce sfn in an article that already uses a competing method.
- Finally, if consensus is gained to introduce sfn, the one making the change should commit to reorganizing all the citations, not just introduce it for new citations. Jc3s5h (talk) 01:32, 6 March 2023 (UTC)
- (edit conflict)
- It is interesting to note that Emotion has two instances of
{{sfn}}
templates. The first one was added 20 September 2012 at this edit; its still there:{{sfn|Fox|2008|pp=16–17}}
. That{{sfn}}
was added when there was a mix of templated and non-templated citations. In the interim, the article has become more templated but still contains a fair number of non-templated citations. Consistent in style, it is not. - Right, this is the last that I have to say about this topic. Take the question to WT:CITEVAR.
- —Trappist the monk (talk) 01:53, 6 March 2023 (UTC)
- (edit conflict)
- I think that this is not a proper question for this template talk page. Questions about how WP:CITEVAR applies should be asked at WT:CITEVAR.
- —Trappist the monk (talk) 01:34, 6 March 2023 (UTC)
- Jc3s5h, so to understand you, your view is that for an established article such as this one with voluminous citations (the typical mixture of plain text, hard linked and cite templates within refs, that a discussion is necessary before sfn is first used for a new citation. If that is the prevailing view, I would prefer not to use the template at all. I would rather improve WP articles. J JMesserly (talk) 01:43, 6 March 2023 (UTC)
- @Trappist, thanks for the suggestion to also post there, but this inquiry is proper because I was also soliciting potential technical use assistance as a possible response to the difficulty. I am aware of the sfnref companion template, but potentially I anticipated there might be some other usage or companion template I am not aware of that can be used with sfn which will make it more acceptable to folks with the objection I ran into. J JMesserly (talk) 02:25, 6 March 2023 (UTC)
- There is nothing magic about sfn here. At any article with a well-established consistent style, new citations should be formatted in that style, and changes to that style should be discussed first. If an article's style is inconsistent and no consistent style can be found in its history, making its style consistent is less problematic. —David Eppstein (talk) 02:49, 6 March 2023 (UTC)
- Right David. I guess my comment should be made on WP:CITEVAR talk, but I agree that is the clear intent of the citation guideline. As Trappist pointed out, there was no consistent style, so why should an editor have to justify use of sfn if it has been used in the article for 11 years? As is unfortunately typical in wikipedia, for this article there was the usual opaque mess of plain text and idiosyncratic/ colourful uses of citation templates added in an ad hoc manner. J JMesserly (talk) 03:44, 6 March 2023 (UTC)
- 2 citations out of ~150 is an indication of an error to be corrected, not an inconsistent style. MrOllie (talk) 04:03, 6 March 2023 (UTC)
- Right David. I guess my comment should be made on WP:CITEVAR talk, but I agree that is the clear intent of the citation guideline. As Trappist pointed out, there was no consistent style, so why should an editor have to justify use of sfn if it has been used in the article for 11 years? As is unfortunately typical in wikipedia, for this article there was the usual opaque mess of plain text and idiosyncratic/ colourful uses of citation templates added in an ad hoc manner. J JMesserly (talk) 03:44, 6 March 2023 (UTC)
- There is nothing magic about sfn here. At any article with a well-established consistent style, new citations should be formatted in that style, and changes to that style should be discussed first. If an article's style is inconsistent and no consistent style can be found in its history, making its style consistent is less problematic. —David Eppstein (talk) 02:49, 6 March 2023 (UTC)
- Apparently there is no use of sfn or auxiliary templates which would avoid such objections. If there are ideas on the technical side, please post. Otherwise I agree with Trappist that observations on what the guidance should be for usage of sfn be made on the Citing sources talk discussion on this topic. If you have thoughts on the difficulty of introducing sfn and other useful templates to articles where they are rarely if ever used, please contribute your thoughts. J JMesserly (talk) 05:07, 6 March 2023 (UTC)
Missing title error using sfn for {{cite encyclopedia}}
Sfn does not appear to work with {{cite encyclopedia}}; a Missing or empty title
is shown. In the example below, the title
/entry
value is "Suffragist Movement", and I cannot specify a title
value in {{cite encyclopedia}} since I also need to cite other titles/entries of that encyclopedia using sfn (probably via loc
parameter). I tried doing the following:
{{sfn|Guillermo|2012|page=[https://books.google.com/books?id=wmgX9M_yETIC&pg=PA416 416]|loc="Suffragist Movement"}}
{{Cite encyclopedia |last=Guillermo |first=Artemio R. |url=https://books.google.com/books?id=wmgX9M_yETIC |encyclopedia=Historical Dictionary of the Philippines |date=2012 |publisher=[[The Scarecrow Press]] |isbn=9780810872462}}
- Guillermo, Artemio R. (2012). Historical Dictionary of the Philippines. The Scarecrow Press. ISBN 9780810872462 https://books.google.com/books?id=wmgX9M_yETIC.
{{cite encyclopedia}}
: Missing or empty|title=
(help)
Is there a solution/workaround to suppress that Missing title
error? Sanglahi86 (talk) 20:00, 20 April 2023 (UTC)
- The Missing or empty |title= error is not an
{{sfn}}
error. It is a cs1|2 error indicating that the{{cite encyclopedia}}
template is missing the entry title. If you rewrite{{cite encyclopedia}}
to include the entry:{{Cite encyclopedia |last=Guillermo |first=Artemio R. |entry=Suffragist Movement |url=https://books.google.com/books?id=wmgX9M_yETIC |encyclopedia=Historical Dictionary of the Philippines |date=2012 |publisher=[[The Scarecrow Press]] |isbn=9780810872462}}
- Guillermo, Artemio R. (2012). "Suffragist Movement". Historical Dictionary of the Philippines. The Scarecrow Press. ISBN 9780810872462.
- No Missing or empty |title= error.
- —Trappist the monk (talk) 20:45, 20 April 2023 (UTC)
- Unfortunately, I cannot specifically specify a fixed
entry
/title
value because I was trying to reuse the encyclopedia source by citing other entries of the encyclopedia (which is why I opted to use sfn). If I leave anentry
empty, that error occurs; I was hoping for a workaround, somehow. Sanglahi86 (talk) 20:59, 20 April 2023 (UTC)- Then treat the encyclopedia as a book without specifying the entry:
{{Cite encyclopedia |last=Guillermo |first=Artemio R. |url=https://books.google.com/books?id=wmgX9M_yETIC |title=Historical Dictionary of the Philippines |date=2012 |publisher=[[The Scarecrow Press]] |isbn=9780810872462}}
- Guillermo, Artemio R. (2012). Historical Dictionary of the Philippines. The Scarecrow Press. ISBN 9780810872462.
- —Trappist the monk (talk) 21:39, 20 April 2023 (UTC)
- If you link to the page where you are trying to make this happen, we may be able to help. There are a few workarounds. For example, you can use custom wikitext below the template example shown by Trappist the monk, along with anchors for the sfn template. – Jonesey95 (talk) 21:41, 20 April 2023 (UTC)
- Thanks, that definitely works. I avoided trying that very basic code since I thought entry parameter was an alias of title in cite encyclopedia. Regards. Sanglahi86 (talk) 22:37, 20 April 2023 (UTC)
- Then treat the encyclopedia as a book without specifying the entry:
- Unfortunately, I cannot specifically specify a fixed
Automatically support month and year in SFN links
It is often the case that I quote a series of articles that appear in different months of a magazine or journal. So you might have Smith May 1995 and Smith August 1995. The suggested solution is to "mangle" the date by adding a letter to the end. I would be fine with this if the letter was separate from the date, but changing something like date=May 1995 to date=1995a really makes my skin crawl.
Yes, I know I can override it with a |ref...
... but, is there any reason the template can't do this itself? That is, if the sfn has "more stuff" in the date part than just the year, it picks a more specific cite? For instance, sfn|Smith|May1995|p=6 would attempt to match on links for last=Smith date=May 1995, and if that fails, tries last=Smith date=1995.
Maury Markowitz (talk) 17:13, 2 May 2023 (UTC)
- I'm pretty sure this has been discussed and rejected before, not necessarily on this page. --Redrose64 🌹 (talk) 17:29, 2 May 2023 (UTC)
References
- Sources
- Smith (May 2020). Title A.
- Smith (August 2020). Title B.
- That doesn't look like anything "mangled" to me, and the visual impact and typing impact is minimal. View the wikitext to see how I made this happen. There may be another template, like {{Wikicite}}, that works better for your aesthetic needs. – Jonesey95 (talk) 00:58, 3 May 2023 (UTC)
- @Jonesey95, Redrose64, and Maury Markowitz: I just opened up the same discussion, not being aware of this one. I completely agree that the template should support a month or season, not just a year, for precisely the scenario Maury Markowitz described. It seems to go against the background WP principle to introduce as little original research (maybe not exactly applicable here, but the spirit seems to apply) as possible, and to let the reliable sources do the talking. Plus, I agree that it just doesn't look right. Scholarly bibliographies outside of WP never this, to my knowledge. I say, if there is a natural disambiguator already built into the reference, why not use it instead of a contrived one? Ergo Sum 00:38, 27 May 2023 (UTC)
Scholarly bibliographies outside of WP never this, to my knowledge.
Oh ... never say that somethingnever
happens. See Parenthetical referencing § Author-date 8th bullet point. And just to show that it isn't only en.wiki, this google search.{{sfn}}
is a variant of the{{Harvard citation}}
series of templates so it adheres to the generally accepted multiple-sources-with-the-same-author-and-date scheme.- —Trappist the monk (talk) 01:09, 27 May 2023 (UTC)
- @Ergo Sum: I took a look at John Bapst. I see that you are already using ref= in your citation templates. This creates the CITEREFlastYYYY anchor and it appears to be working. The Module:Footnotes used by {{sfn}}, {{harv}}, and {{harvnb}} has a section of code that checks parameters to see if they are a year
with or without lowercase letter
disambiguation, and it appears that it's written to interpret any unusual date/year names as author names. (Template editors and admins correct me if I'm wrong here.) - For sourcing edge cases you can always make the shortened footnote by hand. For example, the first citation: "
{{Harvnb|''Woodstock Letters''|July 1888|p=218}}
" renders the incorrect visual text: "Woodstock Letters & July 1888, p. 218" You could:- Hand write this with a wikilink, "
[[#CITEREFWoodstock_LettersJuly_1888|''Woodstock Letters'', July 1888]], p. 218
" which renders as, "Woodstock Letters, July 1888, p. 218" - Hand write this without a link: Woodstock Letters, July 1888, p. 218
- Use {{citeref}} where the final parameter is displayed text, "
{{Citeref|style=plain|''Woodstock Letters''|July 1888|''Woodstock Letters'', July 1888}}, p. 218
" which renders as, "Woodstock Letters, July 1888, p. 218" - And finally I experimented with a rigid harv template just meant to be used with {{sfnref}} and {{harvid}} for these kinds of edge cases, but I am hesitant to introduce another shortened footnote template if this is an uncommon issue. If there is a need for it something like, "
{{harvcat|''Woodstock Letters''|July 1888|p=218}}
" could render the same as the above examples.[1]
- Hand write this with a wikilink, "
- @Jonesey95, Redrose64, and Maury Markowitz: I just opened up the same discussion, not being aware of this one. I completely agree that the template should support a month or season, not just a year, for precisely the scenario Maury Markowitz described. It seems to go against the background WP principle to introduce as little original research (maybe not exactly applicable here, but the spirit seems to apply) as possible, and to let the reliable sources do the talking. Plus, I agree that it just doesn't look right. Scholarly bibliographies outside of WP never this, to my knowledge. I say, if there is a natural disambiguator already built into the reference, why not use it instead of a contrived one? Ergo Sum 00:38, 27 May 2023 (UTC)
- Sources
- And the source from the article:
- "Fr. John Bapst: A Sketch". Woodstock Letters. 17 (2): 218–229. July 1888. Archived from the original on May 26, 2023. Retrieved May 26, 2023 – via Jesuit Online Library.
- I hope something in this is helpful. I think the documentation could really benefit from an overview of all the conflicting ways to cite multiple pages. Feel free to ask more questions, Rjjiii (talk) 00:20, 4 June 2023 (UTC)
- And the source from the article:
- While the only place you need to display the a, b is in the short cite, the editor still has to code it in the full cites eg ref={{sfnref|Smith|2020a}} or 'mangle' the date within the full cite template, and the question remains - why not do the formatting automatically, and why not use the specific date if it naturally disambiguates the references? GraemeLeggett (talk) 07:08, 27 May 2023 (UTC)
References
- Sources
- Again, not mangled. --Redrose64 🌹 (talk) 13:33, 27 May 2023 (UTC)
- True, but that method adds the article to Category:CS1 maint: date and year and emits the corresponding maintenance message.
- —Trappist the monk (talk) 13:46, 27 May 2023 (UTC)
- I think that we tend to forget that some people print our articles. Hiding the year disambiguator in the long-form reference can make it difficult for a paper-copy-reader to determine which of the several long-form references is the one specified by a particular short-form reference. Also remember that these short-form templates are used for more than just periodicals. Don't make life harder for those readers solely for the sake of your aesthetic preferences.
- —Trappist the monk (talk) 13:46, 27 May 2023 (UTC)
I still haven't seen an answer to the actual question. Why can't it "just work"? Maury Markowitz (talk) 14:07, 27 May 2023 (UTC)
- Because no one has written the code to make
it "just work"
? This template is used on 140+ wikis so internationalization and date validation become issues.{{sfn}}
is a short-form Harvard style citation template. The de facto standard for disambiguating Harvard references is to add a lowercase alpha suffix to the publication year (the last positional parameter in a{{sfn}}
template).{{sfn}}
complies with that de facto standard. - —Trappist the monk (talk) 15:07, 27 May 2023 (UTC)
Numbers of authors
If more than four authors are given then the template still works, but a hidden error is flagged up. See for example the old version where {{sfn|Ingrey|Duffy|Bates|Shaw|Pope|2023}} generates a reference to "Ingrey et al. 2023." which links to the citation (Ingrey, L; Duffy, S; Bates, M; Shaw, A; Pope, M (2023), "On the Discovery of a Late Acheulean 'Giant' Handaxe from the Maritime Academy, Frindsbury, Kent", Internet Archaeology (61), doi:10.11141/ia.61.6). Not a major problem, and one that is easily fixed (see the edit by wham2001 (this diff), but odd that it should work when the documentation says otherwise. Martin of Sheffield (talk) 09:14, 10 July 2023 (UTC)
- Thanks for the ping Martin. I do wonder whether the current handling of citations with large numbers of authors could be improved. My understanding (albeit some of which is guesswork) of the rationale behind the current setup is:
- Having very long lists of authors in (rendered) shortened footnotes is cumbersome, unnecessary, and inconsistent with most style guides, so the template renders at most three authors and then reverts to "X et al."
- As a result, having more than four authors in the harv/sfn templates' parameters is unnecessary, and so is discouraged because it makes the wikitext cumbersome.
- Since the template has all the necessary information to produce a correctly formatted shortened footnote it has been made to work when there are more than four authors, because not doing so would be a disservice to our readers.
- The module only generates a warning in preview mode because listing more than four authors does not affect the rendering of the page (owing to point 3).
- The result is that, if an editor has not previewed their edit and carefully checked the preview, there is nothing in the saved page to indicate that anything is wrong (other than a hidden category, and who carefully checks the hidden categories after saving each edit? Nobody does.) Then they have to put up with their articles being gnomed to fix "errors" that they didn't know they'd made and which don't affect the article as displayed to the reader in any way. That doesn't seem optimal to me.
- Assuming point #1 in the list above we could fix this problem by changing the behavior in any of points 2 to 4. My view would be:
- #2 should not be changed, since there are many articles with very long author lists, which will lead to ghastly multi-line {{sfn}}s. Moving the number of authors at which the template generates a warning to, say, six will just add confusion.
- #3 should not be changed since replacing a working footnote with an error message would be a disservice to the reader.
- That leaves #4.
- Would it be an improvement to add, say, a warning / error in the rendered reference list for logged-in editors (similar to the "multiple-target error" warning) for shortened footnotes that contain an error which places the article in Category:Pages using sfn with unknown parameters? Such a change would affect very few articles, because that category is usually empty or almost empty, but it might help alleviate the problem that Martin raises.
- Best wishes, Wham2001 (talk) 10:48, 10 July 2023 (UTC)
- I'd strongly concur with that reasoning. IIRC I'd gone to the inline citation, generated the SFN and cut the inline, gone to the Bibliography, added the full citation, previewed, but only looked at the generated reference (annoyingly titled "Citations") and checked that it linked to the actual citation. I probably never scrolled right up to the top (since it was working) and then after publishing it didn't see a problem (since it's hidden). Possibly a bit sloppy, but who doesn't take short-cuts when everything seems to be working! I do stress though, whilst this may annoy gnomes, it doesn't affect the readers and therefore is a very minor issue, not even really a problem. Martin of Sheffield (talk) 11:16, 10 July 2023 (UTC)
- This template invokes two modules: Module:Footnotes which renders the actual short-form reference, and Module:Check for unknown parameters which renders the preview warning (and adds articles to Category:Pages using sfn with unknown parameters). Module:Footnotes
has been made to work when there are more than four authors
. In the normal way of things, when there are five positional parameters in{{sfn}}
, the fifth is expected to be a year. In OP's example, the fifth positional parameter (Pope) is not a year so the module examines the sixth and subsequent positional parameters for an assigned value that looks like a year. If a year is found, the module replaces the fifth positional parameter's value (Pope in the example) with the year (2023 from the sixth positional parameter in the example). - The multiple-target error message is visible to all readers. To see the no-target error message requires logged in users to add a line of text to their personal css. These messages may someday become visible to all readers.
- I see no real benefit from a modification to Module:Footnotes that would duplicate the categorization/error messaging accomplished by Module:Check for unknown parameters.
- —Trappist the monk (talk) 13:34, 10 July 2023 (UTC)
Baffling sfn error
While gnoming for articles in Category:Harv and Sfn no-target errors and Classical music, I came across the article Piano and String Quartet (Feldman) which had an error message "sfn error: no target CITEREFHamilton1993–1994" for citation #30. I was baffled because clicking on that link took me to that source and highlighted it, as expected. So why the message? Below is a simplified version of that citation; it shows that error message but clicking on the reference will highlight the source.
text.[1]
References
- ^ Hamilton 1993–1994, p. 81.
- Hamilton, Andy (December 1993 – January 1994). "Kronos Quartet". The Wire.
Why? How can it be fixed? -- Michael Bednarek (talk) 23:04, 7 August 2023 (UTC)
- That is a limitation in Module:Footnotes/anchor id list. Because it was easiest and because it is sufficient for most uses, that module understands only year–year ranges, circa years, years, and the no-date keywords. Those are sufficient for the module to extract the year portion from a lot of dates but, alas, not from month YYYY – month YYYY dates. I'll think about how to implement year extraction for this type of date.
- You can suppress the error message by adding
|ignore-err=yes
to the{{sfn}}
template. - —Trappist the monk (talk) 23:45, 7 August 2023 (UTC)
- I have applied a fix and so removed the
|ignore-err=yes
. - —Trappist the monk (talk) 18:28, 8 August 2023 (UTC)
Remove trailing '.' ?
{{sfn|...}}
adds a trailing period (example[1]), which is out of place, since the short footnote format does not produce a sentence, nor does the period serve any other apparent purpose. In contrast, {{refn|{{harvnb|...}}}}
does not (example[2]). There are also instances where one does not want a trailing period, depending on a loc=
parameter. Could we remove the trailing period from the {{sfn|...}}
output? Although there will be many affected articles, this change should not have a significant impact.
References
- Sname (1934), Citation of 'sfn'
- Hname (1934), Citation for 'harvnb'
—Quondum 17:24, 28 October 2023 (UTC)
- Years ago there was this discussion that may (or may not) be relevant: Template talk:Sfn/Archive 1 § Option to remove terminal full stop in short form.
- That was in olden days when
{{sfn}}
was a wikitext template. When{{sfn}}
was converted to use Module:Footnotes, the default postscript character was retained. - —Trappist the monk (talk) 18:22, 28 October 2023 (UTC)
- Doing this would create gratuitously inconsistent formatting in many articles that mix manually-formatted footnotes and sfn-formatted footnotes and have carefully adjusted the manual ones to match the style of the sfn-formatted ones. —David Eppstein (talk) 18:26, 28 October 2023 (UTC)
- What David Eppstein said. No citation templates output sentences. Nevertheless, most citation templates end in periods (full stops), so sfn is consistent with those. – Jonesey95 (talk) 19:15, 28 October 2023 (UTC)
- Thank you for the constructive reference, Trappist the monk. I clearly overlooked the relevant part of the template documentation (largely because it is a wall of text), namely that
{{sfn|ps=none|...}}
is supported and achieves the desired result. —Quondum 19:28, 28 October 2023 (UTC)
- Doing this would create gratuitously inconsistent formatting in many articles that mix manually-formatted footnotes and sfn-formatted footnotes and have carefully adjusted the manual ones to match the style of the sfn-formatted ones. —David Eppstein (talk) 18:26, 28 October 2023 (UTC)
Summer 1993
@Trappist the monk: You may be able to help: Summer 1993 as a date, per this Citation style question causes {{sfn}} issues. If 'Summer 1993" is used in the sfn, the references becomes ' Parsons & Summer 1993, p. ZZZ.' - i.e. Summer is taken as an author. If Summer is excluded, the reference does not cause the citation to be highlighted. See the current state of this draft, for instance. Is there a cure? thx. --Tagishsimon (talk) 13:52, 1 November 2023 (UTC)
- It isn't the date that's the problem. Date should be year only. You are using 'Parsons' as the surname in the
{{sfn}}
templates and 'Smith'{{cite journal}}
template:{{harvnb|Parsons|1993|p=207}}
→ Parsons 1993, p. 207 (using{{harvnb}}
here to simplify things){{cite journal|title=Founding the Hollywood Bowl|last=Smith |first=Caroline Parsons |journal=American Music |volume=11 |number=2 |date=Summer 1993|pages=206-242 |publisher=University of Illinois Press |url=https://www.jstor.org/stable/3052555}}
- Smith, Caroline Parsons (Summer 1993). "Founding the Hollywood Bowl". American Music. 11 (2). University of Illinois Press: 206–242.
- If I change the
{{harvnb}}
to use 'Smith', it works:{{harvnb|Smith|1993|p=207}}
→ Smith 1993, p. 207
- —Trappist the monk (talk) 14:04, 1 November 2023 (UTC)
- @Trappist the monk: Thanks. Clearly I'm having a more stupid day than I thought. I'm much obliged to you. --Tagishsimon (talk) 14:16, 1 November 2023 (UTC)
Change to documentation about four authors and more
I find that the Sfn format does not properly work (does not achieve "bi-directional link" functionality), if a work has multiple authors (..like 20) and the top 4 names are not listed completely. Ideally it would be better to correct the code and keep the functionality for just 1 author listed (the first author). If not, and in the meantime, the documentation of this page needs to be changed:
EXAMPLE:
With this Cite using multiple authors:
* {{cite journal |last1=Jeong |first1=Choongwon |last2=Wang |first2=Ke |last3=Wilkin |first3=Shevan |last4=Taylor |first4=William Timothy Treal |last5=Miller |first5=Bryan K. |last6=Bemmann |first6=Jan H. |last7=Stahl |first7=Raphaela |last8=Chiovelli |first8=Chelsea |last9=Knolle |first9=Florian |last10=Ulziibayar |first10=Sodnom |last11=Khatanbaatar |first11=Dorjpurev |last12=Erdenebaatar |first12=Diimaajav |last13=Erdenebat |first13=Ulambayar |last14=Ochir |first14=Ayudai |last15=Ankhsanaa |first15=Ganbold |last16=Vanchigdash |first16=Chuluunkhuu |last17=Ochir |first17=Battuga |last18=Munkhbayar |first18=Chuluunbat |last19=Tumen |first19=Dashzeveg |last20=Kovalev |first20=Alexey |last21=Kradin |first21=Nikolay |last22=Bazarov |first22=Bilikto A. |last23=Miyagashev |first23=Denis A. |last24=Konovalov |first24=Prokopiy B. |last25=Zhambaltarova |first25=Elena |last26=Miller |first26=Alicia Ventresca |last27=Haak |first27=Wolfgang |last28=Schiffels |first28=Stephan |last29=Krause |first29=Johannes |last30=Boivin |first30=Nicole |last31=Erdene |first31=Myagmar |last32=Hendy |first32=Jessica |last33=Warinner |first33=Christina |title=A Dynamic 6,000-Year Genetic History of Eurasia’s Eastern Steppe |journal=Cell |date=12 November 2020 |volume=183 |issue=4 |pages=890–904.e29 |doi=10.1016/j.cell.2020.10.015 |url=https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7664836/ |issn=0092-8674}}
Sfn will not work (not poppup window to the ref, and no active link to the ref) if written with just one author:
{{sfn|Jeong|2020}}
Only this will work (a bit cumbersome!!):
{{sfn|Jeong|Wang|Wilkin|Taylor|2020}}
Therefore I suggest the following changes to the documentation (or better, if possible, change the programming to allow for just one authors, if someone if able to...):
ORIGINAL TEXT:
- Parameters
Author(s) and year
The author and the year of publication are the only required parameters. Up to four authors can be given as parameters."
NEEDS TO BE CHANGED TO:
- Parameters
Author(s) and year
The author and the year of publication are the only required parameters. If the authors are multiple, they have to be listed up to the fourth.
ORIGINAL TEXT:
- Large number of authors
Only the first four authors are required by the template. Listing more is not supported.
NEEDS TO BE CHANGED TO:
- Large number of authors
The first four authors are required by the template. Listing more is not supported. Listing less will disable the "bi-directional link" functionality.
Comments welcome. पाटलिपुत्र (Pataliputra) (talk) 06:04, 17 November 2023 (UTC)
- I tried your example, and it is working to spec, nothing needs to be changed in the template. The documentation is accurate, as far as it goes, but I can see why you were confused. The "Usage" section does say,
- <last2>–<last4> – positional parameters; surnames of next three authors
- but if that isn't clear enough, perhaps something could be added to the Parameters section as well. I made a slight change to the top line under Parameters, which describes the first four authors more clearly as being "required". I don't feel that more extensive changes are needed, but I hope this change resolves any misunderstanding. Mathglot (talk) 08:47, 17 November 2023 (UTC)
- Hi @Mathglot: Do you mean that if you use {{sfn|Jeong|2020}} with my Cite example above, you do get the full ref popup and "bi-directional link" functionality? पाटलिपुत्र (Pataliputra) (talk) 09:23, 17 November 2023 (UTC)
- So dropping the word "Only" from the original text would clarify the point. There's no need to says what happens if people don't use the template as documented. Kanguole 12:33, 17 November 2023 (UTC)
- I have clarified the documentation text in question to make it more explicit. I hope this is helpful to less experienced editors who want to use this useful template family. – Jonesey95 (talk) 18:38, 17 November 2023 (UTC)
- I took another crack at it as well (at the risk of some duplication from the previous edit, but to make it crystal clear—I hope). पाटलिपुत्र, with these changes from Jonesy and me, does it make more sense to you now? Mathglot (talk) 19:30, 17 November 2023 (UTC)
- @Jonesey95 and Mathglot: All very clear now! Thank you very much! पाटलिपुत्र (Pataliputra) (talk) 19:43, 17 November 2023 (UTC)
- So dropping the word "Only" from the original text would clarify the point. There's no need to says what happens if people don't use the template as documented. Kanguole 12:33, 17 November 2023 (UTC)
- Hi @Mathglot: Do you mean that if you use {{sfn|Jeong|2020}} with my Cite example above, you do get the full ref popup and "bi-directional link" functionality? पाटलिपुत्र (Pataliputra) (talk) 09:23, 17 November 2023 (UTC)
Change to documentation about maximum length for "loc="
I find that with Sfn the parameter loc= only works up to 1000 characters. Could we add the following text
("up to 1000 characters maximum") in order to warn users:
ORIGINAL TEXT:
Adding additional comments or quotes
The templates {{harvnb}} or {{harvtxt}} can be used to add quotes or additional comments into the footnote. This effect can also be achieved using {{sfn}} by adding a quote or comment to |loc=.
TO BE CHANGED TO:
Adding additional comments or quotes
The templates {{harvnb}} or {{harvtxt}} can be used to add quotes or additional comments into the footnote. This effect can also be achieved using {{sfn}} by adding a quote or comment to |loc= (up to 1000 characters maximum)
.
Thank you! पाटलिपुत्र (Pataliputra) (talk) 16:43, 18 November 2023 (UTC)
- Why would you want that many? --Redrose64 🌹 (talk) 22:09, 18 November 2023 (UTC)
- @Redrose64:Long quote or quotes, long notes etc... Better to have an explanation on the technical limitations of Sfn in this case, rather than leave users in the dark about why things don't work... We typically go to "documentation" when something doesn't work, so it's quite useful if the actual answers are there... पाटलिपुत्र (Pataliputra) (talk) 08:39, 19 November 2023 (UTC)
- @पाटलिपुत्र:
I'm opposed to this request. The parameterMathglot (talk) 09:21, 19 November 2023 (UTC)|loc=
is absolutely not to be used for quotations, long, or short. It is for something else entirely, which is documented under § Usage. In short, it is a replacement for parameter|p=
or|pp=
when those params are not appropriate; for example, the book cover, unpaged copyright page, or even in tandem with one of the page parameters, where you could use|loc=
to specify a figure or diagram number, as well as a page, or a page plus a footnote number, for example. If the description in the doc about param|loc=
is not clear, let's fix it; but there is no need to make the max length longer; think of it as 'alt-page-number'; would you want a 1000-character long field, to describe the page number location in a book?- I will have to review this situation further. In the past, there was a separate parameter for quotations, namely,
|ps=
, but apparently, according to the Nota bene in the doc, this has been deprecated, and quotations are now supposed to go in param {{loc}}. I unfortunately missed the Rfc that decided on that change, and on the face of it, I think it's a poor outcome, but maybe it was the best of a bunch of poorer alternatives. In any case, I have no answer for you right now, but will have to look further into this. For the time being, I would advise against using param|loc=
for any type of quotation, and instead to borrow {{efn}}, and place your quotation there. There is no limit (that I am aware of) on the length of a quotation you may place in an explanatory footnote. In addition, {{efn}}'s may be placed in the reference section at the end of the article, instead of encumbering some section with a 1000-character quotation in the middle of the section. See WP:LDR for how to do this, or ask here for further details. Mathglot (talk) 09:33, 19 November 2023 (UTC)- @Mathglot:. Indeed the recommendation in this documentation is to use loc= for quotes, and quotes can be longish sometimes, or multiples quote fragments in the same ref can be necessary. In my mind, {{efn}} is not a ref, and is mainly used to expand on a subject in the editor's voice. It seems to me that loc= is fine (although the name is weird, quote= would be wonderful), but the so-far un-documented 1000 characters limit of loc= can be tight and bafling is one is unaware of it. I'm just trying to shift from the basic <ref>{{book=|...}}</ref> format to {{sfn}}, and pointing out a few of the basic issues in doing so... पाटलिपुत्र (Pataliputra) (talk) 10:00, 19 November 2023 (UTC)
- I appreciate your questions; they are very much on point. I just don't have a good answer as of yet. Perhaps someone else will. Mathglot (talk) 10:17, 19 November 2023 (UTC)
- The obvious solution is to use
<ref>{{harvnb|Smith|2023|p=123}}:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</ref>
: [1].- Smith (2023). title.
- -- Michael Bednarek (talk) 10:21, 19 November 2023 (UTC)
- Yes, the suggestion to use
|loc=
for comments or quotes should be withdrawn, and either this form or{{efn}}
suggested instead – putting quotes or comments inside short footnotes stretches them too far beyond their core purpose, which is to provide short references that get merged if referring to the same place. Kanguole 10:27, 19 November 2023 (UTC)- I look at it this way. If you feel that you need to supply a quote (of any lngth) with a ref, that suggests that you need to justify why that ref was used. If you need to provide a long quote, that suggests that the ref is weak and should probably not have been used in the first place. --Redrose64 🌹 (talk) 11:30, 19 November 2023 (UTC)
- Suggests, yes, but sometimes it is justified. I have come across {{efn}} being used for lengthy quotes where the material is controversial in some measure and not easily accessible. The result was edit warring until the quotes established the facts. Martin of Sheffield (talk) 11:41, 19 November 2023 (UTC)
- Agree with Martin. In my case, I find that including a quotation when a source is not immediately available is a courtesy to readers and editors as it enhances short-run verifiability. I regularly do so, for example, when citing a book for which Google books does not offer a snippet that includes the page in question, or when I have access to an online source via a membership where TWL does not. On the flip side, I find including a quotation that anyone can seeby clicking the title in the ref pointless and a waste of space. Mathglot (talk) 19:02, 19 November 2023 (UTC)
- I look at it this way. If you feel that you need to supply a quote (of any lngth) with a ref, that suggests that you need to justify why that ref was used. If you need to provide a long quote, that suggests that the ref is weak and should probably not have been used in the first place. --Redrose64 🌹 (talk) 11:30, 19 November 2023 (UTC)
- Actually, I think loc= is very convenient, and even necessary (having {{sfn}} without a possibility to provide quotes would be quite unhelpful), so I do support the current recommendation in the Documentation to use loc= for quotes, and I think it should be kept (I am only suggesting that the 1000 characters cap should be mentioned somewhere as a de-bugging technicality). Shifting again to another format, and a very cumbersome one at that, such as
<ref>{{harvnb|Smith|2023|p=123}}: "Lorem ipsum dolor sit amet"</ref>
everytime a quote is needed, is not, I'm afraid, an elegant solution, is also not user-friendly, and is quite a mess when editing an article... Also {{efn}} is for notes, not references, so it is not a proper solution either... The current documentation provides a smart solution: it simply is necessary to have a quote option such as loc= within {{sfn}}.पाटलिपुत्र (Pataliputra) (talk) 12:00, 19 November 2023 (UTC)- Elegance is such a subjective matter. You do realize that this massive quote or comment you're adding to
|loc=
is going into the fragment identifier of the URL, right? That's because|loc=
, like{{sfn}}
itself, was designed for a different purpose, and doesn't fit this one. - Michael Bednarek's alternative does what you're asking for, and even gets the punctuation right: colon rather than comma. Kanguole 12:21, 19 November 2023 (UTC)
- Two points in response to "{{efn}} is for notes, not references": First, there is nothing inherently different between ref tags and efn tags—an {{efn}} is just a ref tag with a default group of lower-alpha; that is, efn's by default are enumerated starting with 'a' and refs with '1'. Second, there is no particular reason that a quotation is better suited to a "reference" than an "explanatory note" as a quote is content, which I find well-suited to a note. Turning it around: including the quote (short or long) in the article but excluding the reference that identifies the source would be contrary to Wikipedia policy as it fails WP:Verifiability, so is not an option; however, including the reference and excluding the quote is just fine, the point being: the quote is not reference material, it is supplementary material not required by our guidelines, and thus may be of "explanatory" help. These are not the only two choices, as Michael and others have pointed out, but to the extent that {{efn}} is an optional, explanatory note, including the quotation in the explanatory note and not in the reference makes sense, because the quote does not identify the source, it reproduces content. That said, I find the
|quote=
param handy and I use it myself in a <ref> tag, but as Kanguole said, the meaning of "sfn" is a short footnote, and optional, extended information, wherever it ends up, should surely not be there. Mathglot (talk) 18:36, 19 November 2023 (UTC)
- Elegance is such a subjective matter. You do realize that this massive quote or comment you're adding to
- Yes, the suggestion to use
- The obvious solution is to use
- I appreciate your questions; they are very much on point. I just don't have a good answer as of yet. Perhaps someone else will. Mathglot (talk) 10:17, 19 November 2023 (UTC)
- @Mathglot:. Indeed the recommendation in this documentation is to use loc= for quotes, and quotes can be longish sometimes, or multiples quote fragments in the same ref can be necessary. In my mind, {{efn}} is not a ref, and is mainly used to expand on a subject in the editor's voice. It seems to me that loc= is fine (although the name is weird, quote= would be wonderful), but the so-far un-documented 1000 characters limit of loc= can be tight and bafling is one is unaware of it. I'm just trying to shift from the basic <ref>{{book=|...}}</ref> format to {{sfn}}, and pointing out a few of the basic issues in doing so... पाटलिपुत्र (Pataliputra) (talk) 10:00, 19 November 2023 (UTC)
- I will have to review this situation further. In the past, there was a separate parameter for quotations, namely,
- @पाटलिपुत्र:
- @Redrose64:Long quote or quotes, long notes etc... Better to have an explanation on the technical limitations of Sfn in this case, rather than leave users in the dark about why things don't work... We typically go to "documentation" when something doesn't work, so it's quite useful if the actual answers are there... पाटलिपुत्र (Pataliputra) (talk) 08:39, 19 November 2023 (UTC)
- Using
|loc=
to hold a quotation is semantically incorrect. I agree with others here that{{sfn}}
and the other short-form templates are intended to be short. If the quotation is important to the article, put the quotation in the article and cite it; don't clutter reference sections with quotations. Quotations require citations; citations do not require quotations. - A single
{{sfn}}
template using|loc=
to hold a quotation will include the quotation five times in the article's rendered html. For example this:{{sfn|Name|2023|loc=Lorem ipsum dolor sit amet}}
- is translated by MediaWiki to this in the article body (Lorem ... appears twice):
<sup id="cite_ref-FOOTNOTEName2023Lorem_ipsum_dolor_sit_amet_1-0" class="reference"><a href="#cite_note-FOOTNOTEName2023Lorem_ipsum_dolor_sit_amet-1">[1]</a></sup>
- and is translated by MediaWiki to this in the references section (Lorem ... appears three times):
<li id="cite_note-FOOTNOTEName2023Lorem_ipsum_dolor_sit_amet-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEName2023Lorem_ipsum_dolor_sit_amet_1-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFName2023">Name 2023</a>, Lorem ipsum dolor sit amet.</span></li>
- Don't misuse
|loc=
to do something it is not designed to do. - I believe that the recommendation to use
|loc=
for quotations is wrong and should be removed from the documentation for all short-form templates that use Module:Footnotes. - —Trappist the monk (talk) 20:20, 19 November 2023 (UTC)
- Done. Removed advice in the documentation to use |loc= for quotations. Mathglot (talk) 20:36, 19 November 2023 (UTC)
References
- ^ Smith 2023, p. 123: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Just a note
Using loc= for quotes has been policy for exactly 2 years now [1] (User:Jonesey95). And we are now cancelling this policy after a short 24h discussion? What are content contributors supposed to do? Asking editors to juggle between {{sfn||Smith|2023|p=123}}
and <ref>{{harvnb|Smith|2023|p=123}}: "Lorem ipsum dolor sit amet"</ref>
depending on whether there is a quote or not, is not reasonnable: it's mind-numbing and discouraging even for veterans. On the contrary, the loc= fonctionality in {{sfn}} is clean and easy. If we can't use it, I wish somebody would take on the task of programming a simple, clean, coherent referencing system similar to it... like adding a quote= functionality to {{sfn}} for example. Quotations are a key element of "easy verifiablity", using them should not be such a hassle. पाटलिपुत्र (Pataliputra) (talk) 21:27, 19 November 2023 (UTC)
- Your comments are well taken, and I understand your frustration, but a couple of points: firstly, this is an all-volunteer project, and not everything is in ship-shape order; problems abound, and this is very far from the worst of it. That said, your complaint deserves a response. Secondly, using loc for quotes is by no means policy, it's not even a guideline. It has some level of consensus, if it came out of an Rfc, and that deserves respect, so if you want to revert my doc change, go ahead, but I think it is terrible advice. "Loc" is short for "location"—i.e., part of the verifiability criterion of how to easily find the source location that verifies the assertion made by an editor in the article; that's what it is for; clearly, the Rfc decided to shoehorn quotations into
|loc=
because it solved some other problem that was, apparently, considered more serious. - And as far as "I wish somebody would take on the task of programming a simple, clean, coherent referencing system similar to it", Ouch!! We already have some volunteers who spend a large proportion of their time doing exactly that, for a paycheck of Zero per month; so, once again, "volunteer project". Yes, your issues are real and deserve action, and if you feel this is a deep and serious enough problem, maybe you could volunteer to take it on? Finally, I don't think quotations are "key" in verifiability at all—they represent content and don't verify anything; if quotations are worth keeping in the article, then perhaps they should be part of the article content and double-quoted, as MOS calls for, but surely not placed in a "short" footnote. Mathglot (talk) 21:58, 19 November 2023 (UTC)
- @Mathglot:Adding a quote= functionality to {{sfn}} doesn't have to be complicated, especially since the lines would be identical with those of loc= we have today. I haven't seen the program, but normally duplicating the loc= lines and replacing "loc" with "quote" should be enough, and if we're lucky we can also drop the 1000 characters limit. Then, we can leave the philosophical question of whether quotes are useful of not to content creators. The quoting mechanism would be clean and simple:
{{sfn|Smith|2023|p=123|quote="Lorem ipsum dolor sit amet"}}
So yes, I do volunteer to take it on, if that's any use. पाटलिपुत्र (Pataliputra) (talk) 10:55, 20 November 2023 (UTC)
- This is not about whether quotes can be included in references – Michael Bednarek has shown how that is readily done. It is about whether they belong in this short footnotes template, which is designed for a different purpose. Did you see Trappist's illustration of what this does to the output HTML? Kanguole 11:24, 20 November 2023 (UTC)
- @Mathglot:Adding a quote= functionality to {{sfn}} doesn't have to be complicated, especially since the lines would be identical with those of loc= we have today. I haven't seen the program, but normally duplicating the loc= lines and replacing "loc" with "quote" should be enough, and if we're lucky we can also drop the 1000 characters limit. Then, we can leave the philosophical question of whether quotes are useful of not to content creators. The quoting mechanism would be clean and simple:
- Wait, was there even an Rfc? I checked Archives 1 – 5, and I didn't find one. So, the doc is subject to change, and if there's disagreement, we should just talk it out. Mathglot (talk) 22:11, 19 November 2023 (UTC)
- This is the discussion that led to adding this to the documentation – hardly a solid consensus. I also don't think previously given advice was solidly in favour of what was put in the documentation. Kanguole 22:16, 19 November 2023 (UTC)
- Thanks for that link. In that case, we're perhaps in BRD land. I think Michael Bednarek's solution is viable, uses existing features without requiring volunteer time to alter anything, and does not "shoehorn" anything or twist the intended use of any feature out of shape. In addition, that solution has been in the documentation for at least four years now (third example), and I vote we stick with that. Mathglot (talk) 22:31, 19 November 2023 (UTC)
- This is the discussion that led to adding this to the documentation – hardly a solid consensus. I also don't think previously given advice was solidly in favour of what was put in the documentation. Kanguole 22:16, 19 November 2023 (UTC)
- I fail to see how my approach is "mindnumbing and discouraging" compared to Pataliputra's suggestion to lump a quotation into
|loc=
. Apart from the encapsulating ref tags and the position of some braces, they amount to the same keystrokes. -- Michael Bednarek (talk) 02:01, 20 November 2023 (UTC)- @Michael Bednarek: Your recommendation (if I get it right) is to use a combination of three functionalities (Sfn, Harvnb and <ref></ref>) with the following codes, depending whether we want to attach a quote or not:
- If no quote:
{{sfn|Smith|2023|p=123}}
- If quote:
<ref>{{harvnb|Smith|2023|p=123}}: "Lorem ipsum dolor sit amet"</ref>
- If no quote:
- The policy for the last 2 years [2] has allowed to use a single functionality (Sfn) whether there is a quote or not, and only use the loc= extension if there is a quote:
- If no quote:
{{sfn|Smith|2023|p=123}}
- If quote:
{{sfn|Smith|2023|p=123|loc="Lorem ipsum dolor sit amet"}}
- If no quote:
- I can see a difference, which can be quite huge when you contribute a lot of content, or when you are trying to sort out the source code of a page... पाटलिपुत्र (Pataliputra) (talk) 11:28, 20 November 2023 (UTC)
- I will repeat what I've said before: there is no policy and no guideline that says what you claim. There was not even an Rfc that said that. There was just something written on a template doc page, like you, me, or some random IP could have written. And as far as what was on that doc page for two years, the solution to the issue, as reiterated by Michael, has been on that same page for four years (at least). It is also a bit difficult to provide a technical solution to a problem when we don't have the actual problem in view, so if you can please link the article and section where you are having this issue, the concrete realities of the particular problem would come into focus, enabling other editors here to better help you find a solution that might be workable for you. Mathglot (talk) 05:14, 21 November 2023 (UTC)
- @Michael Bednarek: Your recommendation (if I get it right) is to use a combination of three functionalities (Sfn, Harvnb and <ref></ref>) with the following codes, depending whether we want to attach a quote or not: