groff
[Top][All Lists]
Advanced

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

Re: [Groff] how to change the number of columns for utf8 device


From: Ralph Corderoy
Subject: Re: [Groff] how to change the number of columns for utf8 device
Date: Sat, 06 Sep 2008 18:04:25 +0100

Hi zhangweiwu,

> I could not find out how to define the number of columns (number of
> characters in a row) for utf8 output device.  [snip]  Besides, is it
> possible to do 2-column page layout with utf8 device?

The .1C, .2C, and .MC macros control the number of columns produced in
-ms.  See groff_ms(7).  I find this works:

    (echo .2C; yes '' | awk '{print NR} NR == 1000 {exit}') |
    groff -Tutf8 -ms

By default, .2C makes each column 7/15ths of the line length in the LL
number register, with the remainder being the gutter inbetween.

As for the length of each column line, I'd have thought setting the line
length through the \n(LL register may be the easiest way.

    (echo .nr LL 10i; echo .2C; yes '' | awk '{print NR} NR == 1000 {exit}') |
    groff -Tutf8 -ms

Cheers,


Ralph.





reply via email to

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