groff
[Top][All Lists]
Advanced

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

Re: [Groff] developers only?


From: Werner LEMBERG
Subject: Re: [Groff] developers only?
Date: Wed, 30 Mar 2005 15:33:22 +0200 (CEST)

> > 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);
>
> 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.

Here it is, independent of the macro package.


     Werner

======================================================================


.\" break -- no join
.de BNJ
.  nr BNJ-dobreak 1
.  it 1 BNJ-break
..
.
.de /BNJ
.  nr BNJ-dobreak 0
..
.
.de BNJ-break
.  if \\n[BNJ-dobreak] \{\
.    br
.    it 1 BNJ-break
.  \}
..
.
.ll 3i
.
.BNJ
This is a test of a very long line needed to test the BNJ macros.
This is another very long line to test the break-nojoin macros.
And here is the final long line we use for testing the BNJ stuff.
Some short lines.
Another short one.
./BNJ
This is a test of a very long line needed to test the BNJ macros.
This is another very long line to test the break-nojoin macros.
And here is the final line we use for testing the BNJ stuff.
Some short lines.
Another short one.




reply via email to

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