tech-userlevel archive

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

Re: Re: Heirloom Troff for NetBSD (was: Removing ARCNET stuffs)



On Thu, Jun 11, 2015 at 04:19:29PM -0400, Mouse wrote:
> >> [TeX] has, however, nothing like troff's nroff.
> > This could be rather easily made with a dvi driver (i.e. taking the
> > dvi formatted output and extracting the characters and including
> > rendering sequences depending on the type of fonts).
> 
> But you'd have to re-typeset everything using only monospaced fonts,
> and you'd have the issue that line justification and such are done with
> glue that can take on fractional-character widths.  [...]

Indeed, but as I see the thing one will invoke TeX with font
substitutions to use monospaced fonts, set the "page" size for something
vt fitting, and use some low level commands to "fix" the glue (you
describe some tracks; or setting the space as a true character as
\obeyspaces does---but I have to verify that tokenization and
hyphenation still work in this case).

Then the dvi generated is processed.

> 
> > This can be derived from dvitype(1).
> 
> dvitype is a relatively poor starting point; it works well enough for
> purposes that can tolerate suboptimal output (eg, a line that comes out
> overly long because it happens to be heavy on narrow characters) but it
> is no replacement for something that, like nroff, is aware of
> character-cell restrictions.

What I mean is that the dvi format handling is sketched in the
dvitype(1) WEB program. So one can start from this dvi program for
deriving another dvi treatment program (the program is short; one
can also convert by hand in CWEB to use C instead of the basic TeX
Pascal).

Best,
-- 
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
                     http://www.kergis.com/
                     http://www.arts-po.fr/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C


Home | Main Index | Thread Index | Old Index