Jump to content

Template talk:SfnRef

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
(Redirected from Template talk:SfnRef/doc)

Harvid vs SfnRef

[edit]

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

{{SfnRef}} was designed to be a companion to {{Sfn}}, thus the name. Not surprisingly, I prefer the SfnRef name, mostly because of the tie-in to Sfn, but also because the "ref" part indicates the cite parameter where SfnRef is used. I included anchorencode because the documentation for users who were constructing |ref= values manually said to do what anchorencode does. If all the templates that accept |ref= encode their arguments, do you know why the docs say to change spaces to underscores? Perhaps the docs are out of date. If so, then anchorencode can be removed. — John Cardinal (talk) 02:18, 14 December 2009 (UTC)[reply]
P.S. Your edit that eliminates white space means that {{SfnRef}} will not do exactly the same thing as {{Sfn}} because {{Sfn}} does not discard leading or trailing whitespace. If we retain the edit to {{SfnRef}}, we should make a similar edit to {{Sfn}}. They should treat the arguments exactly the same in terms of creating the ID. — John Cardinal (talk) 02:27, 14 December 2009 (UTC)[reply]
  • Sorry about the white space change: I clearly didn't understand the issues well enough, so I just now reverted it. Since {{citation/core}} uses anchorencode, {{citation}}, {{cite journal}}, {{cite news}}, etc., all encode their arguments. I suppose there may be other citation templates that don't use anchorencode, but if they do they're busted anyway, and I don't think we should worry about them. The treatment of white space around arguments has long been considered to be a bug in the Harvard citation templates, and I recently proposed a fix for that; see Template talk:Harvard citation #Fragile code mishandles spaces in parameters. If/when this happens I assume that {{sfn}} etc. will remain compatible. I don't much care about whether {{SfnRef}} or {{harvid}} is the "canonical" name so long as one of the names begins with "harv", as I expect that people using the {{harv}} etc. won't want to remember {{SfnRef}}. (I chose "harvid" because it is easier to spell and pronounce than "harvref".)
  • To sum up, I propose moving the contents of {{harvid}} to {{SfnRef}} and making the former redirect to the latter, and merging their documentation; and fixing the harvard citations to use the same idea, as proposed in this fix, discussed in Template talk:Harvard citation #Fragile code mishandles spaces in parameters.
Eubulides (talk) 06:46, 14 December 2009 (UTC)[reply]
I am OK with merging the two, with a redirect from "Harvid". We need to figure out the whitespace issue but that's tactical. — John Cardinal (talk) 11:03, 14 December 2009 (UTC)[reply]
... and I'd be in favor of making {{Sfn}} strip the spaces, too. I can't think of a good reason to retain spaces, and clearly a stray space could confound an editor who can't figure out why their links don't work. — John Cardinal (talk) 13:57, 14 December 2009 (UTC)[reply]
OK, thanks, I did all the above, by copying harvid into SfnRef, fixing Sfn to strip white space, and merging the documentation, and redirecting {{harvid}} to {{SfnRef}} and {{harvid/doc}} to {{SfnRef/doc}}. Please let me know if this leads to problems. Eubulides (talk) 19:27, 14 December 2009 (UTC)[reply]
Looks good to me! I made some minor doc edits. I am glad you decided to change the whitespace handling in {{Sfn}}. — John Cardinal (talk) 23:56, 14 December 2009 (UTC)[reply]

et al.

[edit]

When there are too many authors and you want to specify your own SfnRef with "Author et al. 2000a" or suchlike, the italics make the links break. Any workaround for this ? Shyamal (talk) 16:45, 23 April 2012 (UTC)[reply]

