Help talk:Section
![]() | Wikipedia Help NA‑class High‑importance | |||||||||
|
|
|
This page has archives. Sections older than 365 days may be automatically archived by Lowercase sigmabot III. |
== TOC -> ToC The acronym for Table of Contents (i.e., TOC), is correctly written as ToC and not as TOC, since we write the word of non-capitalized, the acronym should reflect that, as is true for all other acronyms of such sort.
Why is the TOC automatically hidden if the page has less than 4 sections?
The TOC is currently hidden (or not even generated) for pages with less than 4 sections. Does anyone know why this is the case? I.e. what is the reasoning behind this decision?
A related question has come up on https://phabricator.wikimedia.org/T315862. In Vector 2022 should we show the TOC for pages with less than 4 sections (and if so, what about articles with 2 sections, or 1)? In order to help us evaluate this question I've updated our prototype to show the TOC regardless of how many sections are in the article. Here are three examples of the TOC being shown on articles with less than 4 sections (note there is an additional "Introduction" section which is automatically added to the TOC for all articles in Vector 2022):
3 sections
https://di-collapsible-menus.web.app/Johnny_Miqueiro
https://di-collapsible-menus.web.app/Hurkett
https://di-collapsible-menus.web.app/Polycystine
2 sections
https://di-collapsible-menus.web.app/Yusuke_Yachi
https://di-collapsible-menus.web.app/Henning_Elbirk
https://di-collapsible-menus.web.app/Norway_Ski_Club
1 section
https://di-collapsible-menus.web.app/Rhytiphora_vicaria
https://di-collapsible-menus.web.app/Hecyra_marmorata
https://di-collapsible-menus.web.app/Freedom_List
AHollender (WMF) (talk) 20:37, 23 August 2022 (UTC)
- As far as I can tell, it has been this way since at least ~2003. The earliest reference I can easily find is in Wikipedia:Village pump/August 2003 archive 2#Table of contents.
- I'm not sure why "4 or more" was chosen as the cutoff point. Quiddity (WMF) (talk) 21:08, 23 August 2022 (UTC)
- I also don't know why 4 was chosen. It's hard coded and cannot be configured as far as I know. The TOC is not generated with less than 4 (unless
__FORCETOC__
or__TOC__
is used), so there is no hidden TOC which can be unhidden with CSS or other methods. Except in Vector 2022, the TOC is by default shown right before the first heading so a TOC for one heading would be pointless. PrimeHunter (talk) 22:56, 23 August 2022 (UTC)
- I also don't know why 4 was chosen. It's hard coded and cannot be configured as far as I know. The TOC is not generated with less than 4 (unless
- We picked 3 as in practice English Wikipedia content with three sections or fewer was very short at the time and we didn't want to waste user's screen space. I think it would be reasonable to re-visit this decision, but an awful lot of (mostly non-content) pages have been crafted assuming the current behaviour. Jdforrester (WMF) (talk) 09:00, 24 August 2022 (UTC)
- Four has been the only possibility for so long and there are so many MediaWiki wikis that I don't think a new value should be hard coded. The way to handle it today would be a configuration setting where Wikimedia wikis can make a Phab request to change the default, which should probably remain at four. I haven't found a feature request in Phab searches. A more fancy solution could give the number as a function of page size but it would probably just create confusion if TOC's come and go while most users don't even know the magic words to force or hide a TOC. PrimeHunter (talk) 16:32, 24 August 2022 (UTC)
- One of the problems with not displaying the TOC, in case it is not clear from the above, is that if readers have the TOC pinned in a sidebar on the left side of the page, it creates a two-column (or three-column, with the new page tools sidebar) appearance. If the reader then clicks through to a page with only a couple of sections, the content suddenly jumps to the left, which is unsettling and undesirable. It would be helpful to have some sort of CSS or preference to say "Always show the table of contents, even if it's empty". – Jonesey95 (talk) 17:41, 24 January 2023 (UTC)
- Four has been the only possibility for so long and there are so many MediaWiki wikis that I don't think a new value should be hard coded. The way to handle it today would be a configuration setting where Wikimedia wikis can make a Phab request to change the default, which should probably remain at four. I haven't found a feature request in Phab searches. A more fancy solution could give the number as a function of page size but it would probably just create confusion if TOC's come and go while most users don't even know the magic words to force or hide a TOC. PrimeHunter (talk) 16:32, 24 August 2022 (UTC)
Looking for a mini-TOC for each of an article's sections
Hello, a long time ago I came across an article that I can't remember, and within it there was a smaller version of the TOC inside one section of the article. This smaller TOC only showed the subsections inside this one section; it didn't show anything outside of it, anything belonging to other sections. I would like to know what template it was, I've been looking for it since yesterday and can't seem to find it. Many thanks in advance! Snoteleks (talk) 14:29, 29 September 2022 (UTC)
- @Snoteleks: There is no automatic way to do it as far as I know. I made {{Table TOC}} (undocumented}} which can make a horizontal TOC by manually writing the name of each link whether it's to a section or other anchor. The template name hints the main purpose of linking to anchors in long tables. Example with two sections here:
- If the section names change then the code must be updated manually. If the section names are letters then {{Compact TOC}} can be used. {{TOCMonths}} works for months. PrimeHunter (talk) 15:26, 29 September 2022 (UTC)
TOC has vanished
Since recently no articles seem to have a TOC. The HTML for a page contains:
<meta property="mw:PageProp/toc" />
where I'd expect to see a TOC, but no content. — Preceding unsigned comment added by 2.27.171.241 (talk) 13:23, 10 March 2023 (UTC)
Today (25th March 2023), the table of contents has reappeared! On desktop it appears in a separate scrolling section to the left of the document. I hope it is here to stay. — Preceding unsigned comment added by 2.27.171.241 (talk) 16:02, 25 March 2023 (UTC)
- I'm not seeing TOCs on any Wikipedia pages anymore - why? This is a degradation, IMHO. Thanks. Sullidav (talk) 13:23, 8 August 2023 (UTC)
- @Sullidav: I see a TOC at the top of this page. However, this is not the page to report such problems (it is the talk page for discussing improvements to the page Help:Section), you should first try WP:HD, where I see an existing thread Wikipedia:Help desk#Missing TOC; failing that, try WP:VPT. In both cases, you should state which pages are affected, which skin and browser you are using, and whether there is any difference when you are logged out. --Redrose64 🌹 (talk) 14:30, 8 August 2023 (UTC)
- @Redrose64 - Thanks. I do not see a TOC at the top of this page, so it's evidently some kind of browser/interface error. Glad it's not a Wikipedia change. Sullidav (talk) 19:24, 8 August 2023 (UTC)
- Follow-up - I switched skins to an older one as that discussion suggests, but it looks like the issue was that I was used to seeing TOC at top of the page, not where it is now, in the left column below the Wikipedia menu. I think that's the only issue - that TOCs moved to a sort of hidden place. Sullidav (talk) 19:32, 8 August 2023 (UTC)
- So you were using Vector-2022 skin, which is a pile of crap. But this is still the wrong venue to report such problems. --Redrose64 🌹 (talk) 19:35, 8 August 2023 (UTC)
- Follow-up - I switched skins to an older one as that discussion suggests, but it looks like the issue was that I was used to seeing TOC at top of the page, not where it is now, in the left column below the Wikipedia menu. I think that's the only issue - that TOCs moved to a sort of hidden place. Sullidav (talk) 19:32, 8 August 2023 (UTC)
- @Redrose64 - Thanks. I do not see a TOC at the top of this page, so it's evidently some kind of browser/interface error. Glad it's not a Wikipedia change. Sullidav (talk) 19:24, 8 August 2023 (UTC)
- @Sullidav: I see a TOC at the top of this page. However, this is not the page to report such problems (it is the talk page for discussing improvements to the page Help:Section), you should first try WP:HD, where I see an existing thread Wikipedia:Help desk#Missing TOC; failing that, try WP:VPT. In both cases, you should state which pages are affected, which skin and browser you are using, and whether there is any difference when you are logged out. --Redrose64 🌹 (talk) 14:30, 8 August 2023 (UTC)
Section title dispute
User:BurgeoningContracting disputes my renaming sections titled "People" to "People and fictional characters". This disagreement began at User:Clarityfiend#Carlton - People and is now here for third-party resolution, as we are deadlocked. Clarityfiend (talk) 05:13, 17 March 2023 (UTC)
Moved to Wikipedia talk:Manual of Style#Section title dispute. Clarityfiend (talk) 05:24, 17 March 2023 (UTC)
Configurability options for table of contents and Vector 2022 issues
The issue of configurability options for table of contents is being tracked in Phabricator. Mathglot (talk) 06:35, 21 April 2023 (UTC)
Semi-protected edit request on 7 June 2023
![]() | This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Change the image of a table of contents to a new image of a contents sidebar in Vector 2022 style BennBluee (talk) 18:44, 7 June 2023 (UTC)
In progress: An editor is implementing the requested edit. Tollens (talk) 21:03, 7 June 2023 (UTC)
Done Tollens (talk) 21:15, 7 June 2023 (UTC)