groff
[Top][All Lists]
Advanced

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

Re: [Groff] Groff conversion with 190 characters in each line


From: Tadziu Hoffmann
Subject: Re: [Groff] Groff conversion with 190 characters in each line
Date: Sat, 12 Jan 2013 17:55:23 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

> I have a requirement to convert ascii text file with 190
> characters in each line to pdf file in Linux machines.

If it is pure preformatted ascii text you want to display as-is
without further formatting you might be easier off with a tool
like enscript or a2ps, e.g.,

  enscript -Ma3 -r -B -f address@hidden -o- in.txt >out.ps

If you're using groff, you will need a minimal font and
page layout setup, which you can either provide barebones
or using one of the prepackaged macro sets. Here is a very
simple standalone setup (customize as needed):

File tmac.simplea3l:
------------------------------------------------------------------------
.\" this is for a3 landscape
.pl 29.7c
.po 1c
.ll 42c-2c
.lt 42c-2c
.ft CR
.ps 9.8
.vs 11.8
.ev 1
.evc 0
.ft CB
.ev
.wh 0 HD
.wh -2c FT
.de HD
.ev 1
.sp |.5c
.tl 'left header'%'right header'
.sp |1.5c
.ev
..
.de FT
.ev 1
.sp |\\n(.pu-1c
.tl 'left footer'%'right footer'
.bp
.ev
..
.nf
------------------------------------------------------------------------

Usage:

  groff -Tps -P-pa3 -P-l -M. -msimplea3l in.txt >out.ps

If the text is not pre-formatted and you want to fill up
lines of text, remove the ".nf" from the macro file and
perhaps instead of font "CR" use font "TR" (the default).





reply via email to

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