groff
[Top][All Lists]
Advanced

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

Re: [Groff] developers only?


From: Tadziu Hoffmann
Subject: Re: [Groff] developers only?
Date: Wed, 30 Mar 2005 15:59:21 +0200
User-agent: Mutt/1.5.6i

> hmm.. yes, adding a macro to each line is really annoying..
> but the output, the indent in particular, is exactly what I expected!

After tinkering around a bit, I seem to have come up with a
compact version using input line count traps.  You might wish
to add something like ".sp .5" or so in the begin and end macros.


.\" ----------------------------------------------------------------
.\" begin lyrics
.de LY
.in +2m
.nr LY 1
.ti -2m
.it 1 LX
..
.\" ----------------------------------------------------------------
.\" end lyrics
.de LE
.nr LY 0
.in -2m
..
.\" ----------------------------------------------------------------
.\" line of lyrics
.de LX
.if \\n(LY .ti -2m
.if \\n(LY .it 1 LX
..
.\" ----------------------------------------------------------------
.2c
.fi
This is just some comparison text to demonstrate the width of
the column.
This is just some comparison text to demonstrate the width of
the column.
.LY
A normal-length line of my favorite song
A very very very very very very very very long line of my favorite song
A short line
A normal-length line of my favorite song
.LE
This is just some comparison text to demonstrate the width of
the column.
This is just some comparison text to demonstrate the width of
the column.






reply via email to

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