[comp.sources.wanted] Wanted: latex --> nroff converter

crouch@axion.bt.co.uk (the man whose head expanded) (11/22/90)

Does anyone know if a tool exists to convert latex file into nroff
format, and if so where it's available from?

Regards,

Chris


-----------------------------------------------------------------------------
Chris Rouch                                             crouch@axion.bt.co.uk
RT3131, BTRL, Martlesham Heath, Ipswich, England.              +44 473 646093

Only when we dream are we free. The rest of the time we need wages.

amoss@shum.UUCP (Amos Shapira) (11/23/90)

crouch@axion.bt.co.uk (the man whose head expanded) writes:

>Does anyone know if a tool exists to convert latex file into nroff
>format, and if so where it's available from?

>Regards,

>Chris

There is Gnu texi2roff. Don't know what it is but it sounds like what you
are looking for.

Hope this helps,
Amos Shapira
amoss@batata.huji.ac.il

cpcahil@virtech.uucp (Conor P. Cahill) (11/26/90)

In article <1990Nov21.170131@axion.bt.co.uk> CRouch@axion.bt.co.uk writes:
>
>Does anyone know if a tool exists to convert latex file into nroff
>format, and if so where it's available from?

There is a tool called texi2roff which converts texinfo files to an
nroff/troff source file.  Works well (although I haven't seen the same
document formatted by TeX so I can't say that they come out exactly
the same).

Copy of the Readme file follows:

texi2roff - Texinfo to nroff/troff translator

Notes for Release 1.0

Copyright 1988  Beverly A. Erlebacher  (see copyright file)

Raison d'etre:
-------------
I wrote texi2roff to help out Rayan Zachariassen, the author of
ZMailer.  Rayan had prepared his documentation using Texinfo at the
request of the GNU Project.  After he sent ZMailer to his alpha
testers, he got many complaints from people who did not have TeX
installed and wanted documentation they could read or print with
nroff/troff.

In the expectation that there are other people in the same plight
who would like to read documentation from the GNU project, I am
posting texi2roff.

Please Note:
-----------
texi2roff translates Texinfo documents, *NOT* TeX documents. Not
all GNU documentation uses Texinfo, although most of the recent
material does. A Texinfo document can be distinguished from a TeX
document by the preponderance of commands starting with '@'. TeX
commands start with '\'.

nroff vs. troff
---------------
I tested this program almost exclusively with nroff, so I expect
some bugs in the troff oriented commands.  Please report bugs
(and fixes!).

Portability:
-----------
I developed texi2roff on Sun 2's and 3's running Sun OS 3.n and 4.0
and tested it on a Vax running 4.2BSD, a MIPS running 4.3BSD and an
HP-9000 running HP-UX.  There is a -DBSD directive in the program which
only controls which string header to #include and which of strchr() or
index() is used.  It is reported to work with Microport SVR2, Xenix
System III and several other environments. It even compiles with Turbo C
and runs under MSDOS (SoftQuad (sq.com) sells nroff/troff for MSDOS). 
For those using older C compilers, use -Dvoid=int.  

Thanks to Bob Webber (*not* the Bob Webber at Rutgers, this one is a
metallurgist), Peter Lee, Wolf Paul, Eric Christensen and Bill Mitchell
for testing this or an earlier version on a variety of machines, unix
variants and compilers.

In order to make the program more portable, I've added support for -me
and -mm macros as well as the -ms macros it was developed with. 
Unfortunately, the -mm macros I have here are not the standard System V
set. I would appreciate feedback on this - please report on any changes
necessary.

Design and Future Enhancements:
------------------------------
By isolating all explicit command strings in the table header files,
I've made the program especially easy to modify and extend. Most
customizations or refinements can (and should!) be made by twiddling
the strings in the tables.

When modifying texi2roff, please respect the design, and keep all
explicit roff command strings in the table header files. Note
that the user's selection of macro package does not affect any code
in translate.c. Please strive to keep the program table-driven.

I use a mixture of macros and raw commands which is causing some of
the minor formatting problems.  Ideally, the program should have its
own macro package.

More of the discarded commands could be implemented and some of the
items in the 'bugs' section of the manual page addressed.

Texinfo is a moving target. I have provided crude support for some 
features that will not appear until release 19 of Gnuemacs, since
I dont have complete specs for them.  Most new commands can just be
added to the tables and the program will handle them.

I feel robustness is very important so I have made every effort to
detect, report and recover gracefully from errors in the input.  As
texi2roff is more than an order of magnitude faster than nroff, there
is no need to sacrifice other desirable attributes for speed.

 ...uunet!utai!utcsri!erlebach		erlebach@csri.toronto.edu

	Beverly Erlebacher
	Computer Systems Research Institute
	10 King's College Road
	University of Toronto,
	Toronto, Ontario, Canada M5S 1A4

-- 
Conor P. Cahill            (703)430-9247        Virtual Technologies, Inc.,
uunet!virtech!cpcahil                           46030 Manekin Plaza, Suite 160
                                                Sterling, VA 22170