Template talk:TOC left

(Redirected from Template talk:TOC left/doc)
Latest comment: 10 years ago by Sardanaphalus in topic Protected edit request on 27 May 2014

Discussion

edit

Couple of comments. I think a floating left TOC is an excellent addition to Wikipedia - in fact, I think articles should really only use floating TOCs, either right or left, except in the case of very short TOCs when the standard wiki TOC is best. Of course, the ban-TOC-templates cabal is likely to outlaw both, so all talk of preferences will likely be moot.

Two observations. In IE 6.0.2 1024x768 WinXP, with the Monobook skin, there is a thin white line below the left TOC, as seen on your discussion page. In Firefox 1.0.4, with the Classic skin, the text next to the TOC directly abuts the table, which is very ugly.

Solutions?--219.93.174.109 6 July 2005 13:57 (UTC)

I adjusted the format to match what you would get with a floated image. They use classes "thumb tleft", but those classes can't be used directly for this template. I pulled out the CSS elements which produce the desired effect. —Mike July 7, 2005 07:17 (UTC)
This template should only be used when absolutely necessary, i.e. pages with very long TOCs. People who want to see the TOC float left all the time should edit their user CSS. Do not start putting this hack on every page you come across. ed g2stalk 14:16, 4 August 2005 (UTC)Reply

table vs div

edit

Something wrong with the div version? Looked exactly the same to me. ¦ Reisio 23:12, 2005 August 8 (UTC)

Then why did you change it to begin with? I did find in one case (back when these floating TOCs were first created) that using a div could create unusual results with how the table of contents was formatted. But I don't know if it was a minor 'bug' that may have disappeared in subsequent wiki software releases. What the table with its current formatting is designed to do is to create a space between it and the regular column of text, like what you would see with an image, as opposed to what you usually see with infoboxes. There is a difference when viewed with the monobook skin. —Mike 23:44, August 8, 2005 (UTC)

Then why did you change it to begin with?

Because the data is not tabular. See also Wikipedia:How_to_use_tables.

There is a difference when viewed with the monobook skin.

What difference? I've already said it looked exactly the same to me.

¦ Reisio 03:39, 2005 August 9 (UTC)

True, it isn't data, but the software itself uses a table for the TOC. View the HTML source code for any page with a regular TOC and you will see a table surrounding the TOC list. For the difference between using the div instead of a table, see Image:TOCright line.PNG for an example (using the right floated TOC). The border under the heading touches the left side of the TOC. Using the table to pad the TOC creates a space between them as happens with floated images. This doesn't happen with other skins because they don't have borders under the major headings. —Mike 00:50, August 10, 2005 (UTC)

True, it isn't data, but the software itself uses a table for the TOC.

This is irrelevant (except for the fact that that, too, should be changed).

For the difference between using the div instead of a table, see Image:TOCright line.PNG

...how about the difference for TOCleft (not TOCright) - that's what this discussion is for, after all.

¦ Reisio 03:13, 2005 August 10 (UTC)

The difference is the same for right or left—but obviously the padding is on the opposite sides. —Mike 17:55, August 10, 2005 (UTC)

Screenshot? ¦ Reisio 18:34, 2005 August 10 (UTC)

Distracting blank spaces

edit

Formatting that encases the framed table of contents in text, in just the way a framed map or image is enclosed within the text, is now available: {{TOCleft}} in the HTML does the job.

Blank space opposite the ToC, besides being unsightly and distracting, suggests that there is a major break in the continuity of the text, which may not be the case. Blanks in page layout are voids and they have meanings to the experienced reader. The space between paragraphs marks a brief pause between separate blocks of thought. A deeper space, in a well-printed text, signifies a more complete shift in thought: note the spaces that separate sub-headings in Wikipedia articles.

A handful of thoughtless and aggressive Wikipedians revert the "TOCleft" format at will. A particularly aggressive de-formatter is User:Ed g2s

The reader may want to compare versions at the various Page histories. --Wetman 20:32, 9 August 2005 (UTC)Reply

Template criticisms

edit

I dislike this template, and disagree with the above claims of the standard TOC being "unsightly and distracting". The lead section should not flow into the next section like chapters in a novel; it should be a summary of the article, able to stand on its own (see Wikipedia:Lead section), encouraging the reader to use the TOC that follows to expand upon a subject covered in the intro. I believe the white space is necessary to draw focus to the TOC in this manner.

There are also accessibility problems with having a floating TOC. Unlike images, which can be scaled down or edited to fit inline with the text, the width of the TOC cannot be specified, and its text does not wrap. In many articles, the TOC can be rather wide, due to long section titles and sub-sub-subsections. As an example, a past version of the Nintendo DS article [1] used the TOCleft template, which halved the width of the main text at 1152x864, and made it nearly unreadable at 800x600. Contrary to popular belief, many Internet users still own 15-inch monitors. --Poiuyt Man talk 06:46, 31 August 2005 (UTC)Reply

The Nintendo DS article is still readable (and undoubtedly people at 800x600 are used to squashed-looking pages). It's no matter, however - if you think the TOC is too wide to float left...just don't float it left. There is, as ever, no substitute for human comprehension. (Incidentally, most of the headers for Nintendo DS look quite verbose.) It'd be really great if the left column was removed from the default look - it wastes a lot of space. ¦ Reisio 21:20, 2005 August 31 (UTC)

Adjustable size variable?

edit

I think it'd add to the page's quality if you can adjust the size, especially ehere the template wraps text based on it exceeding the width on marginally. I think to install an esoteric function allowing the person who puts the template on the page to select the width in pixels would be a great help. I could do it, but I want to know what people would think of it if I did. I won't go to the trouble if you guys are all going to hate it. --lincalinca 09:18, 6 January 2007 (UTC)Reply

The width parameter was already added back in June. It just remains undocumented. --Dispenser 17:17, 6 January 2007 (UTC)Reply

Can't see the interwikis

edit

Or are the interwikis in this not displaying? –Xoid 17:15, 4 February 2007 (UTC)Reply

Other wikis

edit

Where could I find the actual doc file for TOCleft to include on my own wiki? —Preceding unsigned comment added by Ishmayl (talkcontribs) 12:54, April 18, 2007

Documentation on templates are now stored on the /doc subpage. This scheme allows the template to be modified while the base protected and prevents reduces the number of transclution. —Dispenser 03:03, 19 April 2007 (UTC)Reply

Examples of good uses of this template

edit

The Help referenced in the documentation for this template includes the rather vague, "A floating TOC should be used when it is beneficial to the layout of the article, or when the default TOC gets in the way of other elements." I'm wondering what particular benefits are intended here? Can anyone point me to pages that they think exemplify where the use of this template is beneficial? VoluntarySlave (talk) 22:15, 27 July 2008 (UTC)Reply

Please add a protected template

edit

{{editprotected}} Please add a {{Pp-template}} template to this page. It Is Me Here (talk) 13:28, 27 October 2008 (UTC)Reply

  Done. Cheers. --MZMcBride (talk) 02:25, 28 October 2008 (UTC)Reply
Thanks! It Is Me Here (talk) 09:49, 28 October 2008 (UTC)Reply

Update documentation

edit

"See John Vanbrugh for a live example." This sentence probably needs removing from the Usage section of documentation, or better yet a different example identifying. From what I can tell, that article uses no TOC placement template. Ma®©usBritish{chat} 03:22, 20 June 2013 (UTC)Reply

Protected edit request on 27 May 2014

edit

Please replace the current version with the following, where the parameter top may be used to suppress the margin/padding usually included above the TOC:

<includeonly><div style="clear:{{{clear|left}}};float:left;width:{{{width|{{{1|auto}}}}}};padding:0.5em 1.4em 0.8em 0;background:none;margin-bottom:0.5em;{{#if:{{{top|}}}|margin-top:0;padding-top:0;}}" {{#if:{{{limit|}}}|class="toclimit-{{{limit}}}"}}>__TOC__</div></includeonly><noinclude>{{Documentation}}</noinclude>

This is useful for those occasions when any margin/padding-top might look odd and/or move the TOC out of alignment with other content, e.g. when it appears at the very top of a div/page/etc. The code above also enables the TOC's appearance on {{TOC left}} page to be as described in the documentation. If/when this update is made, I'll amend the documentation accordingly. Sardanaphalus (talk) 12:13, 27 May 2014 (UTC)Reply

PS {{TOC left/sandbox}} currently consists of the above. Perhaps apply the same to {{TOC right}}?
  Note: I support changing it to the current sandbox version with the internal spacing for readability and using the top parameter as I feel that if someone takes the time to specify a top parameter, they probably expect what they set to be what is reflected. — {{U|Technical 13}} (etc) 14:18, 27 May 2014 (UTC)Reply
Why is <includeonly>...</includeonly> necessary? --Redrose64 (talk) 16:39, 27 May 2014 (UTC)Reply
To make a TOC appear on the Template:TOC left page as described. Sardanaphalus (talk) 01:03, 28 May 2014 (UTC)Reply
But the <includeonly>...</includeonly> prevents it from appearing. Compare that part of Template:TOC left which is above the documentation with the corresponding part of Template:TOC left/sandbox - in the first, the TOC is visible, in the second it's not. --Redrose64 (talk) 07:33, 28 May 2014 (UTC)Reply
I have removed the includeonly from the sandbox and made a few other tweaks for a cleaner diff with the live version. Is this good to go? — Martin (MSGJ · talk) 09:28, 28 May 2014 (UTC)Reply
I think so, although I've just amended it to make it easier to read the code from style to style. (There should be no change as regards function and options.) The includeonly also removed the empty, unused space on the template page – in this case, not that much, but if the example TOC were taller... Sardanaphalus (talk) 14:29, 28 May 2014 (UTC)Reply
I just made this small edit because the |0 part would never be triggered. --Redrose64 (talk) 15:47, 28 May 2014 (UTC)Reply

  Done. Please update the documentation page. — Martin (MSGJ · talk) 13:17, 2 June 2014 (UTC)Reply