Margins and indents

The horizontal position of text is controlled by two mapping properties:

  • a margin affects the position of a whole paragraph.

  • an indent affects the position of a single line.

Together with the column width, margins and indents constrain the maximum amount of content that can be allocated to each line.

Margins and indents are set in the Paragraph tab of a mapping.


Each paragraph has a left and right margin property. These properties define the left and right edges of the paragraph relative to the edges of the column. The left and right margins are set independently.

A margin property is set for a block and applies to all paragraphs contained in that block. The effective margin value for a paragraph is the sum of all of the margin properties for the enclosing blocks.

A margin property can be set to a negative value to move the paragraph edge closer to the column edge. However, this cannot be used to make the effective value negative, since that would allow the content to go outside the column. An attempt to do this will cause a typesetting error.

A mapping can reset the margins to ignore margin settings from enclosing blocks. This affects both the left and right margins.

The following diagram illustrates this process:

The column boundaries are shown by the thick-bordered rectangle. The mappings for the elements shown do the following:

  • The block mapping sets left and right margins.

  • The leftmargin mapping sets a left margin. The margin value is added to the one set by the block mapping.

  • The rightmargin mapping sets a right margin.

  • The negative mapping sets negative values for both the left and right margins. This has the effect of allowing the content to move outside the boundaries defined by the block mapping.

  • The reset mapping resets the margins without setting any margins of its own. This allows the content to extend to the full column width.

  • The resetmargin mapping also resets the margins and sets its own left and right margins.

First/left indent

The first/left indent only applies to the first line of a paragraph and affects its starting point relative to the effective left margin. The indent value is set by the block that contains the paragraph. It is not affected by the settings of other blocks.

A positive value moves the starting point of the line to the left. A negative value moves the starting point to the right. This produces what is often called an “outdent” or “hanging indent”. The following diagram illustrates this:

Last/right indent

The last/right indent applies to the last line of the paragraph. Unlike the first/left indent, it is always a positive value, and specifies how far the last line can extend beyond the effective right margin.

This is often used in conjunction with an effect that uses all the available space on the last line, such as a space or dot fill. In the following illustration the mapping for section sets a last/right indent, and a dot fill is generated by the mapping for page.