Template talk:Table

Latest comment: 4 years ago by Ahecht in topic How about a |ranked option…

Bolt text

edit

Is it possible to give a style command to un-bold/de-bold the text within, or am I making a mistake which makes the bundled text come out bold? Nagelfar (talk) 19:36, 19 June 2016 (UTC)Reply

@Nagelfar: If you use | instead of ! your text won't be bold. See Help:TABLE. --Ahecht (TALK
PAGE
) 19:59, 20 June 2016 (UTC)Reply
Rows Data
Row 1 Datum1
Row 2 Datum2
Thank you v. much for that information Ahect. Regards, _Nagelfar (talk) 20:01, 20 June 2016 (UTC)Reply

Bug or undocumented feature?

edit

If quotes are used in introducing a class name for a wikitable then it will not have any effect unless one leaves a space after the name. e.g.

{| class="wikitable floatright”

fails to float a table to the right. This seems entirely against all user interface principles.

I'm not sure where to report this. Is this a Wikipedia or a Mediawiki issue?

You will notice that the example on the page for this template carefully leaves a space.Chris55 (talk) 11:17, 5 August 2016 (UTC)Reply

@Chris55: The problem with your example is that you are using instead of " to close your class statement. {| class="wikitable floatright" has the desired effect. As a side note, this isn't really a general forum for help with tables, for that you'd probably want to use Help talk:Table. --Ahecht (TALK
PAGE
) 14:51, 5 August 2016 (UTC)Reply
You're right - I wonder where that came from! I did notice it in the text above but assumed it had been slanted by something in the system. But having checked I agree that's the problem. (I didn't even know how to enter that on my keyboard till I looked it up now.) Sorry - this wasn't a help request but it's not an error. Chris55 (talk) 15:02, 5 August 2016 (UTC)Reply

Column width bug with rotated headings (solved)

edit

In principle table columns with very short contents could be narrowed significantly by rotated or vertical headings. Whether or not this might be a good idea, the wikitable template does not work properly with rotated text: the column is too wide, it seems to be calculated according to the length of the text if unrotated. Also, the height of the header row ignores the height of the rotated text. Vertical text seems OK. An example (based on S.M.A.R.T.; live example that will display correctly when the bug is fixed [but it's not a bug, read on]):

Normal:

ID Hex Attribute name Better Critical Description
01 0x01 Read Error Rate
 
× If the description is long, and there are many columns, a column with long text will tend to have fields that are very narrow and take up a lot of vertical space. I won't waste space here with very long text; here is one example, not nearly as extreme as others that I've seen (table in subsection Known ATA S.M.A.R.T. attributes).

One way to narrow the columns:
†: Better ‡: Critical

ID Hex Attribute name Description
01 0x01 Read Error Rate
 
× If the description is long, and there are many columns, a column with long text will tend to have fields that are very narrow and take up a lot of vertical space. I won't waste space here with very long text; here is one example, not nearly as extreme as others that I've seen (table in subsection Known ATA S.M.A.R.T. attributes).

Vertical (works OK):

ID Hex Attribute name Better Critical Description
01 0x01 Read Error Rate
 
× If the description is long, and there are many columns, a column with long text will tend to have fields that are very narrow and take up a lot of vertical space. I won't waste space here with very long text; here is one example, not nearly as extreme as others that I've seen (table in subsection Known ATA S.M.A.R.T. attributes).

Rotated 90° (error; but this will display correctly when the bug is fixed [but it's not a bug, read on]):

ID Hex Attribute name Better Critical Description
01 0x01 Read Error Rate
 
× If the description is long, and there are many columns, a column with long text will tend to have fields that are very narrow and take up a lot of vertical space. I won't waste space here with very long text; here is one example, not nearly as extreme as others that I've seen (table in subsection Known ATA S.M.A.R.T. attributes).

THE FOLLOWING IS CLEARLY WRONG! (until the error is fixed [but it's not a bug, read on])
The same error demonstrated with longer text, that makes the column unnecessarily wider:

ID Hex Attribute name Better Critical_attribute? Description
01 0x01 Read Error Rate
 
× If the description is long, and there are many columns, a column with long text will tend to have fields that are very narrow and take up a lot of vertical space. I won't waste space here with very long text; here is one example, not nearly as extreme as others that I've seen (table in subsection Known ATA S.M.A.R.T. attributes).

I had made this comment in early 2016 in the now deleted {{wikitable}} Talk.

[Added 18 Jan 17] I'm not sure if this applies to {{Table}}, {{Rotate text}}, or their interaction. I've added a brief comment, linking here, to Template talk:Rotate text#Table column width bug with rotated headings. [Made comment red 4 Jul 17]

Pol098 (talk) 12:35, 17 January 2017 (UTC)Reply

@Pol098: This issue has nothing to do with {{Table}}, so I responded at Template talk:Rotate text. --Ahecht (TALK
PAGE
) 19:58, 16 May 2018 (UTC)Reply

@Ahecht: For anybody who wants to use headings rotated 90 degrees to allow narrower table columns, the method suggested by Ahecht works. I have copied it in "monkey see, monkey do" fashion as I don't know the details of using these parameters. Additional "width:9px" parameter is needed to prevent the sort direction arrow symbols from overlapping the captions. This is what you get with
! <span style="-ms-writing-mode: tb-rl; -webkit-writing-mode: tb-rl; -webkit-writing-mode: vertical-rl; writing-mode: vertical-rl; white-space: nowrap; width:9px">Critical_attribute?</span>:

ID Hex Attribute name Better Critical_attribute? Description
01 0x01 Read Error Rate
 
× If the description is long, and there are many columns, a column with long text will tend to have fields that are very narrow and take up a lot of vertical space. I won't waste space here with very long text; here is one example, not nearly as extreme as others that I've seen (table in subsection Known ATA S.M.A.R.T. attributes).

Pol098 (talk) 16:41, 17 May 2018 (UTC)Reply

I believe this is what you're looking for:
ID Hex Attribute name
Better
Critical attribute?
Description
01 0x01 Read Error Rate
 
× If the description is long, and there are many columns, a column with long text will tend to have fields that are very narrow and take up a lot of vertical space. I won't waste space here with very long text; here is one example, not nearly as extreme as others that I've seen (table in subsection Known ATA S.M.A.R.T. attributes).
Guarapiranga (talk) 00:48, 15 November 2019 (UTC)Reply

Another "bug or feature"?

edit

I have a table that doesn't have row headers, but if I try to have a leftmost cell have rowspan>0, the cell is getting formatted like a row header (ie, bold and centered text and grey background). Any ideas? --uKER (talk) 19:57, 24 July 2017 (UTC)Reply

@UKER: I know this was an old question, but I'm not able to reproduce that bug (see the example below). Do you have a particular table in mind?
Rows DataA
DataB
Row 1 Datum1A
Datum1B
Row 2 Datum2A
Datum2B
--Ahecht (TALK
PAGE
) 20:06, 16 May 2018 (UTC)Reply
I sure don't remember what table this was about. It was probably corrected along the way. Cheers. --uKER (talk) 20:13, 16 May 2018 (UTC)Reply

Recent change broke the template

edit

Finding the template was no longer working, I reverted the latest change to it and it is now working again. -- DeFacto (talk). 07:47, 6 June 2018 (UTC)Reply

Auto table, filterable table column

edit

Is there any way of generating a table from a Wikidata query?

It would be useful to have some columns filterable on contents. For instance, if the rows represent things that all belong to a subset of categories, one column might be called "Categories belonged to", and contain a short comma-separated list. One could choose to see only the rows of things belonging to category X. What would be the best way to do this? HLHJ (talk) 04:36, 5 August 2019 (UTC)Reply

Yes, there is, HLHJ. Guarapiranga (talk) 21:48, 11 November 2019 (UTC)Reply

How about a |ranked option…

edit

… using {{Static column begin}}? Guarapiranga (talk) 14:27, 20 November 2019 (UTC)Reply

I would want this template to be standalone, and a ranked option would require adding a {{end}} template elsewhere in the table. --Ahecht (TALK
PAGE
) 15:24, 13 February 2020 (UTC)Reply