Template:Hanging indent inherit/doc

Usage
This template applies a hanging indent as a division &lt;div> (default) or as paragraph &lt;p>, and it inherits any previously applied formatting (the margins are generally the most important in this context, as they will "accumulate"). It acts as a wrapper around text, rather than embedding the text into the template. Consequently the template needs to be closed with div end to function properly.

Note that this template functions differently from hanging indent

Parameters

 * : indentation (in em) of first line relative to the other lines of the paragraph (i.e. CSS "text-indent")
 * : indentation (in em) of the whole paragraph (i.e. the CSS "margin-left")

Note: indentation is measured rightwards. To "reverse indent" (make a line stick out to the left), enter a negative value.

Defaults: hanging indent

 * First line 0em from relative position
 * Remaining lines indented further 2em:
 * Remaining lines indented further 2em:


 * Output

Example2: two indented paragraphs

 * For each paragraph:
 * First line 0em from relative position
 * Remaining lines indented further 2em


 * Output

Example 3: two differently indented paragraphs

 * First paragraph:
 * Start 2em from relative, and remaining lines indented 2em
 * Second paragraph
 * Start 1em from relative, and remaining lines indented 1em


 * Output

Example 4: traditionally indented paragraphs
This template can be used for traditional first line indent. However this is not recommended, as this is more efficiently done using a CSS style such as "text-indent:2em".


 * first line 2em, paragraph -2 relative
 * first line 1em, paragraph -1 relative


 * Output