Template talk:Reflist

From Wikipedia, the free encyclopedia

Protected Template:Reflist has been protected indefinitely. Use {{editprotected}} on this page to request an edit.

Contents

[edit] multiple columns for long lists and different appearance for zero-length lists

I think we need the script to automatically choose a multiple column style if there are a lot of sources and automatically note the need for references if there are none (but concurrently cap the number of columns at 3 or 4). Something like...

$x = min ( int ( num_of_sources / 20 ) + 1 , 4 );
if ( num_of_sources == 0 ) {
   ''References are needed for this article.''
}
else {
   <div class="references-small" style="-moz-column-count:$x; column-count:$x;">
   <references/>
   </div>
}

Does anyone know how to do this? --Anthony5429 03:29, 24 October 2006 (UTC)

Just to make myself clear...I know we could set it up to take another variable such as a number 1, 2, etc. which determines the number of columns, or we could just make a Template:Reflist2 for a 2-column reference list, reflist3 for 3-column, etc. However, I think an automatic setup would be the best so the editor simply inserts {{reflist}} and the template chooses 1 or 2 columns accordingly. --Anthony5429 04:00, 24 October 2006 (UTC)
Well, it's a lot easier to do the {{reflist|2}} thing, so I went ahead and added that. There isn't a way to count references now, and I don't know if there will ever be. Also, it doesn't just depend on the number of sources, it also depends on how wide they are (100 super-wide sources should still be in one column). --Interiot 23:48, 2 November 2006 (UTC)
Sounds great! Thanks! --Anthony5429 07:10, 3 November 2006 (UTC)
Ahh, it looks like there are ways to have the browser automatically determine the number of columns to render. Here is an example. In that example at least, you have to give it an explicit column width. I almost always browse at 1920 pixels wide, so I like this a lot. A {{{colwidth}}} parameter could be added to make this work for reflist, if there's enough support for it. --Interiot 08:00, 3 November 2006 (UTC)
Ohh - that is sweet. I resized the FF 2.0 window while looking at your reference list, and the column # dropped perfectly. And using CTRL++ and CTRL+- to change the text size, the column # also functions perfectly. CSS3 rules - I am all for this. Do we need to start having people vote on the change or just make the change and see if anyone disagrees? --Anthony5429 16:02, 3 November 2006 (UTC)
If we are going to go through w/ the change, we would want to do it ASAP so that we don't have to keep backwards support for {{reflist|2}}. If we wait too long, we'll get a bunch of articles that use {{reflist|2}} and then we'll feel it necessary to keep support for the column # variable, thereby violating the KISS principle. If no one disagrees on this talk page in the next hour, I am going to go ahead switch the code to use Interiot's feature. --Anthony5429 16:40, 3 November 2006 (UTC)
I don't think there's any problem with keeping {{reflist|2}}... we have many many pages that use fixed-two-columns even without reflist, it's the tried and true way, and I imagine editors will continue to want that. We can make auto columns coexist with fixed columns by making the auto-column syntax be something like {{reflist|colwidth=30em}}. --Interiot 17:09, 3 November 2006 (UTC)
Okay - I will go ahead and make the change, but keep the compatibility for {{reflist|2}}. --Anthony5429 17:14, 3 November 2006 (UTC)
Alright - job's done and it seems to work fine! --Anthony5429 17:27, 3 November 2006 (UTC)
For what it's worth, my vote is to make the default just be single-column, not auto-column. Most uses of references "in the wild" seem to be 1 column (though maybe this is because it's the historical default and not everyone has firefox). Also, auto-columns isn't well-tested and may be slightly buggy (is it just me, or if you click on a reference link, and before releasing the mouse button, all the numbers at the end of the list seem to change....) (also, the long URL in #4 at Britney Spears#References renders a little badly at certain browser widths). See User:Interiot/reflist and User talk:Interiot/reflist for the way I was thinking of. Also, it sort of assumes that all references are going to be 30em wide, which may not always be appropriate, eg. Britney Spears, so at the very least it should be possible to specify a width. --Interiot 17:39, 3 November 2006 (UTC)
I see most of what you're saying. You can go ahead and make the change to what you're suggesting (I don't think I know the code for your suggestion). However, a couple notes: 1. I don't get the bug you have with the changing numbers - are you using google toolbar? 2. In the event that css changes to wrap long strings, I think we should consider making the auto-column-width the default. --Anthony5429 19:27, 3 November 2006 (UTC)
Okay, I made the change. I think each individual page should probably have stylistic control over whether multiple columns are used or not. For instance, the auto-35em columns didn't look very good on a 1920px browser on crankcase, not because of column width, but because the 7 total references ended up creating a grid 5 wide and 2 high, which IMHO looks weird.
I might be open to defaulting to ~32em but allowing it to be overidden to something else, as long as it's at least tested more. Going from a feature that isn't used anywhere to being the default behavior is moving a bit too fast.
(about the buggy behavior... I'm not using Google toolbar. As far as I know, I'm using an almost-stock v2.0 Firefox. Though it tends to only happen with 4 or 5 columns, so maybe it needs a wider screen to be seen) --Interiot 20:02, 3 November 2006 (UTC)
All sounds good. I think it is fine the way it is now. --Anthony5429 23:03, 3 November 2006 (UTC)

[edit] Benefits

Hi, Anthony! Apart from the (currently unavailable) column-splitting feature, and, of course, saving a few keystrokes, what are other benefits of using this template? Any reason why it should not be substituted? Just curious. Thanks.—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 13:41, 25 October 2006 (UTC)

No other reasons - those are the two reasons I had in mind. I personally think it's a lot easier to type and a lot more eye-friendly to see:
== References ==

{{reflist}}
than:
== References ==

<div class="references-small">
<references/>
</div><noinclude>
or:
== References ==

<div class="references-small" style="-moz-column-count:2; column-count:2;">
<references/>
</div><noinclude>
And of course, if we make the reference section easy to put in, it encourages the users who do not typically cite their sources. --Anthony5429 15:12, 25 October 2006 (UTC)
Sounds fair. You've got a convert.—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 16:24, 25 October 2006 (UTC)
You've got more than a single convert; today marked the point where {{reflist}} was used on more than 1000 pages. While {{reflist}} isn't significantly less complex when used with its default parameters, the various {{cite …}}/<ref>/<references> tags are on the whole too complex, and any little thing that can be done to help simplify them seems to be welcomed. --Interiot 19:42, 5 December 2006 (UTC)
I agree. The reflist template is far easier :). RashBold (talk contribs)

