groff
[Top][All Lists]
Advanced

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

Re: [Groff] developers only?


From: Heinz-Jürgen Oertel
Subject: Re: [Groff] developers only?
Date: Wed, 30 Mar 2005 00:00:37 +0200
User-agent: KMail/1.7.2

Am Dienstag, 29. März 2005 22:44 schrieb Otavio Exel:
> Jorgen Grahn wrote:
> > Yes, the list is dominated by developers and/or power users, but that
> > should not discourage anyone from talking about more basic things.
>
> in the hope that "more basic" includes "stupid".. here I go! :-))
>
> 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);
>
> []s,

 .nf   - means 'no fill' mode,
groff is using the lines more or less like found in the input stream.
Thats exactly what you see.
Your definition of 'long lines'  and 'short lines' is not well suited to solve 
your problem. Using .2C, you are defining a line length.
The solution I currently see is using the default fill mode (.fi) and break 
the lines manually using .br.

.2C
.fi
.na
A very long line of my favorite song
.br 
A very very long line of my favorite song
.br
a short line
.br
A very very long line of my favorite song
.br

Using an editor like vi (or sed), it's not that difficult to add the .br 
automatically.

On the other hand you need some formula to calculate your line length and 
specify a limit for 'long' lines to tell groff to break automatically long 
lines. No idea on how to accomplish this.

Heinz  
 




reply via email to

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