Template:TOCnestright/doc

__NOWYSIWYG__

Description
 is used beside tall right located graphics structures like infoboxes and is similar in purpose and use to. Unlike the latter, it does not hog the right margin as do so many page elements in this project, but instead shares the center upper space allowing text to wrap below and to the left, thus eliminating a lot of ugly white space on many pages while still keeping compliance with WP:MOS recommendations.

In addition, it allows an easy limitation  to be applied to the width of a TOC when a few section title lines are "overlong". (It is not recommended that wrapping be forced when the majority of lines are being wrapped, so check what you apply in several zoom in and zoom out settings — using [CTRL][+] and [CTRL][-] on most modern browsers.

Usage
This template takes a number of optional formating arguments: Structure control:

prependinside and appendinside
parameters and  differ from  and  :as the later two are outside the control structure established by the controlling  nested content. In practice, before=otherright floating element will present the TOC adjacent to the left side of the otherright floating element, such as an image or infobox.

/>
 * prependinside
 * prependinside or prependimage, will line up the TOC with the given element, both in a right floated column&mdash;in other words, the TOC will appear UNDER the other element, whereas with before, it appears to its left and so more centered on a page.
 * It has the same technical complication including images as that which happens in image boxes because of the way they are rendered in a browser, requiring a couple of extra minor steps; this is the same complication as is experienced with infobox templates which require a separate caption and image definition.   ]]


 * Prependinside example

Example 1: Non-image element...

replaced by:

| prependimage  = Image:Something Rhinish.png

| prependcaption =This a picture of the Rhine river taken at night.

| prependwidth  =240px

| maxwidth      =250px }}

which boils down to:

Cut-N-paste template, infobox style:

OR for an image or two:
 * prependwidth = mandatory
 * maxwidth     =
 * prependinside =
 * where the prependinside element is a Pre-sized Table or text block, not images!!!


 * maxwidth     =
 * prependimage = bare image name, without  and
 * prependwidth = mandatory
 * prependcaption=

Strictly optional (bounding table controls) |prependpadding= | prependmargin=

Note: NOT SPECIFYING a maxwidth value is NOT a good idea. Using either appendinside or prependinside feature. The width of the template is auto unless this parameter is specified and consequently the picture fills the whole screen as it has no upper boundary so far as your browser is concerned.

appendinside

 * appendinside puts the image lined up within the TOC box... ( example where-ever other HTML rendering locates that box element. It is thus used for images primarily on many "history " pages where there is a long tall infobox preventing images from appearing high up and one wants those, but do not want text to be sandwiched between floating HTML elements, as per the WP:MOS. This use presents nicely, and keeps all text left, but allows small images to be beside of infoboxes, just like the TOCnestright floats on pages using no frills.


 * Other examples: See Example page, and the three pictures stacked in Schwarzburg-Rudolstadt. (Code below, displayed effect must be seen on the page)

Three images inside-after example
Schwarzburg-Rudolstadt was a small state in Germany, in the present-day state of Thuringia formed in a resettlement of Schwarzburg dynasty family lands, with its capital (and the Guenther (Günther) family seat) originally in the castle at Schwarzburg, but later, for most of its existence as a polity having the capital at the larger town of Rudolstadt. It was founded after the partition of the schwarzburger possessions in 1599. A sovereign county under the Holy Roman Empire until 1711, in that year it became a principality under the same entity.
 * Excerpt from three-stack:({http://en.wikipedia.org/w/index.php?title=Schwarzburg-Rudolstadt&oldid=224775886text (20:16, Saturday 12 July 2008 (UTC)], manually wrapped for readability) above and below included)

In late 1918, and during the German Revolution, resulting in the fall of all the German monarchies, the prince abdicated, and in 1920 the former principality became a part of the new state of Thuringia. Schwarzburg-Rudolstadt had an area of and a population of 97,000 (1905).

otherstyle

 * The |otherstyle= parameter is for any element not controlled currently by the style line as listed below. It might be used for example to define a color, a line-height, or other such HTML parameter.


 * Actual code...

Tips

 * left is only used inside a table element, to place the TOC, under a page's first image. It looks a little better used that way.
 * maxwidth is the most useful format parameter. Setting between 180-220px usually does a nice job of wrapping long section titles within the displayed TOC for the most likely viewing zoom-in/zoom-out settings used by a typical viewer.
 * prependinside allows another structure to float part-right ABOVE the TOC as well, such as a small image.
 * appendinside allows another structure to float part-right BELOW the TOC as well, such as a small image.