[edit] Section editing screwed up

I noticed that this includes a section edit link in articles, but this edit link misleadingly leads to the template. This can cause trouble if, say, one wants to add categories and the references is the last section of the article. Would including the noeditsection tag be helpful so we can avoid this problem? Johnleemk | Talk 20:42, 11 December 2006 (UTC)

Are you seeing this on specific articles, or all of them? The only edit link I can find (using monobook, windows, firefox 2.0) leads to the section in the article that reads:
== References ==
{{reflist}}
Or are you saying that we should remove that edit link, because it's not useful? --Interiot 20:58, 11 December 2006 (UTC)
Ah, never mind. This is a problem with Template:Ref-list, not Template:Reflist. Sorry, my mistake. Johnleemk | Talk 21:06, 11 December 2006 (UTC)
Gah, there's Template:Reflist (from Oct 06), Template:Ref-list (from Aug 06), and Template:Reference (from Jun 06)... attack of the clones. Unfortunately the other two are different in that they include the ==References== header... however, they have a total of 16 pages that use them, so perhaps we could update those pages to include a separate ==References== header, then redirect the two templates to this one, since this has 1300+ backlinks? --Interiot 21:34, 11 December 2006 (UTC)
Also, apparently __NOEDITSECTION__ is a page-level tag, and putting it inside Template:Ref-list would remove all edit links for pages that transclude it, so that probably wouldn't work. --Interiot 21:52, 11 December 2006 (UTC)

[edit] Non-Mozilla browsers and multiple columns

I see that the multiple-column code only works for Mozilla-based browsers. Can we see some adjustment for other browsers? The big three that I see needing support are Safari, Opera and (if we have to), MSIE. Thanks. —Joseph/N328KF (Talk) 19:19, 5 January 2007 (UTC)

