[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] developers only?
From: |
Ted Harding |
Subject: |
Re: [Groff] developers only? |
Date: |
Wed, 30 Mar 2005 00:04:49 -0000 (BST) |
On 29-Mar-05 Otavio Exel wrote:
> [...]
> 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);
I'll make a suggestion. This uses the 'ms' macros (which
I'm more familiar with than 'me' so I know what I'm doing!).
The following is the 'input file' for groff:
============================================
.nr PD 0
.de newXP
.XP
.nh
.ad l
..
.blm newXP
.2C
This is a mixture
Of some short lines and some long lines
Including some lines which are very long indeed
and can be typed on several consecutive lines with
no blank line between them.
The blank lines
Will trigger the blank line macro
Which is defined by the macro definition .blm above,
which starts an exdented paragraph (the first line left-justified,
all subsequent lines indented, until the next one).
The .nr PD 0 definition
sets the paragraph drop (the spacing between paragraphs)
to 0
So that the new lines of the lyric will be recognised
by starting on the left.
.sp
When you do want a space
For instance between verses of a lyric
You can use the .sp command.
========================================================
If you put the above (between ====...//...//====...)
into say temp.tr and then run
groff -Tascii -ms temp.tr > temp.out
you should find that temp.out contains
======================================
This is a mixture
Of some short lines and some
long lines
Including some lines which
are very long indeed
and can be typed on
several consecutive
lines with no blank
line between them.
The blank lines
Will trigger the blank line
macro
Which is defined by the
macro definition .blm
above, which starts an
exdented paragraph (the
first line left-
justified, all
subsequent lines
indented, until the
next one).
The .nr PD 0 definition sets
the paragraph drop (the
spacing between
paragraphs) to 0
So that the new lines of the
lyric will be
recognised by starting
on the left.
When you do want a space
For instance between verses
of a lyric
You can use the .sp command.
====================================
Because of ".2C" this is the first column of a two-column
layout, hence the short lines as printed.
Other things you need to know, not explained in the "lyrics",
are:
".nh" supresses hyphenation
".ad l" does "left adjustment" but not "right adjustment"
as well, so that the automatic expansion of inter-word
spaces which normally cause the line to be filled out to
its full length does not take place.
The other things are explained in the lyrics.
Note in particular the blank line following ".sp"
in the input file.
Hoping this helps!
Ted.
--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 094 0861
Date: 30-Mar-05 Time: 00:04:49
------------------------------ XFMail ------------------------------
- Re: [Groff] developers only?, (continued)
- 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, 2005/03/29
- 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 <=
- Re: [Groff] developers only?, Ted Harding, 2005/03/30
- Re: [Groff] developers only?, Otavio Exel, 2005/03/30
- Re: [Groff] developers only?, Keith Marshall, 2005/03/30
- Re: [Groff] developers only?, Jorgen Grahn, 2005/03/30
- Re: [Groff] developers only?, Larry McVoy, 2005/03/30
- Re: [Groff] developers only?, Jorgen Grahn, 2005/03/30
- Re: [Groff] developers only?, M Bianchi, 2005/03/30
- Re: [Groff] developers only?, Otavio Exel, 2005/03/31
RE: [Groff] developers only?, Ted Harding, 2005/03/29
Re: [Groff] developers only?, Alejandro López-Valencia, 2005/03/29