PP/Hanging Indent

From DPWiki
< PP
Jump to navigation Jump to search

Some texts have paragraphs formatted with a hanging indent. That is, the first line of the paragraph is against the left margin while the rest of the paragraph is indented from the left margin.

This page is the starting point for advice on how to format hanging indents during post processing.

Paragraph Markup

CSS

The mark up is relatively simple.

<p class="hanging2">Text of paragraph</p>

This is supported by a class you must add to the CSS header.

.hanging2 {padding-left: 2em;
         text-indent: -2em;
          }

The padding-left indents the whole paragraph while the text-indent acts as an override for the first line and pulls it back to the left margin. Generally the values would be the same. Notice the values are in em. They should not be px as that violates DP and PG guidelines.

Text

Guiguts can help formatting of text so you don't wear out your space bar.

See the hanging indent example here: https://www.pgdp.net/wiki/PPTools/Guiguts/Rewrapping#Block_Quote_Indent_and_Margins

Table Markup

CSS

Here is a fancier version of the CSS code for use in tables:

td.hanging2 {              /* hanging indent */
  vertical-align: middle;
  text-align: justify;
  text-indent: -1em;
  border: solid black thin; /* delete if not desired */
  padding-left: 1em;
  padding-right: .25em;
  padding-bottom: .25em;
  padding-top: .25em;
}

Text

Some info on formatting text in Guiguts: https://www.pgdp.net/wiki/PPTools/Guiguts/Guiguts_Manual/Text_Menu#Table_with_Long_Text_Passages