Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ucbvax!hplabs!otter!pdc From: pdc@otter.hple.hp.com (Damian Cugley) Newsgroups: comp.emacs Subject: Manual page --> LaTeX? Message-ID: <610006@otter.hple.hp.com> Date: 8 Sep 88 17:16:38 GMT Organization: Hewlett-Packard Laboratories, Bristol, UK. Lines: 46 Avoiding re-inventing the wheel I'd like to be able to incorporate the manual pages for some programs in a LaTeX document. It occurs to me that one way to do it would be to have `some program' that translates the `-man' macros into a reasonable LaTeX analogy (or perhaps texinfo?), and then \include or \input these files. Example: `.TH FOO 1Z ...' might become `\section{Manual entry for {\em foo}(1Z)}', which is easy enough, `.RI' etc. are a doddle, but the `.TP' etc. macros will need a little bit of cleverness to convert them into descriptions with matching braces and the like: .TP \begin{description} .BI "\-q " wfile \item[{\tt -q }{\em wfile}] Use Use .I wfile {\em wfile} as a wombat file as a wombat file ... ... .TP \item[{\tt -z}] .B \-z Enable zebra option Enable zebra option ... ... \end{description} .SH FILES \subsection*{FILES} ... ... I looked at the various tools available and I think Emacs-LISP (with outout to another buffer) is probably the easiest language to use for this sort of thing. It shouldn't be too problematical, I'm just too lazy to bother if it's already been done. ?:-) Has anyone already done such a thing (in *any* language)? I haven't found any obvious commands using command-apropos. Hints? Suggestions? (Would texinfo be more useful than LaTeX or vice versa?) PEMIS (Please-e-mail-I'll-summarise) :-) pdc -- /--Damian Cugley-------------------------------------\/--HP Labs----------\ | pdc@hplb.lb.hp.co.uk ...!mcvax!ukc!hplb!pdc || Filton Rd | | pdc%otter@hplabs.HP.COM ...!hplabs!otter!pdc || Stoke Gifford | | pdc%hplb.csn@csnet-relay.arpa (Guesses not || BRISTOL UK | | pdc%hplb.csnet@relay.cs.net addresses :^} ) || BS12 6QZ | \----------------------------------------------------/\-------------------/ ``lsh \- a shell (command interpreter) with LISP-like syntax''