Misplaced Pages

Template talk:Reflist: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editContent deleted Content addedVisualWikitext
Revision as of 19:37, 27 February 2020 editDavidwr (talk | contribs)50,107 edits Limitations: rewriting section← Previous edit Latest revision as of 13:25, 5 December 2024 edit undoTom.Reding (talk | contribs)Autopatrolled, Extended confirmed users, Page movers, Template editors3,879,760 editsm -redundant class param; cleanupTag: AWB 
(275 intermediate revisions by 67 users not shown)
Line 1: Line 1:
{{Permanently protected}}
{{permprot}}
{{mbox|text=This page is used for '''general discussion''' about ], a Misplaced Pages references template, which is '''used on many articles'''. For help on '''adding a reference to an article''', see ], or ask for help on that article's talk page.}} {{mbox|text=This page is used for '''general discussion''' about ], a Misplaced Pages references template, which is '''used on many articles'''. For help on '''adding a reference to an article''', see ], or ask for help on that article's talk page.}}
{{WikiProject banner shell|
{{WikiProject Books|referencework=yes}}
}}
{{Copied|from=Template:Reflist|from_oldid=794499661|to=:incubator:Template:Wp/nod/Reflist|to_diff=4237302}}
{{User:MiszaBot/config {{User:MiszaBot/config
|archiveheader = {{aan}} |archiveheader = {{aan}}
|maxarchivesize = 75K |maxarchivesize = 75K
|counter = 33 |counter = 34
|minthreadsleft = 4 |minthreadsleft = 4
|algo = old(60d) |algo = old(60d)
|archive = Template talk:Reflist/Archive %(counter)d |archive = Template talk:Reflist/Archive %(counter)d
}} }}
{{archives |bot=MiszaBot II |age=2 |units=months |index=/Archive index |search=yes |auto=yes }}
{{User:HBC Archive Indexerbot/OptIn {{User:HBC Archive Indexerbot/OptIn
|target=/Archive index |mask=/Archive <#> |target=/Archive index |mask=/Archive <#>
|leading_zeros=0 |indexhere=yes |template= |leading_zeros=0 |indexhere=yes |template=
}} }}
{{Archives |bot=MiszaBot II |age=2 |units=months |index=/Archive index |search=yes |auto=yes }}


== Reference number ordering? == == Update default width to 25 em? ==


The new aggressively-wide side margins in the default skin (Vector 2022) mean that on most monitors at 100% zoom reflist always renders as single column This is one of my greatest frustrations with the skin, and I don't think I'm alone (as {{ping|CJDOS}} noted above) :).
What determines how references are numbered? I'm used to them being numbered in order of when they're cited in the article. But, looking at , The first reference is 77, the next is 3, then comes 78, etc. What's the magic here? -- ] ] 00:38, 27 September 2019 (UTC)
:A bunch of references are in .
:—] (]) 00:46, 27 September 2019 (UTC)
::Dooh! Thanks for spotting that. -- ] ] 00:52, 27 September 2019 (UTC)


While we continue to push for less ''enthusiastic'' sidebar width and padding, the default reflist column width could also be revised so that refs are two columns in some "standard browser size" configuration. Say a 1200px wide window, running the default skin, with sidebars open? I believe 25em would work. <span style="color:#666">&ndash;&nbsp;]]</span> 13:18, 19 September 2023 (UTC)
==Edit request==
:I'd rather see us fix Vector 2022 locally with CSS than change this reflist default that has worked well for many years. I can easily get two reflist columns on my 13-inch laptop screen in Vector 2022 with CSS that fixes the absurd whitespace, leaving me with 69em of space for content (it is 94em in Vector 2010 on the same screen). – ] (]) 14:12, 19 September 2023 (UTC)
::I agree. It should be V22's job not to break things that have worked for years, not our job to work around their changes. ] ] 14:44, 19 September 2023 (UTC)
:::This "I don't like the defaults so I'm going to prevent anyone else from making them more usable" approach is...not constructive. —] (]) 15:10, 19 September 2023 (UTC)
::::Let me rephrase. I have no problems with this being fixed in the V22 CSS loaded by enwiki, but as somebody who doesn't use V22, I don't want to see changes to the template which will affect what I see to accomodate V22. ] ] 15:21, 19 September 2023 (UTC)
:::::Maybe there is some magical CSS way to make the default 23 or 25 em for Vector 2022 and keep it at 30 em for Vector 2010. – ] (]) 15:38, 19 September 2023 (UTC)
:::::: I'll ask in Phab, ('''update''': asked in {{phab|347109}}) this is reasonably specific and may get a response there. <span style="color:#666">&ndash;&nbsp;]]</span> 15:18, 21 September 2023 (UTC)
:::::::You can use different values for vector and Vector 2022.
:::::::To target styles based on skins, use a selector such as body.skin-vector-legacy .myClass; specification of the body element is required and must be followed by a descendant combinator (i.e. the space). Other classes on the body or html elements may be targeted in the same manner. See phab:T197617. 1.32+
:::::::(])
::::::: can also be used in modern browsers. ] (]) 18:29, 27 September 2023 (UTC)
:(ec)If we want to make this change, we would presumably also want it implemented in <nowiki><references /></nowiki> since there are plenty of articles with <nowiki><references /></nowiki> instead of <nowiki>{{reflist}}</nowiki> as the default widths are the same at the moment. ] (] - ] - ]) 14:15, 19 September 2023 (UTC)
::Yeah I think this would be the better way. I'm someone who uses the <nowiki><references /> tag instead of {{reflist}}</nowiki> in my articles. ] (]) 15:02, 20 September 2023 (UTC)
::: Ah, i don't know how the tag is implemented -- does reflist inherit default width from it? <span style="color:#666">&ndash;&nbsp;]]</span> 15:18, 21 September 2023 (UTC)
::::Reflist inherits the width from the CSS of the skin being used, which is 30em in Vector 2010. When a value is put into the template, then it overrides the skin to make the width something else. ] (]) 18:23, 21 September 2023 (UTC)
:::::Hmm, if that is true, why do we have ]? Did you mean to say that {{tag|references|s}} inherits the width from the skin's CSS? – ] (]) 21:47, 21 September 2023 (UTC)
::::::JK I was wrong. It's not set in the skin, the default column width seems to actually be pulled from the Cite extension: ]. The templatestyles does the whole <code>list-style-type</code> thing, and <code>.reflist-columns-2</code>/<code>.reflist-columns-2</code> are for backwards-compatibility, but the rest don't seem to need to be there. ] (]) 23:43, 21 September 2023 (UTC)


Phab ticket about this, please comment there: {{phab|347109}} <span style="color:#666">&ndash;&nbsp;]]</span> 02:18, 22 September 2023 (UTC)
{{edit fully-protected|answered=yes}}
Please amend the protection of this template so that template editors can edit it (like, e.g. {{tl|infobox}}). ―]<span style="color:red">❤]☮]☺]☯</span> 22:01, 26 October 2019 (UTC)
:]&nbsp;'''Not done:'''<!-- Template:EP --> Given it's extremely high usage here (unlike template:infobox) this template shouldn't ever need to be edited, If you've spotted an error let someone know. –]<sup>]</sup> 22:57, 26 October 2019 (UTC)


I use Vector 2022 with the sidebar, and I get two columns of references on both my PC and iPad. Out of curiosity I tried switching the iPad to portrait mode, and got a single column of references. Switching the ToC to the top menu with the Vector 2022 "hide" button gave me two references even in portrait mode. This strikes me as a more natural answer than changing global css. Is there some reason why those with monitors too narrow for two columns of references would not want to set Vector 2022 to have the ToC hidden in the top button? ] (] - ] - ]) 12:02, 22 September 2023 (UTC)
{{hat}}
::{{u|Davey2010}}, You aren't an admin, so you couldn't have done it anyway. Why did you post this? ―]<span style="color:red">❤]☮]☺]☯</span> 17:45, 27 October 2019 (UTC)
:::{{u|Koavf}} - Open your eyes - I said {{xt|If you've spotted an error let someone know.}} - I never once in my reply stated I could do anything,
:::{{xt|Why did you post this?}} - Because it's common courtesy to post a response with the template?. –]<sup>]</sup> 18:16, 27 October 2019 (UTC)
::::{{u|Davey2010}}, You also wrote "Not done" but you couldn't do it anyway. ―]<span style="color:red">❤]☮]☺]☯</span> 18:17, 27 October 2019 (UTC)
:::::The template doesn't remotely imply I'm an admin and I'm not acting in an admin capacity. Don't you have content to be removing or whatever it is you do that you think is "productive editing" .... –]<sup>]</sup> 18:59, 27 October 2019 (UTC)
::::::{{u|Davey2010}}, Unfortunately, yes, your hateful invectives, irrelevant posts, and pointless editing that doesn't even make a cosmetic change are definitely taking up my bandwidth. It would be a lot easier if you stop stalking my edits, antagonizing me, and posting lies about me but I can't exactly control your behavior and how rude, off-putting, un-collaborative, and vicious you are. At most, I can just fix when you make mistakes that I happen to notice and keep on doing what I can to make this encyclopedia better in spite of other editors who want to drive away those who are working alongside them. {{shrug}} ―]<span style="color:red">❤]☮]☺]☯</span> 19:02, 27 October 2019 (UTC)
:::::::I would hardly call amending the infobox spacing as pointless editing - It makes it tidy inside and helps our readers who may want to edit it, I suppose you're going to tell me edits such as and aren't pointless edits....,
:::::::You stalked my edits so I thought I'd return the favour, tit-for-tat really, I think it's fair to say you've antagonised yourself.
:::::::If I make mistakes you're more than welcome to fix them - I'm not the perfect editor nor have I claimed to be one but if you want to follow me around like a little lapdog and correct every minor mistake I make then you by all means knock yourself out.
:::::::Sorry to rain on your parade but isn't improving the encyclopedia... it's doing the exact opposite,
:::::::] one would've assumed you would've steered clear of people and disruptive editing for a while but apparently not. –]<sup>]</sup> 19:30, 27 October 2019 (UTC)
::::::::{{u|Davey2010}}, Maybe you're not familiar with our requirement that all information here needs to be sourced but it's actually a bedrock policy here. We ]. Maybe you could try steering clear of people and let me know how that goes, Davey. ―]<span style="color:red">❤]☮]☺]☯</span> 19:51, 27 October 2019 (UTC)


:I assume you're leaving the toolbar menu closed as well?
{{hab}}
:Logged out users get the TOC expanded by default, which is convenient. And they won't know that there's an option for references to be two columns. The question for them is whether they are likely to be using a persistent Tools toolbar. Logged-in users are more likely to want to access the tools regularly as well.
:{{replyto|Koavf}} Also, requests for decreases to the page protection level should be directed to the protecting admin or to ] if the protecting admin is not active or has declined the request. --] &#x1f339; (]) 13:58, 27 October 2019 (UTC)
:The experience varies a lot with combinations of window size and default font size. Many readers use windows between 1200 px and 1680 px with font zoom between 100% and 133%. Here are a few width break points for when refs become two-column (Mac/FF):
::{{u|Redrose64}}, Contacting the protecting admin isn't needed for templates and he hasn't edited here in a year. I've posted to the page you suggested, thanks. ―]<span style="color:red">❤]☮]☺]☯</span> 17:45, 27 October 2019 (UTC)
:* main/toc open, tools hidden: 1100 | 1210 | 1310 | 1420 px: 100|110|120|133% zoom
::: {{re|Koavf}} Although I'd bet that the 90% of template editors are more comfortable editing templates than 90% of admins, there is a principle of "minimum exposure" for editing of very highly used templates. I sympathise, because I've often felt frustrated in the past when the protection level of a template prevented me from editing it (usually I ended up working in the sandbox and requesting the update when finished). Nevertheless, this template hasn't needed to be edited in over two years, so it's unlikely its protection level will be downgraded. Let me make you an offer: if you need to edit this template, just make an edit request – it's on my watchlist – and I'll do my best to fulfil the request for you, if practical. --] (]) 19:08, 27 October 2019 (UTC)
:* main/toc and tools open: 1350 | 1500 | 1620 | >1680 px : 100|110|120|133% zoom
::::{{u|RexxS}}, That's very thoughtful of you. Thanks. ―]<span style="color:red">❤]☮]☺]☯</span> 19:10, 27 October 2019 (UTC)
:The body column has become a second-class citizen, and is the only one whose width is variable, so sidebars that feel normal at a 1800px-wide window at 100% zoom are quite big at 1280px. As a result, what feels like a significant range of normal use cases have body columns that fall between 50em and 60em in width, hence this request.
:::::{{replyto|Koavf}} In ], I can't find the part that says that contacting the protecting admin isn't needed for templates - please direct me to the relevant section. --] &#x1f339; (]) 21:58, 27 October 2019 (UTC)
:''<small>This is in addition to, not as a replacement for, requests to reduce sidebar margins and horizontal whitespace across the board, including the "bonus" 60px margin that gets added to the main menu at a window width of 1200px / 100%.</small>'' <span style="color:#666">&ndash;&nbsp;]]</span> 19:57, 23 September 2023 (UTC)
::::::{{u|Redrose64}}, In the page you directed me to: ], you can see: "Requests to downgrade full protection to template protection on templates and modules can be directed straight here; you do not need to ask the protecting admin first." ―]<span style="color:red">❤]☮]☺]☯</span> 22:04, 27 October 2019 (UTC)
== "Misplaced Pages:REFLIST" listed at ] ==
]
An editor has asked for a discussion to address the redirect ]. Please participate in ] if you wish to do so. <!-- from Template:RFDNote --> ] (]) 19:39, 27 November 2019 (UTC)
{{clear}}


== Preview with nonempty refs parameter == == Making empty reflists useful ==


Would it be feasible to display a message—probably something similar to {{tl|no footnotes}}—when a page has a {{tl|Reflist}} template but no footnotes defined? This was briefly discussed at ] ({{ping|Boleyn|Broc}}) and I think also recently at one of the village pumps. &ndash;&#8239;]&nbsp;<small>(])</small> 08:40, 21 April 2024 (UTC)
I'm pretty sure it used to be the case that <nowiki>{{reflist|refs=...}}</nowiki>, when editing and previewing the references section, would format and display the references in the previous window, even though they are unused within that section. In the past few weeks, that has stopped happening, making it difficult to edit references sections formatted in this way. The template itself hasn't changed in years. Anyone have an idea how this might have changed and how to get the preview of references back again? —] (]) 23:15, 16 February 2020 (UTC)
:The text would have to be different to {{tl|no footnotes}} because there would be no way of telling if there is {{tq|a list of references, related reading, or external links}}. Given that the only information you have is that that no footnotes are properly defined (there could even be an attempt at inline references, not using a <nowiki><ref></nowiki> tag), I think the most it could say would be something like: {{Ambox
:WMDE has been working on Extension:Cite code recently. They may have broken reference previews in a different section functionality. I'd recommend going straight to Phabricator. --] (]) 23:24, 16 February 2020 (UTC)
| name =
::https://phabricator.wikimedia.org/T245376 —] (]) 23:35, 16 February 2020 (UTC)
| subst =

| small = left
== Limitations - original draft ==
| type = style

| image = ]
I added a "limitations" section, but its contents should probably be moved to the documentation for '''<nowiki><references /></nowiki>''' with a link here.
| issue = This article doesn't appear to have any footnotes.

| talk =
There is a bug (example ) that makes references not work right if they are in lists under certain circumstances. It needed to be documented.
| fix = ''].''

| date =
This bug tends to rear its ugly head if a block of WikiCode that contains something like
| cat =
:<nowiki>:<references /></nowiki>
| all =
or
}}
:<nowiki>:{{reflist talk}}</nowiki>
:It could also create an appropriate maintenance category, which would either be useful or worrying depending on the amount of previously unknown unsourced articles it reveals. -- ]-'']'' -- 09:33, 21 April 2024 (UTC)
is later surrounded by {{tl|collapse top}}/{{tl|collapse bottom}}, {{tl|archive top}}/{{tl|archive bottom}}, or something similar. This happens routinely in places like ] or ] discussions.
::That looks good, yeah. Also a good idea with a tracking category. My major question is whether it's possible to detect the lack of <ref> tags within the template. &ndash;&#8239;]&nbsp;<small>(])</small> 09:35, 21 April 2024 (UTC)


This example does NOT use :, *, or #. It is what things should look like:
<pre>
<nowiki>
<div style="background-color: #F3F9FF;">
Discussion with footnote<ref group=test>Doe, John, ''Example book''</ref>
:<references group=test />
More discussion here.
</div>
</nowiki>
</pre>

renders incorrectly as

<div style="background-color: #F3F9FF;">
Discussion with footnote<ref group=test>Doe, John, ''Example book''</ref>
:<references group=test />
More discussion here.
</div>



but if you remove the colon before <nowiki><references /></nowiki> it renders correctly as
<div style="background-color: #F3F9FF;">
Discussion with footnote<ref group=test>Doe, John, ''Example book''</ref>
<references group=test />
More discussion here.
</div>

]/<small><small>(])/(])</small></small> 18:13, 27 February 2020 (UTC)

{{od}}
But the bug demonstrably doesn't apply to {{tl|reflist}}:
<pre>
<div style="background-color: #F3FFF9;">
Discussion with footnote<ref group=test>Doe, John, ''Example book''</ref>
:{{reflist|group=test}}
More discussion here.
</div>
</pre>
renders correctly as:
<div style="background-color: #F3FFF9;">
Discussion with footnote<ref group=test>Doe, John, ''Example book''</ref>
:{{reflist|group=test}}
More discussion here.
</div>
--] (]) 18:54, 27 February 2020 (UTC)

*Please ignore the above and use the more detailed section below unfortunately, I can't use {{tl|archive top}} and {{tl|archive bottom}} due to the very bug being discussed. ]/<small><small>(])/(])</small></small> 19:37, 27 February 2020 (UTC)

== Limitations ==

I added a "limitations" section, but its contents should probably be moved to the documentation for '''<nowiki><references /></nowiki>''' with a link here.

There is a bug (example ) that makes references not work right if they are in lists under certain circumstances. It needed to be documented.

This bug tends to rear its ugly head if a block of WikiCode that contains something like
:<nowiki>:<references /></nowiki>
or
:<nowiki>:{{reflist talk}}</nowiki>
is later surrounded by {{tl|collapse top}}/{{tl|collapse bottom}}, {{tl|archive top}}/{{tl|archive bottom}}, or something similar. This happens routinely in places like ] or ] discussions.


This example does NOT use :, *, or #. It is what things should look like:
<pre>
<nowiki>
<div style="background-color: #F3F9FF;">
Discussion with footnote.<ref group=test>Doe, John, ''Example book''</ref> This should be highlighted.
<references group=test />
More discussion here. This should also be in the highlighted section.
</div>
More discussion after the close of the HTML '''div''' tag. This should be below the highlighted section.
</nowiki>
</pre>


renders correctly as

<div style="background-color: #F3F9FF;">
Discussion with footnote.<ref group=test>Doe, John, ''Example book''</ref> This should be highlighted.
<references group=test />
More discussion here. This should also be in the highlighted section.
</div>
More discussion after the close of the HTML '''div''' tag. This should be below the highlighted section.


Putting a colon before {{tq|<nowiki><references group=test /></nowiki>}} so it reads {{tq|<nowiki>:<references group=test /></nowiki>}} renders incorrectly as

<div style="background-color: #F3F9FF;">
Discussion with footnote.<ref group=test>Doe, John, ''Example book''</ref> This should be highlighted.
:<references group=test />
More discussion here. This should also be in the highlighted section.
</div>
More discussion after the close of the HTML '''div''' tag. This should be below the highlighted section.


Notice that the reference is not numbered and the highlighted HTML '''<nowiki>div</nowiki>''' seems to "close" early.


The same behavior is observed with {{tq|<nowiki>{{#tag:references||group=test}}</nowiki>}}, which is what is used by templates like {{tl|reflist}}:

<pre>
<nowiki>
<div style="background-color: #F3F9FF;">
Discussion with footnote.<ref group=test>Doe, John, ''Example book''</ref> This should be highlighted.
:{{#tag:references||group=test}}
More discussion here. This should also be in the highlighted section.
</div>
More discussion after the close of the HTML '''div''' tag. This should be below the highlighted section.
</nowiki>
</pre>


renders incorrectly, the same as above:


== The 'talkpage' parameter? ==
<div style="background-color: #F3F9FF;">
Discussion with footnote.<ref group=test>Doe, John, ''Example book''</ref> This should be highlighted.
:{{#tag:references||group=test}}
More discussion here. This should also be in the highlighted section.
</div>
More discussion after the close of the HTML '''div''' tag. This should be below the highlighted section.


Hi, I have noticed {{code|<nowiki>{{reflist|talkpage}}</nowiki>}} at ] (specifically, here: ]). It seems to do similar thing to {{code|<nowiki>{{reflist-talk}}</nowiki>}} but without the 'References' title and a bordering frame. Could someone, please, describe the <code>talkpage</code> parameter at the template's doc page? --] (]) 08:41, 3 July 2024 (UTC)
:The first positional parameter controls column width. Since <code>talkpage</code> is not a number specifying number or width of columns, {{tlx|reflist}} simply ignores <code>talkpage</code> and renders as it would in a mainspace article. Probably a typo.
:—] (]) 10:31, 3 July 2024 (UTC)
::OK, so I inserted {{code|<nowiki>{{reflist-talk}}</nowiki>}} there. --] (]) 13:12, 4 July 2024 (UTC)


== Default Height ==
Interestingly, adding {{para|responsive|1}} to #tag so it reads {{tq|<nowiki>{{#tag:references||group=test|responsive=1}}</nowiki>}} seems to work. {{para|responsive|1}} is used by {{tl|reflist}} and other templates when {{para|colwidth}} is used and possibly under certain other circumstances. It is used by {{tl|Template reference list}} in all circumstances.


Hello, I come from the French Misplaced Pages.
<pre>
<nowiki>
<div style="background-color: #F3F9FF;">
Discussion with footnote.<ref group=test>Doe, John, ''Example book''</ref> This should be highlighted.
{{#tag:references||group=test|responsive=1}}
More discussion here. This should also be in the highlighted section.
</div>
More discussion after the close of the HTML '''div''' tag. This should be below the highlighted section.
</nowiki>
</pre>


On our Misplaced Pages, when references are numerous, we use a ] template (numerous references) which has the particularity, which ] has not, to be adjustable in height, with 30em as the default.


You can see this in action on our ] page, which has as many (if not more) references as your ] page, but thanks to the maximum height of the references, it has better ergonomics.
renders as


For this to happen, I noticed that our reference list has an additional <code>div</code> around the <code>ol</code> element, and of course some additional CSS.
<div style="background-color: #F3F9FF;">
Discussion with footnote.<ref group=test>Doe, John, ''Example book''</ref> This should be highlighted.
{{#tag:references||group=test|responsive=1}}
More discussion here. This should also be in the highlighted section.
</div>
More discussion after the close of the HTML '''div''' tag. This should be below the highlighted section.


I think it could be interesting to add this to your Misplaced Pages as well.


— ] (] &#124; ]) 08:43, 29 August 2024 (UTC)
Takeaway: Put <nowiki><references /></nowiki> and the templates that call on lines without :, #, or *, since what you write today may be put into an HTML '''div''' tomorrow if it is archived or collapsed. 19:37, 27 February 2020 (UTC)
: Our ] says not to use such scrolling lists due to concerns over accessibility. ]] 10:44, 29 August 2024 (UTC)
::Ho okay, yeah ok, ] explicitly ask not to use scrolling list on reference lists. — ] (] &#124; ]) 10:39, 30 August 2024 (UTC)

Latest revision as of 13:25, 5 December 2024

Template:Reflist is permanently protected from editing because it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit protected}} to notify an administrator to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.

Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases.


This page is used for general discussion about Template:Reflist, a Misplaced Pages references template, which is used on many articles. For help on adding a reference to an article, see Misplaced Pages:Citing sources, or ask for help on that article's talk page.
This template does not require a rating on Misplaced Pages's content assessment scale.
It is of interest to the following WikiProjects:
WikiProject iconBooks: Reference works
WikiProject iconThis template is within the scope of WikiProject Books. To participate in the project, please visit its page, where you can join the project and discuss matters related to book articles. To use this banner, please refer to the documentation. For guidelines on this template's usage, see its documentation.BooksWikipedia:WikiProject BooksTemplate:WikiProject BooksBook
Taskforce icon
This template is supported by the Reference works task force.
Text and/or other creative content from this version of Template:Reflist was copied or moved into incubator:Template:Wp/nod/Reflist with this edit. The former page's history now serves to provide attribution for that content in the latter page, and it must not be deleted as long as the latter page exists.

Archiving icon
Archives

Index 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
11, 12, 13, 14, 15, 16, 17, 18, 19, 20
21, 22, 23, 24, 25, 26, 27, 28, 29, 30
31, 32, 33, 34



This page has archives. Sections older than 60 days may be automatically archived by Lowercase sigmabot III when more than 4 sections are present.

Update default width to 25 em?

The new aggressively-wide side margins in the default skin (Vector 2022) mean that on most monitors at 100% zoom reflist always renders as single column This is one of my greatest frustrations with the skin, and I don't think I'm alone (as @CJDOS: noted above) :).

While we continue to push for less enthusiastic sidebar width and padding, the default reflist column width could also be revised so that refs are two columns in some "standard browser size" configuration. Say a 1200px wide window, running the default skin, with sidebars open? I believe 25em would work. – SJ + 13:18, 19 September 2023 (UTC)

I'd rather see us fix Vector 2022 locally with CSS than change this reflist default that has worked well for many years. I can easily get two reflist columns on my 13-inch laptop screen in Vector 2022 with CSS that fixes the absurd whitespace, leaving me with 69em of space for content (it is 94em in Vector 2010 on the same screen). – Jonesey95 (talk) 14:12, 19 September 2023 (UTC)
I agree. It should be V22's job not to break things that have worked for years, not our job to work around their changes. RoySmith (talk) 14:44, 19 September 2023 (UTC)
This "I don't like the defaults so I'm going to prevent anyone else from making them more usable" approach is...not constructive. —David Eppstein (talk) 15:10, 19 September 2023 (UTC)
Let me rephrase. I have no problems with this being fixed in the V22 CSS loaded by enwiki, but as somebody who doesn't use V22, I don't want to see changes to the template which will affect what I see to accomodate V22. RoySmith (talk) 15:21, 19 September 2023 (UTC)
Maybe there is some magical CSS way to make the default 23 or 25 em for Vector 2022 and keep it at 30 em for Vector 2010. – Jonesey95 (talk) 15:38, 19 September 2023 (UTC)
I'll ask in Phab, (update: asked in T347109) this is reasonably specific and may get a response there. – SJ + 15:18, 21 September 2023 (UTC)
You can use different values for vector and Vector 2022.
To target styles based on skins, use a selector such as body.skin-vector-legacy .myClass; specification of the body element is required and must be followed by a descendant combinator (i.e. the space). Other classes on the body or html elements may be targeted in the same manner. See phab:T197617. 1.32+
(mw:Extension:TemplateStyles#Usage)
feature queries can also be used in modern browsers. Jdlrobson (talk) 18:29, 27 September 2023 (UTC)
(ec)If we want to make this change, we would presumably also want it implemented in <references /> since there are plenty of articles with <references /> instead of {{reflist}} as the default widths are the same at the moment. Mike Christie (talk - contribs - library) 14:15, 19 September 2023 (UTC)
Yeah I think this would be the better way. I'm someone who uses the <references /> tag instead of {{reflist}} in my articles. SWinxy (talk) 15:02, 20 September 2023 (UTC)
Ah, i don't know how the tag is implemented -- does reflist inherit default width from it? – SJ + 15:18, 21 September 2023 (UTC)
Reflist inherits the width from the CSS of the skin being used, which is 30em in Vector 2010. When a value is put into the template, then it overrides the skin to make the width something else. SWinxy (talk) 18:23, 21 September 2023 (UTC)
Hmm, if that is true, why do we have Template:Reflist/styles.css? Did you mean to say that <references /> inherits the width from the skin's CSS? – Jonesey95 (talk) 21:47, 21 September 2023 (UTC)
JK I was wrong. It's not set in the skin, the default column width seems to actually be pulled from the Cite extension: ext.cite.styles.css. The templatestyles does the whole list-style-type thing, and .reflist-columns-2/.reflist-columns-2 are for backwards-compatibility, but the rest don't seem to need to be there. SWinxy (talk) 23:43, 21 September 2023 (UTC)

Phab ticket about this, please comment there: T347109 – SJ + 02:18, 22 September 2023 (UTC)

I use Vector 2022 with the sidebar, and I get two columns of references on both my PC and iPad. Out of curiosity I tried switching the iPad to portrait mode, and got a single column of references. Switching the ToC to the top menu with the Vector 2022 "hide" button gave me two references even in portrait mode. This strikes me as a more natural answer than changing global css. Is there some reason why those with monitors too narrow for two columns of references would not want to set Vector 2022 to have the ToC hidden in the top button? Mike Christie (talk - contribs - library) 12:02, 22 September 2023 (UTC)

I assume you're leaving the toolbar menu closed as well?
Logged out users get the TOC expanded by default, which is convenient. And they won't know that there's an option for references to be two columns. The question for them is whether they are likely to be using a persistent Tools toolbar. Logged-in users are more likely to want to access the tools regularly as well.
The experience varies a lot with combinations of window size and default font size. Many readers use windows between 1200 px and 1680 px with font zoom between 100% and 133%. Here are a few width break points for when refs become two-column (Mac/FF):
  • main/toc open, tools hidden: 1100 | 1210 | 1310 | 1420 px: 100|110|120|133% zoom
  • main/toc and tools open: 1350 | 1500 | 1620 | >1680 px : 100|110|120|133% zoom
The body column has become a second-class citizen, and is the only one whose width is variable, so sidebars that feel normal at a 1800px-wide window at 100% zoom are quite big at 1280px. As a result, what feels like a significant range of normal use cases have body columns that fall between 50em and 60em in width, hence this request.
This is in addition to, not as a replacement for, requests to reduce sidebar margins and horizontal whitespace across the board, including the "bonus" 60px margin that gets added to the main menu at a window width of 1200px / 100%. – SJ + 19:57, 23 September 2023 (UTC)

Making empty reflists useful

Would it be feasible to display a message—probably something similar to {{no footnotes}}—when a page has a {{Reflist}} template but no footnotes defined? This was briefly discussed at Wikipedia_talk:WikiProject_Unreferenced_articles#Empty references sections? (@Boleyn and Broc:) and I think also recently at one of the village pumps. – Joe (talk) 08:40, 21 April 2024 (UTC)

The text would have to be different to {{no footnotes}} because there would be no way of telling if there is a list of references, related reading, or external links. Given that the only information you have is that that no footnotes are properly defined (there could even be an attempt at inline references, not using a <ref> tag), I think the most it could say would be something like:
This article doesn't appear to have any footnotes. Learn how to add inline citations.
It could also create an appropriate maintenance category, which would either be useful or worrying depending on the amount of previously unknown unsourced articles it reveals. -- D'n'B-t -- 09:33, 21 April 2024 (UTC)
That looks good, yeah. Also a good idea with a tracking category. My major question is whether it's possible to detect the lack of <ref> tags within the template. – Joe (talk) 09:35, 21 April 2024 (UTC)

The 'talkpage' parameter?

Hi, I have noticed {{reflist|talkpage}} at Talk:Conway base 13 function (specifically, here: Special:permalink/1212662718#Almost everything maps to 0?). It seems to do similar thing to {{reflist-talk}} but without the 'References' title and a bordering frame. Could someone, please, describe the talkpage parameter at the template's doc page? --CiaPan (talk) 08:41, 3 July 2024 (UTC)

The first positional parameter controls column width. Since talkpage is not a number specifying number or width of columns, {{reflist}} simply ignores talkpage and renders as it would in a mainspace article. Probably a typo.
Trappist the monk (talk) 10:31, 3 July 2024 (UTC)
OK, so I inserted {{reflist-talk}} there. --CiaPan (talk) 13:12, 4 July 2024 (UTC)

Default Height

Hello, I come from the French Misplaced Pages.

On our Misplaced Pages, when references are numerous, we use a Références nombreuses template (numerous references) which has the particularity, which your Reflist has not, to be adjustable in height, with 30em as the default.

You can see this in action on our Kate Bush page, which has as many (if not more) references as your Kate Bush page, but thanks to the maximum height of the references, it has better ergonomics.

For this to happen, I noticed that our reference list has an additional div around the ol element, and of course some additional CSS.

I think it could be interesting to add this to your Misplaced Pages as well.

Peshigome :3 (Blah Blah | Contributions) 08:43, 29 August 2024 (UTC)

Our manual of style says not to use such scrolling lists due to concerns over accessibility. Anomie 10:44, 29 August 2024 (UTC)
Ho okay, yeah ok, Scrolling list explicitly ask not to use scrolling list on reference lists. — Peshigome :3 (Blah Blah | Contributions) 10:39, 30 August 2024 (UTC)
Categories: