Article View: comp.text
Article #5664Re: nroff/troff to TeX/LaTex translator
From: Paul De Bra
Date: Thu, 12 Jan 1989 20:28
Date: Thu, 12 Jan 1989 20:28
37 lines
2284 bytes
2284 bytes
In article <8248@dasys1.UUCP> intern@dasys1.UUCP (intern ) writes:
>Is there a troff/nroff to TeX/LaTeX translator? I have a few *roff
>documents that I would like to convert to LaTeX, but doing this manually
>proved to be a monumental task.
> Thanks,
I don't think this exists. Translating a small part of troff may be
feasible, but troff has many very odd commands (often used in common
macro packages!) that are very hard or impossible to translate.
A few examples:
.cs uses constant character spacing for possibly non-constant-width fonts.
.wh sets a trap at a given vertical position on the page, so whenever the
output reaches that point some macro is called. This is impossible in
Tex, as the vertical position of output text is unknown until Tex
decides where to break a page and how much to stretch or shrink the
text vertically.
.tr replace some characters by others on OUTPUT. so different widths are
used when calculating linebreaks.
hp register containing the horizontal place on INPUT line.
nl vertical positions of last printed text base-line. again impossible in
Tex as vertical positions are unknow while composing a page.
.k horizontal size of the text portion of the current, partially-collected
OUTPUT line. This is again an alian concept in Tex, because paragraphs
are not build the same way as in troff. (I believe this .k register
silently stopt producing any useful information in ditroff, so the
old troff and ditroff are NOT 100% compatible, in spite of various
claims)
I honestly believe that a troff output to dvi converter would be easier
if all you want is to print your old documents.
Paul.
--
------------------------------------------------------
|debra@research.att.com | uunet!research!debra |
------------------------------------------------------
Technical Details
Message-ID:
<8738@alice.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ames!xanth!ukma!rutgers!att!ulysses!andante!alice!debraReferences:
<8248@dasys1.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ames!xanth!ukma!rutgers!att!ulysses!andante!alice!debra From: debra@alice.UUCP (Paul De Bra) Newsgroups: comp.text Subject: Re: nroff/troff to TeX/LaTex translator Keywords: troff nroff TeX LaTex Message-ID: <8738@alice.UUCP> Date: 12 Jan 89 20:28:38 GMT References: <8248@dasys1.UUCP> Reply-To: debra@alice.UUCP () Organization: AT&T, Bell Labs Lines: 37