Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a2259d307c3cc526

Jump to content

Template talk:Refbegin

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
Latest comment: 25 days ago by Jonesey95 in topic Parsoid compatibility

Default columns?

[edit]

Given that Template:Reflist now defaults to 30em, should this template behave in the same manner? My instincts say it should. DonIago (talk) 13:24, 19 September 2017 (UTC)Reply

  • Not the same use case—while reflist is used for all kinds of citations, usually on the shorter side, refbegin is most often used for bibliography sections, which are rarely broken into columns. czar 15:09, 19 September 2017 (UTC)Reply

Ordered list rather than unordered list

[edit]

I'm not sure why the current practice is to use an unordered list, but almost always the lists employing these templates have been ordered (usually by e.g. last name). Could we at-least add support in the CSS for an ordered list inside of these templates? --Izno (talk) 16:07, 30 June 2019 (UTC)Reply

But all the other reference lists are unordered chaotic jumbles, so readers might become disoriented if they find one that's ordered. EEng 18:20, 30 June 2019 (UTC)Reply

Contradictory info about columns needs clarifying

[edit]

This whole page is extremely unclear about what is ACTUALLY correct, number of columns or width of columns. Number is given as the default, not width, but then called "deprecated" near the bottom of the page?  Preceding unsigned comment added by Snizzbut (talkcontribs) 22:52, 4 October 2019 (UTC)Reply