A workaround? It might be possible to do a javascript workaround, if it's really important. Though since it's part of the CSS3 working draft, Safari and Opera will probably support it sooner or later. --Interiot 19:29, 5 January 2007 (UTC)
See Template:Navigation with columns for the ugly work-around and its development/talk history. --ChoChoPK (球球PK) (talk | contrib) 10:24, 21 March 2007 (UTC)

[edit] Reflist vs. references

I've only ever seen <references/> used to list the references, but recently someone added {{reflist}} to a page I was watching. What is the difference between them? Is one preferred? Wikipedia:Citing sources only mentions <references/>. Tocharianne 20:25, 7 January 2007 (UTC)

I'm wondering the same thing. Also, I've noticed some articles have switched to <div class="references-small">{{reflist|2}}</div>, which I find more appealing aesthetically as a long list of references doesn't dwarf the main content of the article. Is this preferred? Rtcpenguin 22:10, 7 January 2007 (UTC)
Well, I think I've answered my own question. The style guide (footnotes section) states:
  • "Some editors make the references smaller. Although this has several disadvantages, it is common with very long lists of references to enclose the <references/> tag in a 'references-small class div', like this: <div class="references-small"><references/></div> "
For now I'm going to use the small style of references unless someone has an objection. Rtcpenguin 22:15, 7 January 2007 (UTC)
I actually do have a problem with the smaller size of the references because on some articles there are references that aren't cited in the text and they end up being regular size. (They're usually bulleted, check Mary I of England for an example of this.) The smaller size can be extended to them, but this requires explicitly adding the code. Otherwise, if all references are cited in the text with <ref> then you're right, smaller is usually better. Tocharianne 23:24, 7 January 2007 (UTC)

[edit] Instances of ref-small

I created {{ref-section}} (and {{references-small}} also exists) to do this sort of thing. Will bots be doing replacements? (I subst'd {{ref-section}} whenever I used it.) —Rob (talk) 18:36, 8 January 2007 (UTC)

Ideally, I think we would want something like this as an option for usage...
{{reflist|extra=
*extra reference 1
*extra reference 2
}}
Can we do something like this so when people want to add general references which are not cited at specific locations in the article, they can and the new references will appear in the same size as the cited ones? By the way, I want to send out a thanks to all the contributors who have helped with this template - I made it wondering if anyone else would agree to use it and the support has been overwhelming. --Anthony5429 04:26, 12 January 2007 (UTC)
I was just going to suggest this. It shouldn't require many changes to the template, should it? Many thanks for this template btw, once this modification has been made it should be included in the general editing page shortcuts IMO. --Chris Cunningham 10:12, 28 January 2007 (UTC)
I personally prefer the footnotes and global references to be in two different sections (eg. ==References==/==Notes== and ==Sources==) (does WP:MOS say anything about that?) So maybe it would be better if there's a separate template (if it's really needed) to make a separate section small. --Interiot 14:50, 28 January 2007 (UTC)
Okay, I agree. How is this for citing notes, 3 options...
Option 1 (only specific references) - see The Rule
== References ==

{{reflist}}
Option 2 (only general sources) - see National Publications
== Sources ==

{{sourcesstart}}
* source 1
* source 2
{{sourcesend}}
Option 3 (both specific references and general sources) - see Elephant
== Notes ==

=== References ===

{{reflist}}

=== Sources ===

{{sourcesstart}}
* source 1
* source 2
{{sourcesend}}
Does anyone else think this is a good idea? I think it is the best solution and will clear up confusion to declare specific notes as references and general notes as sources. --Anthony5429 21:38, 8 February 2007 (UTC)
I have gone ahead and put this on Reflist/doc. See the discussion at the bottom of this talk page. --Anthony5429 07:49, 20 February 2007 (UTC)
Actually, I think this method makes more sense and keeps the site cleaner. I will make the change if no one disagrees. Does anyone disagree? --Anthony5429 00:36, 13 March 2007 (UTC)
Option 1 (only specific references)
== References ==

{{reflist}}
Option 2 (only general references)
== References ==

{{refbegin}}
* general reference 1
* general reference 2
{{refend}}
Option 3 (both specific and general references)
== References ==

{{reflist}}

{{refbegin}}
* general reference 1
* general reference 2
{{refend}}
If you disagree with the change, please voice your disapproval here. --Anthony5429 00:36, 13 March 2007 (UTC)
After not seeing any disagreement and actually seeing refbegin and refend be added to the /doc, I went ahead and finished making /doc look like the above. Any questions about the change should be noted here. --Anthony5429 05:36, 14 March 2007 (UTC)

