Template:TOC nest right/doc

This template is used beside tall right located graphics structures like infoboxes and is similar in purpose and use to TOC right. 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&mdash;using [CTRL][+] and [CTRL][-] on most modern browsers. This is good practice when adding any graphic element to a page... for older readers tend to use larger effective fonts (and so zoom in), and younger readers &mdash; withbetter eye-sight!&mdash; most often use smaller fonts (or equivalently, zoom settings) (some of these 'types' (sic)... may even reach their fourties and experience the sad difference' nature imposes themselves! But probably not!) and of course, some people like wikipedia editors may bounce to and fro in between!''

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. 
 * in general, it is best and is easiest to use an inline comment, AND KEEP the old image link together:
 * [[Image:Something.png|thumb|right|250px|This a picture...]] becomes instead:
 * thumb|right|250px|This a picture of the [[Rhine|Rhine river taken at night.-- >  ]]


 * 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.


 * If prependinside is not specified with one or the other of prependwidth or prependcaption, the template assumes you are a total ignorant fool and tries (and succeeds!) to display nothing at all. (Thus ensuring someone will read the above! )
 * there are other prepend only in scope parameters that are purely optional, and adjust width, margins, padding and so forth (other common HTML box element parameters). These are probably uneeded,... well,... but just in case!

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.


 * The most useful format parameter is maxwidth. 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.