[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Hanging paragraphs in MM

From: Tadziu Hoffmann
Subject: Re: [Groff] Hanging paragraphs in MM
Date: Thu, 3 Jun 2010 00:15:19 +0200
User-agent: Mutt/1.5.17 (2007-11-01)

> Now I am prying into the implementation of the .TP macro
> in MAN...

Ah, yes.  In the manpage macros, this works similarly: all
paragraph macros reset the indent to what it "should" be
(so that any ".in" invocations within a paragraph will be
undone at the beginning of the next paragraph).  That is,
".TP" absolutely sets the indent to "something" + "extra",
and ".PP" sets it back to "something".

The biggest difference is that ".TP" does not get the tag
as an argument, but instead reads it from the next line of
input: an input-line-count trap of one line is set and text
read for the tag is temporarily diverted, for the purpose of
determining whether the tag is wider than the extra indent
(the tag is set on a line by itself if it is).

Since the input-line-count trap only counts "real" lines of
input, you can do fancy stuff such as special formatting of
the tag:

.\" man
.\" ----------------------------------------------------------------
.TH foobar 8
.ll 7.0c
I often need to typeset single hanging paragraphs like:
.TP 4
Example of a post-scriptum, it has a hanging indent.
I have created a macro for this.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]