[edit] Interwiki for Interlingua

Dear administrator, please add the following interwiki:

[[ia:Patrono:Reflist]]

Thank you in advance, Julian 22:12, 1 February 2007 (UTC)

Done. Please note that this template uses an unprotected documentation sub-page (see the explanation and link on the template page) so that all users can add interwikis and make other documentation updates. --CBD 00:13, 2 February 2007 (UTC)

[edit] Merge from Template:Reference

Since nobody seems to disagree, I have merged Template:Reference here via redirection. I'm also including the talk page discussion here, for future reference (no pun intended): COGDEN 17:40, 9 February 2007 (UTC)

[edit] Merge to reflist?

For what it's worth, there's a bit of discussion at Template talk:reflist about merging this and {{ref-list}} over to that template... This template previously isn't directly used on any current articles (though the template says it should be subst'd, so it's hard to gauge actual use... For what it's worth, {{ref-list}} had ~6 backlinks). {{Reflist}} has 2000+ backlinks now. The templates are slightly different ({{reflist}} doesn't include the section header, and doesn't necessarily need to be subst'd), but I don't know that we need multiple versions of the template when one seems to be overwhelmingly used more than the other. --Interiot 10:39, 27 December 2006 (UTC)

Vote to have Reference merged with Reflist...
Merge - With the advent of Reflist, I see no reason for Reference. --Anthony5429 13:17, 27 December 2006 (UTC)
Merge COGDEN 23:32, 5 February 2007 (UTC)

[edit] Three options for usage

I have posted this proposition on this talk page and put it into use with no disagreement so I am hereby adding it to the reflist/doc. Please discuss here if you disagree. --Anthony5429 07:49, 20 February 2007 (UTC)

[edit] Merging Ref-list into here

The merge proposal for {{Ref-list}} and {{Reflist}} never completed, I think because there was never a merge template on {{Reflist}} and the discussion ended up on multiple talk pages. I have corrected this so now we can have a coherent discussion on this.

Myself, I prefer to use {{Ref-list}} much of the time because it saves me from having to type the header. You won't, however, find it transcluded onto any pages because it really does have to be substituted for text because the header includes an edit link that leads users to the (currently unprotected) template's edit page. For an example of this see User:Elipongo/My Sandbox. My understanding of the discussion above this is that the reason {{Reflist}} is preferred is so that it can be transcluded and make the Wiki markup easier to read. That does make sense, however it would be nice to save myself the trouble of typing the header too. I don't know if there's a way, but can {{Ref-list}} be made to include a transcluded {{Reflist}} when it's substituted for text? —Elipongo (Talk|contribs) 16:30, 26 February 2007 (UTC)

I'm changing my standing to merge via redirect. I keep a copy of the suggested layout from {{Reflist}} in my "Frequent edits" text file that I keep open in a window. I no longer use {{Ref-list}} and now I think it should simply be redirected to here- especially in the light of recent erroneous edits to the template by users who didn't know better. —Elipongo (Talk|contribs) 18:14, 15 March 2007 (UTC)
This template {{reference}} also includes the heading references - so I find it much more useful - ref-list while having more options does not provide the same functionality as this template which has a simple name and a simple function. --Trödel 14:46, 13 March 2007 (UTC)
merge/redirect One problem that the English Wikipedia has is that there are too many editors duplicating other's efforts. We must curb this. One example that shows this is Template:Navigational templates. Now we already have <references/>, <div class="references-small">, which people already use all over the place. I believe we should be in a transitional phase where we convert all of those into using {{Reflist}}, and one template only. Having a duplicate only complicates the matter. --ChoChoPK (球球PK) (talk | contrib) 10:20, 21 March 2007 (UTC)

[edit] accessibilty problems

Dividing the references up 3 or more problems creates columns which are too small at 1024x768. There are even still some people using 800x600 or have their browser configured to use a larger font size which results in unacceptable results. This template should be changed to only allow 1 or 2 columns (in particular by using the references-small and references-2columns which I've added to common.css, this allows anyone using a resolution lower or higher than 1280x1024 to specify the number of columns they prefer.) —Ruud 01:51, 14 March 2007 (UTC)

I'd rather not forcibly prevent {{reflist|3}}, though I certainly agree that it shouldn't be used unless the columns are extremely narrow. But yeah, references-2columns sounds great whenever two columns are requested at least (I take it that users are encouraged to modify .references-2columns in their monospace.css if they usually use a large font with a low resolution?). It might be reasonable to prevent maybe 4 or 5 columns... any chance we could get a .references-3columns, so we don't needlessly restrict editors? --Interiot 02:09, 14 March 2007 (UTC)
I have seen a 3-column used where each is a very short thing. I don't remember where. --ChoChoPK (球球PK) (talk | contrib) 10:24, 21 March 2007 (UTC)
Lists such as Films considered the worst ever that have a correspondingly huge list of links that nobody cares to convert. –Pomte 15:54, 1 April 2007 (UTC)

[edit] font size

If you're watching this template, then you might be interested in this. --ChoChoPK (球球PK) (talk | contrib) 11:48, 21 March 2007 (UTC)

[edit] What?

Column division doesn't seem to work. I see only one on every ref section.--Emperor Walter Humala · ( talk? · help! ) 18:27, 21 March 2007 (UTC)

It doesn't work in IE. It works in Firefox. --ChoChoPK (球球PK) (talk | contrib) 01:49, 22 March 2007 (UTC)

[edit] Suggestion: Collapsable reflist

Is there any way to make the reflist "collapsable" or "hidable"?

I ask in relation to biographical list-type articles, where every entry has a reference, with the result of several hundred references. Being able to hide these references would be very useful.

Cheers! Lauren/ 03:44, 5 April 2007 (UTC)

That's be great. --ChoChoPK (球球PK) (talk | contrib) 04:38, 5 April 2007 (UTC)
There's a template called {{hidden}} that you can try using, although I have no idea why you'd want to. Tuxide 04:42, 5 April 2007 (UTC)
Using {{hidden}}, the reflist would be hidden by default if there are several other NavFrames on the page. Also, clicking on a citation link [1] will not open the hidden reflist or direct to it. Is this really desirable? –Pomte 04:57, 5 April 2007 (UTC)

It would require more javascript code, I presume, to make sure that it opened up whenever a [1] was clicked on. I don't know off the top of my head whether it's straightforward to implement this. --Interiot 09:57, 5 April 2007 (UTC)

[edit] Why not distinguish the notes?

What's the point of not having separate sections for notes and references? Having separate sections can only make things clearer. I don't see how the opposite would be true.

Peter Isotalo 13:20, 5 April 2007 (UTC)

Sure you can have separate sections. See Fight Club for an example. –Pomte 02:03, 6 April 2007 (UTC)
I don't use templates like these since I consider them confusing to editors in the long run, so I wasn't really referring to what can be done technicaly. What I was referring to is why the idea of separating notes and the list of sources isn't even hinted at. If anything, the tendency to use one single section for both notes and sources should be actively and strongly discouraged since it makes it much more difficult to see exactly how many and which sources have been used. It makes footnotes much harder to read (a situation already exacerbated by the use of smaller text) due to endless repetition of the same information instead of using a minimum of shorthand. And by this I mean simply referring to a work as Doe (1965) or Google: section X and Y, not using academic notation like ob cit, et al, ibid, and so forth. I mean, are there any good arguments for ever keeping notes in the "Reference"-section?
Peter Isotalo 13:44, 8 April 2007 (UTC)
Convenience, I guess. It's harder to maintain shorthand; you'd have to be wary that you don't insert a citation before ibid. A lot of sources happen to be cited only once, so it's more work to write it both shorthand and longhand, as well for readers to match them by eye. Depends on the article. In most cases it's fairly easy to count the number of total sources (same as the number of citations ignoring the a, b, c etc), so I don't see what you mean. When used properly, none of the citation methods repeatedly list the same content, at least none I'm aware of.
If you want to change the documentation of this template to encourage distinguishing notes, there should be no problem with doing that. "Option 3" sort of hints at notes above references. According to WP:HEAD, combining the two sections is okay. There's actually a current proposal to switch all <references> into {{reflist}} for a specific type of article, which many others see as an absurd/unnecessary idea. –Pomte 14:08, 8 April 2007 (UTC)