Don't do it that way - use the first four authors. For example, {{sfnref|Adams|Bread|Chuck|Davey|2000a}} creates the anchor for {{sfn|Adams|Bread|Chuck|Davey|2000a|p=123}}. --Redrose64 (talk) 17:15, 23 April 2012 (UTC)[reply]
That includes an et al. automatically but that is not italicised as it stylistically ought to. Shyamal (talk) 02:33, 24 April 2012 (UTC)[reply]
It was decided more than a year ago (see Template talk:Sfn/archive 1#et al. and italics) that "et al." should not be italicised. However, there is an ongoing discussion at Template talk:Sfn#Title-Date with wiki markup in link about custom italicisation. --Redrose64 (talk) 13:35, 24 April 2012 (UTC)[reply]

Add quote field?

[edit]

Maybe it is inappropriate for this type of referencing but has anyone ever discussed a quote field? My issue with using books as references is that someone can say they say anything and if you don't have access to the book there is nothing you can do about it. A quote field, while still potentially made up, can be searched and investigated further to justify it is backing up what is being sourced. Darkwarriorblake (talk) 16:53, 12 October 2013 (UTC)[reply]

Why is it necessary? {{sfnref}} isn't intended for use in places where its output might be visible - it's used to create anchors for links. If I were to put {{SfnRef|Rolling Stone|2004}} (for example) into article text, it would show as CITEREFRolling_Stone2004 which is neither meaningful nor useful. The intended usage is in markup like [[#{{SfnRef|Rolling Stone|2004}}|''Rolling Stone'' (2004)]], p. 123 or {{cite magazine |magazine=Rolling Stone |year=2004 |ref={{SfnRef|Rolling Stone|2004}} }} --Redrose64 (talk) 19:08, 12 October 2013 (UTC)[reply]
Fair enough, is there an alternative on here? Or possibly a way where you hover over the anchor link in prose the box that pops up could reveal the quote? It's not always possible to use a quote as the information may span several pages but I think quotes are useful. For instance I worked on Saturday Night Live, but ebooks are not great when it comes to getting accurate page numbers, at least with the readers I have used. So the page numebrs are now off for the sources used on there, and since it is over a year since I added them, I'm not having to re-read a 400 page book to re-find the info because I don't have original quotes I can search for. In that sense I think it's useful for confirming info as well. Darkwarriorblake (talk) 21:59, 13 October 2013 (UTC)[reply]
It depends upon how you're using {{sfnref}}. If it's like <ref>[[#{{SfnRef|Rolling Stone|2004}}|''Rolling Stone'' (2004)]], p. 123</ref> the only way available is to append the quote after the page number, as in
<ref>[[#{{SfnRef|Rolling Stone|2004}}|''Rolling Stone'' (2004)]], p. 123 "Bowie has heart attack, but is still 23rd best singer of all time"</ref>
if you're using {{cite magazine}} or similar, you can also put the quote after the template, but it's better to use the |quote= parameter:
{{cite magazine |magazine=Rolling Stone |year=2004 |quote=Bowie has heart attack, but is still 23rd best singer of all time |ref={{SfnRef|Rolling Stone|2004}} }}
--Redrose64 (talk) 22:45, 13 October 2013 (UTC)[reply]
Thanks for the info Redrose. Darkwarriorblake (talk) 22:54, 19 October 2013 (UTC)[reply]

Now do I make the anchor (target?) without a cite tag

[edit]

I think cite tags are an abomination, so I don't use them. I also thing SFN is all the world's goodness wrapped in a panda, so I use them. Now how do I make the sfn anchor/target without the cite template? See the bottom of this for an example. Note that clicking on one of the SFNs in the body takes you to the correct cite, but clicking on the cite does not take you to the correct bib. Maury Markowitz (talk) 15:19, 4 January 2015 (UTC)[reply]

@Maury Markowitz: You can use {{wikicite}}. Taking only the first one as an example, presently it is
* Edward Churchill, [https://books.google.ca/books?id=yER8QRuw6FAC&pg=PA30 "Aerial Robots"], ''Flying Magazine'', March 1946
you would amend this to
* {{wikicite |ref={{sfnref|Churchill|1946}} |reference=Edward Churchill, [https://books.google.ca/books?id=yER8QRuw6FAC&pg=PA30 "Aerial Robots"], ''Flying Magazine'', March 1946 }}
The |reference= parameter holds the existing plain text reference, without change. The |ref= parameter (which can be placed last instead of first, if you prefer) holds the {{sfnref}} --Redrose64 (talk) 16:08, 4 January 2015 (UTC)[reply]
Thanks... I'm not sure that helps the syntax much though. Is there a "stand alone" syntax that I can put at the start of the line without having to wrap everything?Maury Markowitz (talk) 16:54, 4 January 2015 (UTC)[reply]
Yes, you can use {{anchor}}, as in
* {{anchor|{{sfnref|Churchill|1946}}}} Edward Churchill, [https://books.google.ca/books?id=yER8QRuw6FAC&pg=PA30 "Aerial Robots"], ''Flying Magazine'', March 1946
but that has the disadvantage that it doesn't enclose the reference text, which means that it's not semantically linked to the ref text, and so the ref text doesn't gain a blue background when you click on a link that takes you to it. To see what I mean about a blue background, go to Template:Wikicite#Examples (but not using Internet Explorer), and click one of the "Atwood (2003)" links. --Redrose64 (talk) 17:22, 4 January 2015 (UTC)[reply]

Accommodate month/season in date parameter for multiple works in same year

[edit]

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

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

Can I just use one parameter?

[edit]

This template and {{sfn}} will allow an editor to create short references like {{sfnref|478 F.3d}}. Is this a feature for weird situations, like case citation, where {{sfnref|Last|YYYY}} makes less sense? Or is this a bug/hack that should be avoided? Thanks, Rjjiii (talk) 03:48, 28 December 2023 (UTC)[reply]

Are all or most of your long-form references organized in some sort of rational numerical order? If so then I see no problem doing as you suggest. In the vast majority of cases, long-form references are not organized that way so inserting an oddball numerical long-form reference into a list of name-date long-form references is probably not a good idea. Remember that readers can/do print hard-copy articles so the correct long-form reference should be easy to find simply by reading the reference list.
Trappist the monk (talk) 04:01, 28 December 2023 (UTC)[reply]
Oh, no, that's Bluebook; I usually get by with just the standard names and dates. The context missing from my first post is that Bluebook's standard full citation looks like this:
  • Universal City Studios, Inc. v. Corley, 273 F.3d 429 (2d Cir. 2001)
And the standard short form citation looks like this:
I wasn't sure if this was supported by the template or a kind of misuse that could not be counted on. Thanks, Rjjiii (talk) 04:10, 28 December 2023 (UTC)[reply]

Proposed updates to documentation

[edit]
  1. Revise the explanation of parameters so that it is more clear that a surname is not required.
  2. Somewhere near the top of the article include either a table or a series of small sections showing common use cases, similar to these explanations of how to create citations with unusual or missing information: [1][2][3][4][5]
  3. Remove or greatly condense the "Deprecated inline use" section. It does not seem very relevant to creating the link anchors.

I'll try to start on this either later this week or sometime next week. Feedback is welcome, Rjjiii (talk) 06:26, 3 April 2024 (UTC)[reply]

Posting example table for feedback:

Missing elements? sfnref anchor markup short citation markup short citation
Author and date are present
  • {{sfnref|Smith|2024}} or
    |last=Smith & |date=2024
  • {{harvnb|Smith|2024}}
Author is publisher
  • {{sfnref|Museum of Modern Art|2024}}
  • {{sfnref|MoMA|2024}}
  • {{harvnb|Museum of Modern Art|2024}}
  • {{harvnb|MoMA|2024}}
Author is anonymous
  • {{sfnref|Anonymous|2024}} or
    |Author=Anonymous.
  • {{harvnb|Anonymous|2024}}
Author is missing
  • {{sfnref|''Title''|2024}}
  • {{sfnref|"Title"|2024}}
  • {{harvnb|''Title''|2024}}
  • {{harvnb|"Title"|2024}}
Authors with the same name
  • {{sfnref|F. Beauregard|2024}}
  • {{sfnref|P. Beauregard |2024}}
  • {{harvnb|F. Beauregard|2024}}
  • {{harvnb|P. Beauregard |2024}}
Date is missing
  • {{sfnref|Smith|n.d.}} or
    |date=n.d.
  • {{sfnref|Smith}} or
    |date=
  • {{harvnb|Smith|n.d.}}
  • {{harvnb|Smith}}
Date and author are missing
  • {{sfnref|[Description]|n.d.}}
  • {{harvnb|[Description]|n.d.}}

Example bibliography

  • Smith (2024). Title. Publisher.
  • Title. Museum of Modern Art. 2024.
  • Title. Museum of Modern Art (MoMA). 2024.
  • Anonymous (2024). Title. Publisher.
  • Title. Publisher. 2024.
  • "Title". Work. Publisher. 2024.
  • Beauregard, Fred (2024). Title. Publisher.
  • Beauregard, Paul (2024). Title. Publisher.
  • Smith (n.d.). Title. Publisher.
  • Smith. Title. Publisher.
  • [Description]. Publisher. n.d.

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

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