[texhax] \hangindent inside vertical mode

Heiko Oberdiek heiko.oberdiek at googlemail.com
Wed Sep 28 20:13:00 CEST 2011

On Thu, Sep 29, 2011 at 01:14:33AM +1000, VAFA KHALIGHI wrote:

> \hangindent-20pt \hangafter0 does not work inside a \vbox. Is the reason
> explained somewhere in The TeXBook?

Why do you think it does not work?
Because -20pt is less than 0pt, the lines will be indented at
the right side by 20pt.

The TeXbook, "Chapter 14: How TeX Breaks Paragraphs into Lines":

| The command `\hangindent=<dimen>' specifies a so-called hanging
| indentation, and the command `\hangafter=<number>' specifies the duration
| of that indentation. Let x and n be the respective values of \hangindent
| and \hangafter, and let h be the value of \hsize; then if n >= 0, hanging
| indentation will occur on lines n + 1, n + 2, ... of the paragraph, but if
| n < 0 it will occur on lines 1, 2, ... , |n|. Hanging indentation means
| that lines will be of width h - |x| instead of their normal width h; if
| x >= 0, the lines will be indented at the left margin, otherwise they will
| be indented at the right margin. For example, the "dangerous bend"
| paragraphs of this manual have a hanging indentation of 3 picas that lasts
| for two lines; they were set with \hangindent=3pc and
| \hangafter=-2.

Yours sincerely
  Heiko Oberdiek

More information about the texhax mailing list