This is the talk page for discussing improvements to the Table page. |
|
Archives: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10Auto-archiving period: 6 months ![]() |
![]() | This help page does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||
|
![]() | The contentious topics procedure applies to this page. This page relates to the English Wikipedia Manual of Style and article titles policy, a contentious topic. Editors are advised to familiarise themselves with the contentious topics procedures before editing this page. Editors who repeatedly or seriously fail to adhere to the purpose of Wikipedia, any expected standards of behaviour, or any normal editorial process may be blocked or restricted by an administrator. |
![]() | Material from Help:Table was split to Help:Tables and locations on 9 December 2023 from this version. The former page's history now serves to provide attribution for that content in the latter page, and it must not be deleted so long as the latter page exists. Please leave this template in place to link the article histories and preserve this attribution. |
Note: You can also ask questions here: Help desk. Teahouse. Village pump (technical).
@Rafael Ronen: Answered at this forum thread: Help talk:Sortable tables#Not jumping in order. --Timeshifter (talk) 18:52, 17 January 2025 (UTC)
This help page has a lot of useful information, but after years of slow, organic accretion and lack of attention to the overall structure, it has become bloated and somewhat incoherent, with content about related subtopics spread all over the place. I am doing a re-org without rewriting much of anything (except brief portions for clarity), mostly just putting like stuff with like, and renaming existing section headers to better represent what they are really about, and occasionally adding new section headers for better organization clarity.
For example: formerly, we had almost nothing about row operations, except for the brief, desultory section in § Row operations (rev. 1271174926). There was already a fair amount about rows on the page, you just couldn't find it; or if you did, it was not near other stuff about rows, so all very haphazard. Now, section § Row operations has six subsections, almost all of it just by juggling things around. In a couple of cases, subsections were added there by duplicating text already in the (horribly bloated) § Pipe syntax tutorial section, but that redundancy is temporary, and will get de-duped or trimmed after the basic re-org to rationalize the page is mostly completed. Thanks, Mathglot (talk) 23:14, 24 January 2025 (UTC)
Done with re-org for now. Hardly anything new was added, with the exception of a brief intro sentence to a few sections that didn't have one, and one new subsection: § Link directly to a row, which is covered (barely) on some other page, but needs a brief explanation here. The major piece left untackled is the § Colors in tables section, which, like other sections before it, is rather bloated and covers a bunch of different scopes; that is still t.b.d.; also, section § Wikicode syntax tutorial still has a lot of bloat and needs work. But this looks a lot cleaner now, and is easier to navigate to content that was always there before, but buried. Mathglot (talk) 01:39, 25 January 2025 (UTC)
The § Scope subsection of section § Wikicode syntax tutorial probably needs a rewrite. The problems include misleading claims, a mix of row and column explanations, and poorly done examples. For example, this is the first sentence of § Scope:
Column headers are identified by
! scope="col" |
instead of|
.
Most people think of column headers as the descriptive label sitting in a row above the first data row, and may be highlighted by bold font and shaded background, or other highlight style. By that definition, this first sentence is inaccurate, because column headers can be as simple as this:
{| class=wikitable |+ Table caption ! Last !! First !! Street |- | Doe || John || Main |}
Last | First | Street |
---|---|---|
Doe | John | Main |
I will explain the bug with rowspan:
Below is a table coded to be 4 rows, where "Col B-Rows 3,4" should be shown as 2 rows. However, the third row isn't appearing. I have two tables here, the first to show what the current code outputs, and the second to show what table should like, albeit with an extra column.
Col A - Rows 1,2,3 | Col B - Row 1 |
Col B - Row 2 | |
Col B - Rows 3,4 | |
Col A - Row 4 |
Col A - Rows 1,2,3 | Col B - Row 1 | Col C - Row 1 |
Col B - Row 2 | Col C - Row 2 | |
Col B - Rows 3,4 | Col C - Row 3 | |
Col A - Row 4 | Col C - Row 4 |
Here is the same bug occurring but with colspan:
Col A - Row 1 | Col B,C,D - Row 1 | ||
Col A,B - Row 2 | Col C - Row 2 | Col D - Row 2 |
Col A - Row 1 | Col B,C,D - Row 1 | ||
Col A,B - Row 2 | Col C - Row 2 | Col D - Row 2 | |
Col A - Row 3 | Col B - Row 3 | Col C - Row 3 | Col D - Row 3 |
I don't know the coding behind "rowspan" and "colspan", but what I do know is that there is an error in its visual output that is causing a row or column to disappear. Spesh531(talk, contrib., ext.) 06:00, 4 February 2025 (UTC)
border-collapse:separate
declaration:Col A - Rows 1,2,3 | Col B - Row 1 |
Col B - Row 2 | |
Col B - Rows 3,4 | |
Col A - Row 4 |
Col A - Rows 1,2,3 with lots and lots of content. | Col B - Row 1 |
Col B - Row 2 | |
Col B - Rows 3,4 with lots and lots of content. | |
Col A - Row 4 |
rowspan=6
. --Redrose64 🌹 (talk) 20:33, 4 February 2025 (UTC)
Team | City | Stadium | Capacity | Manager |
---|---|---|---|---|
Kansas City Cowboys | Kansas City, Missouri | <br>
Association Park<br> |
Unknown | Dave Rowe |
Sam Barkley | ||||
Bill Watkins | ||||
Exposition Park* | 4,000* |
{| class="wikitable" |+ | rowspan="3" |'''Col A - Rows 1,2,3''' |'''Col B - Row 1''' |''Col C - Row 1'' |- |'''Col B - Row 2''' |''Col C - Row 2'' |- | rowspan="2" |'''Col B - Rows 3,4''' |''Col C - Row 3'' |- |'''Col A - Row 4''' |''Col C - Row 4'' |}
Col A - Rows 1,2,3 | Col B - Row 1 | Col C - Row 1 |
Col B - Row 2 | Col C - Row 2 | |
Col B - Rows 3,4 | Col C - Row 3 | |
Col A - Row 4 | Col C - Row 4 |
+---------+-------------+--------+ | Row 1 | Row 1 | Row 1 | +---------+-------------+--------+ | Row 2 | Row 2 | Row 2 | +---------+-------------+--------+ | Row 3 | | Row 3 | | | Merged cell | | +---------+ row 3 and 4 +--------+ | Row 4 | | Row 4 | +---------+-------------+--------+
<pre>...</pre>
, and I can generate the table for you. But you should really try it yourself; start by enabling the visual editor, if it isn't already, in your Preferences > Editing (check the box Enable the visual editor), and follow the tips at Help:Introduction to tables with VisualEditor/2. It's pretty intuitive, but if you get stuck lmk if you need assistance. Mathglot (talk) 20:44, 5 February 2025 (UTC)Timeshifter, I think my change to collapse nested divs into one div with both class and style (which is definitely a legal construct) had undesirable knock-on effects in some of the table examples, which is why I self-reverted, with a mind to look at it again down the road. I notice you undid my revert, reestablishing my original change, but I think it causes problems: have a look at section § Float table left or right – I think the examples are very broken now; compare that with rev. 1274480787 of 15:51, 7 February 2025. Probably you should self-revert as well; at this point that would mean rolling it back to rev. 1274480787. I can see that you have made three other changes since then (diff), but those could easily be reinstated after a rollback. Mathglot (talk) 21:36, 7 February 2025 (UTC)
I had to laugh, when I looked over at Help:Table/Advanced, and read the part you linked to that just got moved over to Help:Table/Advanced#Other table syntax (diff), including the part that lists the pros and cons of HTML tables versus wikicode syntax. In the row labeled "Pros" for the cell in the Wiki-pipe column (who named it that?) it lists "easy to read", and "easy to write"; I nearly had coffee coming out of my nose.
I searched back in Help:Table to see when that was first added, and it goes all the way back to the first version of Help:Table in revision 12094880 of 19:00, 20 September 2004 by Wilz (talk · contribs). Seriously made me want to add a laughing man gif or something, right after that part. Yah, it's so easy to read and write, that we only have twenty-six Help and style pages with intricate explanations of features and styles explaining how to do it, including how to have your pipe, and smoke it, too! Lol! But twenty years on and some 2500 edits by 600+ editors later explaining how easy it is, maybe it's time to change that. (On a more serious note, I've been thinking about a way to vastly reduce the size and number of help pages, but it's more of a long-term thing and not something that affects anything we are doing; I have to mull about it for "a while".)
Oh, I forgot to mention the funniest part: if you edit the § Overview section in that revision and look at that table—yep, you guessed it: it's coded in HTML. Guess it was too complex for "wiki-pipe syntax". Hope you enjoyed the chuckle. Mathglot (talk) 02:54, 9 February 2025 (UTC)
For translation, tables with identical header cells could be translated once and used several times in the ddme article.
For example, in List of Dongfeng vehicles, there are several tables with the same headers (structure).
One could use :
{| class="wikitable sortable translatable"
In the Voyah table, for the First header could stablish that:
Image, in the Spanish version is "Imagen"
For the second, Name(s) is "Nombre(s)" and so on for the full header structure of tehe table.
So, the second time this table structure is used for the M-Hero table, Imagen is automatically translated to Imagen (in the Spanish Wikipedia), Names to Nombres an so on.
This spares a lot of writer effort. 158.172.131.78 (talk) 21:41, 23 February 2025 (UTC)
Can someone correct the first table at 2025 Greenlandic general election? Can't figure out how to fix it. Thanks. Semsûrî (talk) 17:25, 2 March 2025 (UTC)
rowspan=
and colspan=
attributes. The fix is to remove them all, and then add in only those that are necessary; which turned out to be just one - the one for the "Party" column heading. --Redrose64 🌹 (talk) 20:27, 2 March 2025 (UTC)
The rates in the US tables are per 100,000. So I want to convert the rates in the Europe table below from "per million" to "per 100,000". That means moving the decimal place one place to the left. Can someone do this for me?
Better yet can someone explain exactly how to do it step by step in Libreoffice Calc. I will put this info in a section in Help:Table/Advanced or another table help page.
Location | Year | Females | Males | Total |
---|---|---|---|---|
![]() |
2022 | 18 | 65 | 42 |
![]() |
2020 | 7 | 34 | 21 |
![]() |
2022 | 1 | 8 | 4 |
![]() |
2022 | 13 | 71 | 42 |
![]() |
2022 | 3 | 13 | 8 |
![]() |
2022 | 6 | 12 | 9 |
![]() |
2021 | 19 | 60 | 40 |
![]() |
2022 | 34 | 155 | 95 |
![]() |
2022 | 33 | 106 | 70 |
![]() |
2016 | 3 | 16 | 9 |
![]() |
2022 | 10 | 49 | 30 |
![]() |
2020 | 10 | 58 | 34 |
![]() |
2021 | 3 | 9 | 6 |
![]() |
2020 | 64 | 130 | 97 |
![]() |
2022 | 2 | 13 | 8 |
![]() |
2022 | 12 | 96 | 53 |
![]() |
2022 | 10 | 86 | 47 |
![]() |
2022 | 5 | 31 | 18 |
![]() |
2020 | 6 | 43 | 26 |
![]() |
2022 | 13 | 40 | 26 |
![]() |
2022 | 53 | 118 | 86 |
![]() |
2021 | 5 | 11 | 8 |
![]() |
2021 | 4 | 19 | 11 |
![]() |
2022 | 1 | 3 | 2 |
![]() |
2021 | 3 | 12 | 7 |
![]() |
2022 | 16 | 74 | 46 |
![]() |
2021 | 7 | 34 | 21 |
![]() |
2022 | 35 | 102 | 70 |
![]() |
2022 | 1 | 7 | 4 |
References
--Timeshifter (talk) 14:57, 6 March 2025 (UTC)
See the rarely used templates listed in this doc:
There are better methods here:
I am leaving a note here in hopes some others will look and see if I am correct.
If so, someone with more time than me might put the templates up for deletion here:
I suggested the same here: