Template talk:Reflist/Archive 20

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Archive 15 Archive 18 Archive 19 Archive 20 Archive 21 Archive 22 Archive 25

Bold changes

I edited the documentation to clarify that column count and column width are meanings for a single unnamed parameter. I removed bolding, since apparently there are no such named parameters as column-count and column-width (if they do exist, they don't seem to work for me, on FF, Opera, Chrome), minimized redundant text, and included terse examples. --Lexein (talk) 03:52, 5 August 2012 (UTC)

You can always check which parameters are recognised by going for the "View source" tab and searching for triple opening braces, and seeing what occurs between that and the next pipe or triple closing brace. When I do this, I find: {{{1 {{{1 {{{1 {{{colwidth {{{1 {{{1 {{{1 {{{1 {{{colwidth {{{colwidth {{{liststyle {{{group {{{group {{{refs {{{group. The recognised named parameters are therefore |colwidth= |group= |liststyle= |refs= and there is one positional parameter. Although the strings "column-count" and "column-width" do occur in the page source, they are preceded by double braces, so are not parameters but subtemplates - see {{column-count}} and {{column-width}} for details. --Redrose64 (talk) 09:41, 5 August 2012 (UTC)
Thanks. I wonder how deep the average editor's knowledge of the internal workings of templates should be, just to basically use them. I'm fairly experienced, and the documentation led me down the garden path to wondering why {{reflist|column-width=30em|refs=(...)}} didn't work, and I only tried that because | 30em| didn't work (note the now-I-know-it-bug-triggering space). Another editor came along and fixed it with |30em|, which is all I needed. So I made the example explicit too, sans space.
I'm a fan of practical documentation, as opposed to Unix man-style docs, which are true-but-inexpressibly-unhelpful. If I made a mistake in the docs, please feel free to correct or revert them. --Lexein (talk) 10:05, 5 August 2012 (UTC)
You can use either {{reflist|30em}} or {{reflist|colwidth=30em}} - the effect is the same, but I prefer to use the second one because the intention is clearer. In essence, the {{reflist}} template tests the first positional parameter to see if it's purely numeric - if so, it treats it as a column count, otherwise it assumes that it's a column width. Inserting a normal space before or after a value that's already non-numeric (as in {{reflist| 30em}}) will not make any difference.
However, inserting a normal space before or after a numeric value will cause trouble, but for different reasons (technical explanations follow).
If inserted before (as in {{reflist| 2|refs=}}), instead of setting the CSS class references-column-count-2 you actually get references-column-count- 2; in this, the presence of the space causes it to be interpreted as two separate classes.
If inserted after (as in {{reflist|2 |refs=}}), the MediaWiki parser converts that into a non-breaking space (as with the bug described at Wikipedia:Village pump (technical)/Archive 101#MediaWiki parser trashing white space), which is invalid. --Redrose64 (talk) 11:21, 5 August 2012 (UTC)
My fault— I confused the included templates {{column-width}} and {{column-count}} with parameters when I updated the doc. The template does support |colwidth=. The space bug is fixed in the sandbox; I'm going to make that live. ---— Gadget850 (Ed) talk 11:14, 5 August 2012 (UTC)
The space bug is now fixed; will update the doc. ---— Gadget850 (Ed) talk 11:22, 5 August 2012 (UTC)

Whitespace bug

We made the sandbox changes in March, but I can't find the original discussion. It isn't in the archives here, so it must have come up someplace else. Regardless, I double checked and it is fixed. ---— Gadget850 (Ed) talk 13:40, 5 August 2012 (UTC)

Not quite. I believe that the following line
     | references-column-count references-column-count-{{{1}}} }}
needs to become:
     | references-column-count references-column-count-{{#if:1|{{{1}}} }} }}
per my comment above "the presence of the space causes it to be interpreted as two separate classes". --Redrose64 (talk) 13:47, 5 August 2012 (UTC)
Yep. Had that fixed in sandbox at one point. Double checking. ---— Gadget850 (Ed) talk 14:24, 5 August 2012 (UTC)
Injects an extra | }} into the class. Doesn't hurt, but it isn't neat. ---— Gadget850 (Ed) talk 14:49, 5 August 2012 (UTC)
 Fixed ---— Gadget850 (Ed) talk 15:00, 5 August 2012 (UTC)
Re the extra | }} - that's because you added two opening braces but four closing braces in this edit. The pipe is the one on line 6 which should separate the "then" from the "else" clauses of the {{#if: {{{1|}}} test on line 2. The extra closing braces caused this test to be terminated in the "then" clause. --Redrose64 (talk) 15:33, 5 August 2012 (UTC)
Cleaned that up. Know I counted braces twice... ---— Gadget850 (Ed) talk 15:43, 5 August 2012 (UTC)
If the intention of {{#if:1|{{{1}}} }} is to trim the string, why not use {{trim}} to make it more clear? Anomie 16:03, 5 August 2012 (UTC)
I tested with that. We already transclude two other templates and I was trying to not use {{trim}} three times to minimize resources. ---— Gadget850 (Ed) talk 16:49, 5 August 2012 (UTC)
eraser Undone I have no idea what you were trying to fix, but there are supposed to be two column-count classes; one generic class and one with the ammount of columns affixed. There was no wrong output anywhere in the classes. Edokter (talk) — 17:14, 5 August 2012 (UTC)
Exactly: two classes, but your undo has potentially produced three, as I described in the section above. If I take the code {{reflist| 2}} and put it into Special:ExpandTemplates, what I get back is
<div class="reflist references-column-count references-column-count- 2" style="-moz-column-count: 2; -webkit-column-count: 2; column-count: 2; list-style-type: decimal;"> <references group=""></references></div>
Note that the class= attribute contains references-column-count- 2 whereas it should contain class="references-column-count-2. There is an unwanted space before the 2. --Redrose64 (talk) 17:31, 5 August 2012 (UTC)

information Note:Although The sysops here are well aware of this, but still making a note that we already have 5 edits today on this template that is used on 2,400,000+ pages. Shouldn't we be using the /sandbox or /testcases first, as expected ? Thanks--DBigXray 17:23, 5 August 2012 (UTC)

Indeed. It was not explained in depth enouhg what caused the extra class; namely a space before the value. Please be more clear, all (including me), and prepare testcases for all discussed bugs. Edokter (talk) — 17:53, 5 August 2012 (UTC)
Added more testcases. --Lexein (talk) 18:22, 5 August 2012 (UTC)

Duplicated reference lists in Mobile devices

I've noticed an intermittent bug in the way that reference lists are displayed on my iPhone (mobile view): the reference list is sometimes displayed twice. I saw this in two pages, one of them http://en.m.wikipedia.org/wiki/Lowy_Institute_for_International_Policy. When it was failing, the page displayed two reference lists (numbered 1 to 12, then again, numbered 1 to 12). But now (frustratingly, because I'd like to demonstrate the bug!), it is working correctly. The Reflist template is in the page content only once, so it seems to be a bug in the way that the HTML is generated from the page source for the mobile view. Would someone be able to look into this, please? Ben morphett (talk) 22:06, 21 October 2012 (UTC)

Flexible columns

I've seen several instances recently of editors replacing, say, {{Reflist|2}} with {{Reflist|30em}}, in order to accommodate readers with a variety of widths of viewing ports. Should we deprecate the former method? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 11:20, 16 August 2012 (UTC)

I made a proposal ages ago to treat 2 as 30em, 3 as 20em and 4 as 15em. ---— Gadget850 (Ed) talk 12:39, 16 August 2012 (UTC)
The problem with that idea is that it assumes that all displays are 60em wide. They're not. --Redrose64 (talk) 15:43, 16 August 2012 (UTC)
I generally replace {{Reflist|2}} with {{Reflist|30em}} because i believe we should not force set columns on our readers. I do agree that {{Reflist|2}} should have em type capabilities and would support any motion for this.Moxy (talk) 17:16, 16 August 2012 (UTC)
We need to see how this is currently rendered on a mobile device. ---— Gadget850 (Ed) talk 18:50, 16 August 2012 (UTC)

I've spent part of the morning undoing {{reflist|30em}} back to simply {{reflist}} because when there are only a few citations the columnar-rendered display looks bad. For example, when there is only one citation, {{reflist|30em}} puts that citaion in the middle of the screen, not over at the left where it ought to be:[1]

  1. ^ One citation that should be rendered left-aligned on the page

On my screen, the cite text of my example citation is long enough to be placed in two columns with most of the text in one column and the last word in the other. That puts a rather large space between "the" and "page".

In my note to the editor who was making all of the changes from {{reflist}} to {{reflist|30em}}, I wondered if {{reflist}} shouldn't be made more clever so that columnar formatting isn't applied until the article has enough citations to warrant that style, and then only as many columns as are appropriate.

Trappist the monk (talk) 16:08, 17 November 2012 (UTC)

As noted in the template documentation: "The use of columns can result in widows and orphans, where a citation at the bottom of a column may be split to the top of the next column. There are CSS3 selectors that could resolve this, but they are not yet supported by any major browsers."
Perhaps it is time to revisit that, as most browsers have been updated. ---— Gadget850 (Ed) talk 16:29, 17 November 2012 (UTC)
That certainly is worth looking at though my example was primarily intended to show that a single citation in columnar form centers the citation in the page rather than left-aligning it as it should be. Here's a shorter version:[1]
  1. ^ One citation should be left-aligned
Trappist the monk (talk) 17:10, 17 November 2012 (UTC)
The citation is left aligned in Firefox 16. You are seeing it centered across the page width? ---— Gadget850 (Ed) talk 17:22, 17 November 2012 (UTC)
In my example, the 'r' in 'primarily' is directly over the '1' of the citation. Chrome current version (23.0.1271.64 m).
Trappist the monk (talk) 17:30, 17 November 2012 (UTC)
I see the ^ backlink directly under the T in That; both in Firefox 16.0.1 and Chrome 23.0.1271.64 m under Windows 7. ---— Gadget850 (Ed) talk 17:58, 17 November 2012 (UTC)
Same version of Chrome, on XP pro 2002 SP3 and on Windows 7. Different displays so the '1' of the citation is in different places but still not left aligned. An old version of Opera, 9.50, has the citation left-aligned as does Windows Exploder V7. Tried vector and monoblock skins, no difference.
Trappist the monk (talk) 18:13, 17 November 2012 (UTC)
I am clueless. Perhaps try resetting Chrome? ---— Gadget850 (Ed) talk 18:46, 17 November 2012 (UTC)
No change. Not surprised really since I see the problem on two different machines, with different OSs.
Trappist the monk (talk) 18:58, 17 November 2012 (UTC)
I have the current version of Chrome (Version 23.0.1271.64 m) and I see the same behaviour as with other browsers: the single column is left-aligned. To me, the caret in "1. ^ One citation should be left-aligned" is slightly to the left of the em-dash on the line below, which precedes your signature. --Redrose64 (talk) 20:16, 17 November 2012 (UTC)

Mobile devices

I noticed any reflists with 30em causes problems for my tablet, the second row of references would break off from the article creating a large white space on the side to fit the reference in. The only device I tested this with was a Sony Tablet, but I've been replacing Reflist|30ems with Reflist|2s to articles I visit. DragonZero (Talk · Contribs) 05:39, 9 October 2012 (UTC)

You'll be editing an awful lot of articles then, possibly with undesirable consequences. Your edits are assuming that all devices are 60em wide, which is most certainly not true; this will force articles where each individual ref is quite short - primarily those using Shortened footnotes - to use just two columns where three, four or even five may be possible, consequently adding a lot of unnecessary blank space.
Surely the proper action is to amend {{reflist}}, or the CSS which is used. For reference, the difference between {{reflist|2}} and {{reflist|30em}} is in the class and style attributes applied to the enclosing <div>...</div>
  • {{reflist|2}}class="reflist references-column-count references-column-count-2" style="-moz-column-count: 2; -webkit-column-count: 2; column-count: 2;"
  • {{reflist|30em}}class="reflist references-column-width" style="-moz-column-width: 30em; -webkit-column-width: 30em; column-width: 30em;"
Perhaps there's some Sony-specific equivalent to the -moz-column-width: and -webkit-column-width: properties which could be added to {{column-width}}. --Redrose64 (talk) 12:50, 9 October 2012 (UTC)
The only reference I found to the engine used for Sony is NetFront, which is in turn based on Webkit. So I doubt is uses it's own vendor prefix. As for making {{Reflist|2}} act as {{Reflist|30em}}, that was tried once and failed miserably. Edokter (talk) — 16:12, 9 October 2012 (UTC)

Cite error

This code works fine here:


statement1<ref>reff1</ref>

{{Reflist}}

statement2<ref>reff2</ref>

{{Reflist}}

statement1[1]

  1. ^ reff1

statement2[1]

  1. ^ reff2


but in my test page gives cite error [1]. Why is that? -- Dalba(talk) 3 Azar 1391/ 05:41, 23 November 2012 (UTC)

Now that I'm looking into it, it doesn't work correctly anywhere. (statement2 is not linked to ref2) -- Dalba(talk) 3 Azar 1391/ 05:41, 23 November 2012 (UTC)

It doesn't work any differently above. The problem is that {{reflist}} doesn't expect to be used more than once without parameters, see Template:Reflist#Multiple uses.

statement3<ref>reff3</ref>

{{Reflist|close}}

statement4<ref>reff4</ref>

{{Reflist|close}}

statement3[1]
  1. ^ reff3
statement4[1]
  1. ^ reff4
Notice that the first of my {{Reflist|close}} lists two references; the reff2 relates to your statement2 because it hadn't previously been shown (hence the Cite error). Otherwise, this works as expected. --Redrose64 (talk) 08:09, 23 November 2012 (UTC)
Cite error messages are suppressed on talk pages. I will add this particular issue to the help page. ---— Gadget850 (Ed) talk 09:23, 23 November 2012 (UTC)
Thanks and sorry, I should have read it before. -- Dalba(talk) 3 Azar 1391/ 12:31, 23 November 2012 (UTC)

Which is preferable: forced column width or forced number of columns?

Regarding Template:Reflist#Columns - should we prefer {{reflist|20em}} over {{reflist|3}} or vice versa? In brief: {{reflist|20em}} gives as many columns as will fit across the available width, assuming a minimum allowance of 20em per column, but {{reflist|3}} forces three columns regardless of the available width, and does not set a minimum column width.

Ignoring browsers such as IE7 that support neither method, which browsers support one method but not the other? This is in reference to this edit and this revert but there have been several other recent cases.

My own view is that since we don't know how wide the reader's screen is, use of a fixed number of columns could potentially either wrap a long reference onto three or more lines, or leave a lot of blank space after short references. Use of a fixed column width allows the amount of wrapping or blank space to be adjusted. --Redrose64 (talk) 20:07, 25 November 2012 (UTC)

My view is that this should be left to the editors of each individual article, like other aspects of how to present the references. I have never seen objective evidence than any particular way works better than another, or that any particular width is better than any other (20em? 25em? 30em?). The general principle is that we don't make an effort to standardize stylistic choices that depend mostly on subjective opinion. — Carl (CBM · talk) 20:22, 25 November 2012 (UTC)
In that particular article, a width of 30em was established in 2010 [2], so in case of dispute the article should go back to using that original style. — Carl (CBM · talk) 20:26, 25 November 2012 (UTC)
The trouble I have with a fixed column width is that widths appear to be set far to narrow. With respect to this edit and this revert (both mine), four columns (which is what {{reflist|20em}} is giving) is far too much, it has taken the removal of white space to what I consider extreme. There is a place to white space to help with the readibility. I will admit that {{reflist|30em}} may have been a better revision. I do think that there should be a minimum value for the width (em). --Stewart (talk | edits) 20:38, 25 November 2012 (UTC)
This is really a case-by-case decision. There are reference lists that entirely consists of one-word ("Johnsen, p. 34") references, which will comfortably fit in 10em, and there are lists that cram as much information into one reference as possibly. The latter should not be under 30em. As a side note: the widht given is always treated as the minimum width of a column, so it can range between 30em and 60em depending on the available width of the page on screen.— Preceding unsigned comment added by Edokter (talkcontribs) 20:56, 25 November 2012‎ (UTC)
The reason I reverted Pencfn/Stewart's]] revision is because fixing the width to three columns without consideration of the screen width means that a lot of white space is left between the columns when the references are mostly short, as they are in the case of the Aldwych tube station article. Wide screens are quite common today and enabling the number of columns to be calculated to suit the width of the screen and the width of the references is good practice. Whilst IE before version 10 has not supported the use of columns, all the other browsers have done so for some time. I selected{{reflist|20em}} as that comfortably accommodates the majority of the references (only 14 of the 45 wrap at this width) and leaves a minimum of white space. This is in accordance with the column usage recommendation in the template documentation.--DavidCane (talk) 21:49, 25 November 2012 (UTC)

Font size

Is it just my imagination of are references displaying in a larger font size more recently? Richard Arthur Norton (1958- ) (talk) 21:36, 6 January 2013 (UTC)

Nothing has changed. Where do you see the difference? Edokter (talk) — 21:38, 6 January 2013 (UTC)

accesing the reflist?

I'm trying to copy something from one wiki page to another, and I can figure out how to bring the references with me. The article just says: Reflist|2, when i try to go to advanced and adding a reference, it doesn't show up in the article, so how do I acces this reflist so I can edit it to include the references correctly? antabus (talk) 23:14, 9 January 2013 (UTC)

When you are reading an article and see a references section near the bottom populated by a series of numbered citations, you might think that if you edit the page, you will see those citations typed in that section and be able to edit them. However, normally what you will see is code similar to this:

     ==References==<p>   <nowiki>{{Reflist}} or <references/>

The text of citations is actually in the body of the article, directly next to statements or paragraphs the citations support, using <ref>(citation)</ref> tags, which display as footnotes (e.g.[1][2]) when you are reading an article. The template code shown above in the references section colates and displays all of the citations within the article in a numbered list in which the numbers correspond to the footnote numbers in the text. By clicking on the ^ symbol next to a citation display, you can easily find exactly where in the body of the article the citation text appears in order to edit it. For more, please see Wikipedia:Referencing for beginners.--Fuhghettaboutit (talk) 23:23, 9 January 2013 (UTC)

I'm not sure I understand you, I'm tryin to edit here https://en.wikipedia.org/w/index.php?title=Serotonin%E2%80%93norepinephrine_reuptake_inhibitor&action=edit and at the end it just says Refencer Reflist 2 the actual references are not in the body of the article, it is almost the last thing on the edit page, I'm trying to get to this Reflist|2 page, so I can put the references in there. You can see I have changed the numbers to 232 and 24, but theyre empyt, and I can't get the quotes from the article https://en.wikipedia.org/wiki/Mood_disorders over here, so the numbers point nowhere. So really I'm looking for the address of the reflist, I tried https://en.wikipedia.org/w/index.php?title=Serotonin%E2%80%93norepinephrine_reuptake_inhibitor&action=edit&template:reflist%7C2 but that just brought me back to the main edit page. Thanks you for answering so fast :) antabus (talk) 23:32, 9 January 2013 (UTC)::
Which citation are you trying to copy? --— Gadget850 (Ed) talk 23:48, 9 January 2013 (UTC)
These 2: ^ Neurobiology of Mood Disorders. ^ The Four Major Neurotransmitters., number 11 and 12, from the "Mood Swings" article. Im just trying to find the Reflist|2 page's address antabus (talk) 23:54, 9 January 2013 (UTC)

Here are the in-text citations from Mood swings:

  • <ref>[http://www.turner-white.com/pdf/hp_sep05_mood.pdf ''Neurobiology of Mood Disorders.'']</ref>
  • <ref>[http://www.integrativepsychiatry.net/neurotransmitter.html ''The Four Major Neurotransmitters.'']</ref>

You need to copy these, then paste them at the point where you need to add the in-text citation. These will create the in-text links like [1]. The software collates all the references and builds the reference list at the point where {{reflist}} is included.

I highly suggest you create a sandbox at User:Antabus/sandbox and play around before making live edits. --— Gadget850 (Ed) talk 00:13, 10 January 2013 (UTC)

Yeah, I was kindda expectinghoping just having to add a ref /ref somewhere, and saved the page too early, should've planned it all out, but was not expecting having to figure out all kinds of different wikiediting stuff, I'll try and add the that under reflist, but I can't see why it's not as easy as just giving me a link to this reflist|2 page on that specific article, so I can insert the ref /ref's at the end there. Thanks for your help and patience, I'll give up if this dosn't work and delete the edit I made originally untill I figure out how to get to the reflist page :) antabus (talk) 00:19, 10 January 2013 (UTC)
Now I've figured out a quick and dirty way to get the references in to the section, but meets a new problem getting the grayed out numbers in the text to actually link to the article :( I'm bummed out about the complexity of what I thought would be a quick and easy job of just learning some simlpe syntax on the edit page, not figuring out a huge Guide on lot's of stuff I've never heard of before, I really can't understand why there's no URL to this Reflist page where the are listed, or why only my square bracketed numbers doesn't link to the references now that I've gotten them to at least show up. I have no more patience right now though, thanks for taking your time and trying to help me out. Do you think I can keep the edit as it is now, where's it's just that people who would want to see the reference that have to scoll down and click them there, or should I just delete the whole thing until Tomorrow where I can probably squeze in some hours of trying to grasp this. I really feel like I'm missing a big point here or something. — Preceding unsigned comment added by Antabus (talkcontribs) 01:17, 10 January 2013 (UTC)
  1. Go to the place in the article where you want the footnotes in the text to appear (where you want it to display [2])
  2. Place at that point in the text the citation, right next to the text you are sourcing e.g., Some text<ref>[http://www.turner-white.com/pdf/hp_sep05_mood.pdf ''Neurobiology of Mood Disorders.'']</ref>
  3. Click Save page.
You will now see that where you placed that citation in the text, it will display as [2], and the citation will appear at the bottom in the collated list. The reason there's no URL to this Reflist page is because what you are seeing in "read mode" is a collated list of the citations which are interspersed throughout the article's text, which you can see by viewing the text in edit mode.--Fuhghettaboutit (talk) 02:04, 10 January 2013 (UTC)
Yep, that's what I've ended up doing, and the page itself looks all right now, it's just that it's obviously not the correct way to do it. On the edit page, people are just putting in square bracketed numbers in the appropriate places, and the actual URL addresses and titles of the references is kept somewhere else, in this magical place called "reflist|2" which I don't think I will ever get to see for myself. I'm probably going to at least give it another try and learn how to do it properly using reflist tomorrow, but I have a feeling I'm going to end up figuring it's not worth spending so much time just trying to add 4 lines of text with 2 new references, and stick to just fixing spelling and grammar mistakes. Thanks for trying to help me though :) antabus (talk) 02:45, 10 January 2013 (UTC)
No, unfortunately—I'm sure because I wasn't clear enough—but you haven't followed my instructions at all. I have fixed the citations to appear in the places and verifying the text it appeared you were intending. Maybe if you take a look what I did it will help. But let me state it again. Where you want the footnote to appear in the text, that's where you place the citation, inside of <ref>...</ref> tags. They go right in the text at that point (you placed external links there without ref tags, and with your own hand written square brackets). When you save, that ref tag surrounded citation will appear as a linked footnote ([2]), and the citation content you entered will display at the bottom where the {{reflist|2}} template appears. No one is placing hand written "square bracketed numbers" anywhere. They are adding only citation in the text in ref tags; in saved mode those display as square bracketed numbers.--Fuhghettaboutit (talk) 03:10, 10 January 2013 (UTC)