[comp.emacs] Manual --> LaTeX!

pdc@otter.hple.hp.com (Damian Cugley) (09/15/88)

		 CAN I CHANGE MANUAL PAGES INTO LaTeX?
			  (summary of replies)

My original question was:
				    
	       Are there programs available to translate
	       troff -man files into LaTeX format files?

The answer is `yes': the program tr2tex, written by Kamal Al-Yahya
<kamal@hanauma.stanford.edu>.  Steven Hughs sent me a copy (v. 0.92),
and it works (once I'd #define'd index and such).  It does 95% of what I
want - the other 5% I can do myself in no time at all (this is basically
alterations so that I can \include the output in a larger document).

The following nice people suggested tr2tex:

	Mark W Eichin 		<eichin@ATHENA.MIT.EDU>
	David Eckelkamp		<@MCC.COM:davide%cadillac.cad.mcc.com@mcc.com>
	Nelson H.F. Beebe 	<Beebe@SCIENCE.UTAH.EDU>
	Ian Moor 		<mcvax!doc.ic.ac.uk!iwm@uunet.UU.NET>
	Steven Hughes 		<mcvax!stl.stc.co.uk!swh@uunet.UU.NET>

I stopped sending letters back when I started forgetting which ones I'd
already replied to - sorry.  I'm considering changing to RMAIL to avaid
this next time *:-(

Marc Illsley Clarke <clarke%hplb29a@hplabs.HP.COM> offered a sed script
of his own, but I'd already managed to uudecode, uncompress, untar,
unBSD and cc tr2tex.  I'm intrigued but too rushed to follow it up right
now...

Someone with the interesting name UUCP <uucp@CS.UCLA.EDU> sent me a
manpage.sty document style.  This is now redundant - tr2tex includes its
own style fyles - but applying it to some existing LaTeX documents
provided some amusing results.  Thanx, Mr P!


Bob Chassell <bob@wheaties.ai.mit.edu> sent me a lot of hints which
have prompted all sorts of ideas.  He also points out that not only is
Texinfo more flexible (i.e. typesetter or info), it also is ``freer''
(in the legal sense), and of course can be used by any Emacs user (as of
next month I will no longer be a LaTeX user either, so this matters to
me!! :-) ).

He also mentioned a program texi2roff.c, which is almost the inverse of
tr2tex.  Next time around I might try producing the originals in Texinfo
and changing them into manual pages, on the assumption that this is
probably more robust because it's a `downhill' transformation (that is,
Texinfo is higher-level than troff).

In the longer term, I intend to write a `-man --> Texinfo' program of
some sort; this will be useful in translating comp.sources manual pages
into GNU's info format.  Also perhaps Texinfo --> ASCII (i.e. the
equivalent of nroff).  I like Texinfo a lot as a computer-manual
formatter.  The standalone info-reader - replacing the man command - is
apparantly almost ready for release.  A fully-fledged GNU system might
not have man, nroff or troff at all...

For the moment, however, I will use tr2tex because it works *now* and
I've not got much time left before I'm supposed to have finished here...

:-) Imagine the layers of translation we could end up with...

                                                              [Hit SPC]

	man page  <----------------------------\
	   v   man2texi?		       |
	texinfo	        		       |
	   v   tex       		       |
	texinfo macros, written in TeX	       |
	   v	        		       |
	basic TeX			       |
	   v	        		       |edit
        dvi file                               | 
	   v				       | (`drat, that comma
	dvi macros, written in PostScript      |   should be italicised!')
	   v				       |
	basic PostScript		       |
	   v				       |
	drawing routines for the printer       |
	   v				       |
	marks on the paper --------------------/

Thanks for the ideas and suggestions.

pdc
--
/-------------------\/-------------------------\/------------------------\
| Damian Cugley =@= || pdc@hplb.lb.hp.co.uk    || ...!mcvax!ukc!hplb!pdc |
| HPLabs Bristol UK || pdc%otter@hplabs.HP.COM ||   ...!hplabs!otter!pdc |
\-------------------/\-------------------------/\------------------------/
                                                         `shar and enjoy!'