[Top][All Lists]
[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 00:47:38 +0200 |
User-agent: |
Mutt/1.5.6i |
> I'm printing the lyrics of a CD; I want it in 2-col; so I did
>
> .2c
> .nf
>
> I wanted groff to *not* join short lines but break long lines;
> Short lines were not joined, ok!
> But groff did not break the long lines :-))
> - Long lines in the first column invaded the second column
> - Long lines in the second column were truncated
>
> How do I get groff to split but don't join?
>
> I'm using -me and groff 1.17.2 (debian stable);
This is actually nontrivial. Groff handles split & join (.fi)
and nosplit & nojoin (.nf), but not split & nojoin -- at least
not by itself, so we have to help it along a bit. Here is a
somewhat crude method which has the disadvantage that you have
to precede every line with some text (i.e., .xx), but gives a
more pleasing output because each wrapped line is indented.
If you don't like the extra macro per line, the next step of
sophistication might be a higher-level macro that reads an
input line of text (using, e.g., an input line count trap)
and formats that line, repeating until it reaches some end
condition.
---- cut here ----
.2c
.fi
This is just some comaprison text to demonstrate the width of
the column.
.de xx
.br
.ti 0
\&\\$*
..
.in +2m
.xx A normal-length line of my favorite song
.xx A very very very very very very very very long line of my favorite song
.xx A short line
.xx A normal-length line of my favorite song
.in -2m
---- cut here ----
- [Groff] developers only?, Otavio Exel, 2005/03/29
- Re: [Groff] developers only?, Keith Marshall, 2005/03/29
- Re: [Groff] developers only?, Jorgen Grahn, 2005/03/29
- Re: [Groff] developers only?, Otavio Exel, 2005/03/29
- Re: [Groff] developers only?, Heinz-Jürgen Oertel, 2005/03/29
- Re: [Groff] developers only?, Alejandro López-Valencia, 2005/03/29
- Re: [Groff] developers only?,
Tadziu Hoffmann <=
- Re: [Groff] developers only?, Otavio Exel, 2005/03/30
- Re: [Groff] developers only?, Tadziu Hoffmann, 2005/03/30
- Re: [Groff] developers only?, Werner LEMBERG, 2005/03/30
- Re: [Groff] developers only?, Tadziu Hoffmann, 2005/03/30
- Re: [Groff] developers only?, Peter Schaffter, 2005/03/30
- [Groff] dropcap in HTML could be easier?, Dorai Sitaram, 2005/03/30
- Re: [Groff] developers only?, Werner LEMBERG, 2005/03/30
- Re: [Groff] developers only?, Ted Harding, 2005/03/29
- Re: [Groff] developers only?, Ted Harding, 2005/03/30
- Re: [Groff] developers only?, Otavio Exel, 2005/03/30