Regarding this point and the section above (#Default_columns?), there is confusion about how the columns are used and whether the format matches that of {{reflist}}. Currently, the documentation says
If an integer n is supplied as the first parameter, the template will display the bibliography/references list in n columns. This may be useful for compact display for a lengthy list, and matches also the optional capability of {{reflist}} to display output in multiple columns.
However, at {{reflist}}, this column format has been deprecated:
The syntax {{Reflist|2}} (for example), which specifies two columns of equal width regardless of the available display width, is deprecated (and is disabled for mobile view). When you use 1 the template gives you a single column while 2 will pretend you specified 30em. When using higher column counts, it will pretend you specified 25em.
I don't know if this column format is deprecated in the sense of reflist (turned into a width parameter) or used in another way here, and I certainly don't understand what the preferred usage is, but surely the documentation should be updated. kennethaw88talk 18:06, 20 February 2020 (UTC)Reply
I have made some edits which remove an indication of the 'n' way of doing things. Izno (talk) 18:27, 8 April 2021 (UTC)Reply

Yes, the column count format is and does need to be deprecated more fully. --Izno (talk) 05:53, 8 January 2021 (UTC)Reply

This search identifies the majority of these pages. We could maybe add a category for a bot to work on to remove this. I think that's how {{reflist}} eliminated the numeric pattern. (Unlike with reflist, we can consider leaving the unnamed first parameter to continue to serve as a colwidth as it does today when the template finds non-numerics in the parameter.) --Izno (talk) 01:08, 3 February 2021 (UTC)Reply

Depreciated parameter 2

[edit]

Per Template:Reflist#Example, would I be correct in assuming that {{Refbegin|2}} is depreciated, defaulting to 30em as if |30em had been specified? If so, then Template:Refbegin's documentation should be updated.  CJDOS, Sheridan, OR (talk) 12:51, 13 April 2023 (UTC)Reply

Removing column count?

[edit]

Based on the discussions above, I'll update the documentation to remove instructions for adding a quantity of columns. I wonder if it would be acceptable to prevent the template from outputting column counts? This seems easier than writing a bot to fix them all. The vast majority of specified quantities are just "2". Here's a breakdown:

2 15,000
3 600
4 30
5 13
6 0

Rather than continuing to implement this, the template could just give "30em" which is the default for references. Or 30em for 2 columns, and 20em for higher. Or even ignore the counts altogether. This would fix any issues with editors specifying a fixed number of columns. Rjjiii (talk) 05:03, 27 August 2023 (UTC)Reply

Perhaps disregard the above post. After some digging, the template is widely used for non-ref purposes as a small text plus number of columns template. See this legend separated into columns on Schizophrenia for example. Rjjiii (talk) 18:32, 29 August 2023 (UTC)Reply
Ugh, that is a misuse of this template. The template contains various CSS classes and styles that are applicable only to references. It should not be used for other purposes. That legend should use {{div col}} or one of the other column-generating template families listed in the documentation for that template. – Jonesey95 (talk) 23:38, 29 August 2023 (UTC)Reply
I've cleaned out the 3-5 column usages. Using Izno's search syntax I don't see any more pages left. I've also converted a bunch of misuse (thanks for the {{div col}} link). There are still the 15,000 pages left using refbegin|2. I tried modifying the sandbox version of the template to give "30em" when a number of columns is requested. Rjjiii(talk) 03:12, 15 September 2023 (UTC)Reply
Making notes as I go: I've cleaned all of the {{reflist|1}} usage down to {{reflist}} and have made the sandbox treat {{reflist|1}} as if the 1 was not there. 2 or greater as a column count will creates 30em wide columns. Rjjiii (talk) 06:16, 4 October 2023 (UTC)Reply

Template-protected edit request on 7 October 2023

[edit]

Change the template to the sandbox version. The live version of the template permits defining the column width or quantity. The sandbox version only permits defining the column width and provides a fallback where any quantity of columns will result in columns at 30em (the default for references). The current default of 1 full-width column is still present, and a quantity of "1" will also give that default of 1 full-width column. Per talk page discussions, this is more flexible and matches the updates for {{reflist}}. Additionally, I have converted all uses of large quantities of columns (3–6) in articles to either narrow columns or a more appropriate template. Once all 2-column formatting is updated, the fallback can likely be removed. Thanks for your time, Rjjiii (talk) 00:05, 8 October 2023 (UTC) Rjjiii (talk) 00:05, 8 October 2023 (UTC)Reply

 Completed. P.I. Ellsworth, ed. put'er there 12:55, 8 October 2023 (UTC)Reply

Placement of the template

[edit]

This question relates to an issue raised by UndercoverClassicist at the featured-article nomination for the article on Rupert Bruce-Mitford. That article includes a "Publications" section with many citation templates, which comes before the "References" and "Bibliography" sections. Because some of Bruce-Mitford's works are cited in the article, this means that the short cites in the References section sometimes link upwards to a work in Publications, and sometimes downwards to a work in Bibliography. This, in turn, generates errors for many users using this script.

The suggestion presented during the review is the bookend the Publications section with {{refbegin}} and {{refend}} templates. Could anyone please let me know if there are any issues in doing so? (Given that the template page uses "Published Works" sections as an example use case, it would seem that this is fine). Assuming there are no issues, and given that the Publications section is itself broken into subsections (Books/Articles/Chapters/Reviews/Other), should the templates be used once (above the header for Books and at the end of Other), or should they be used five times (below each header and at the end of each section)? Thanks, --Usernameunique (talk) 20:30, 13 January 2026 (UTC)Reply

@Usernameunique, this template is unrelated to your concern about the links being flagged by the user script. It applies stylistic changes, and does not affect the links or section headers. Rjjiii (talk) 22:34, 13 January 2026 (UTC)Reply
Check the categories to see if there are any actual harv errors in the article. If there are not, and the links from the short footnotes to the full citation templates work, you are fine. False positives in user scripts, if that is what people are seeing, should not cause trouble with FA nominations. – Jonesey95 (talk) 00:00, 14 January 2026 (UTC)Reply

Parsoid compatibility

[edit]

We (Content Transform Team) are doing some visualdiff testing to ensure that pages work well with parsoid instead of legacy parser. Because there are some cases where parsoid wraps dom elements with sections, CSS for `Refbegin` won't render correctly for parsoid. For example:

https://en.wikipedia.org/wiki/Henry_VIII?useparsoid=0#Biographical

https://en.wikipedia.org/wiki/Henry_VIII?useparsoid=1#Biographical

I have a proposed change for Template:Refbegin/styles.css here so the CSS also matches the sections: https://phabricator.wikimedia.org/P94279. I have tested the change locally (via devtools) and looks like it fixes the issue. JGiannelos (WMF) (talk) 03:32, 19 June 2026 (UTC)Reply

Please make your changes to Template:Refbegin/sandbox/styles.css and then use the testcases page, or a User sandbox page, to demonstrate the changes. – Jonesey95 (talk) 16:49, 21 June 2026 (UTC)Reply
I updated the sandbox version with this diff: https://en.wikipedia.org/w/index.php?title=Template%3ARefbegin%2Fsandbox%2Fstyles.css&diff=1360795369&oldid=1332273284
The testpage is here:
https://en.wikipedia.org/w/index.php?title=User:JGiannelos_(WMF)/refbegin-css&useparsoid=1
https://en.wikipedia.org/w/index.php?title=User:JGiannelos_(WMF)/refbegin-css&useparsoid=0 JGiannelos (WMF) (talk) 17:29, 23 June 2026 (UTC)Reply
The incompatibility of CSS with parsoid output can be reproduced here:
https://en.wikipedia.org/w/index.php?title=User:JGiannelos_(WMF)/refbegin-css-parsoid-issue&useparsoid=0
https://en.wikipedia.org/w/index.php?title=User:JGiannelos_(WMF)/refbegin-css-parsoid-issue&useparsoid=1
Same wikitext with above but using Template:Refbegin instead of Template:Refbegin/sandbox JGiannelos (WMF) (talk) 17:32, 23 June 2026 (UTC)Reply
Hi @Jonesey95 just following up on my previous message in case it slipped through. Happy to provide more details on the CSS change and the test pages. ~2026-37578-13 (talk) 15:08, 30 June 2026 (UTC)Reply
I will apply these changes later today. SSastry (WMF) (talk) 16:58, 1 July 2026 (UTC)Reply
I have made this update. Thanks for linking to test pages. – Jonesey95 (talk) 12:50, 3 July 2026 (UTC)Reply