From: T V Raman
Subject: Typesetting user documentation in TeX/LaTeX
Date: 
Message-ID: <1993Sep24.160435.1234@cs.cornell.edu>
Hi,

I have implemented a large system in lisp/clos for my PhD.  I am now
writing my thesis and need to put some of the documentation in the
appendix.

I have Mark Kantrowitz' excellent user manual package that produces
text output.
Does know a way of typesetting the following nicely in LaTeX?

Please reply by email, <·····@cs.cornell.edu>
(I'm too busy writing the thesis to read all the groups regularly)

Thanks,

--Raman


Since the whole system is about 30,000 lines of code, it would be
great if I could completely automate the process.

What follows is just what I generated from about a few  of the source
files  within lisp.
Problem:

I don't know of anything other than verbatim in tex that will let me
keep the indentation etc. However, this will of course come out all in
one font.

I would like to display the documentation in an easy to read manner,
don't really care what fonts but would at least like change of fonts
to idnicate if something is a function, method etc.



;;; *CARDINAL-NUMBERS-TABLE* (make-hash-table :test                  [VARIABLE]
;;;                           (function equal))
;;;    Maps digit strings to cardinal numbers 
;;;
;;; DEFINE-CARDINAL-NUMBER (string cardinal)                         [FUNCTION]
;;;    Define cardinal number 
;;;
;;; CARDINAL-NUMBER ((string string))                                  [METHOD]
stuff deleted. 
-- 
   T. V. Raman <·····@cs.cornell.edu>Tel: (607)255-9202  R 272-3649
                       Office: 4116 Upson Hall,
Department of Computer Science, Cornell University Ithaca NY 14853-6201
                Res: 226 Bryant Avenue Ithaca NY 14850
From: �amonn McManus
Subject: Re: Typesetting user documentation in TeX/LaTeX
Date: 
Message-ID: <breakets@kaa.gr.osf.org>
·····@cs.cornell.edu (T V Raman) writes:
> I don't know of anything other than verbatim in tex that will let me
> keep the indentation etc. However, this will of course come out all in
> one font.
> 
> I would like to display the documentation in an easy to read manner,
> don't really care what fonts but would at least like change of fonts
> to indicate if something is a function, method etc.
> ;;; *CARDINAL-NUMBERS-TABLE* (make-hash-table :test                  [VARIABLE]

It looks like the simplest quick hack would be to define an
environment in which the left square bracket [ is active.  Since LaTeX
doesn't expect [ to be active, it doesn't turn off its activeness in
{verbatim} environments.  Thus if you define (stealing Michael
Downes's recently posted \actively idea):
  \def\actively#1#2{%
    \begingroup \uccode`~=`#2\uppercase{\endgroup#1~}%
  }
  \newenvironment{boldbrackets}{%
    \catcode`[=\active
    \actively\def[##1]{{\bf\string[##1]}}%
  }{}
then you can write:
  \begin{boldbrackets}
  \begin{verbatim}
  ;;; *CARDINAL-NUMBERS-TABLE* (make-hash-table :test                  [VARIABLE]
  [...]
  \end{verbatim}
  \end{boldbrackets}

If you want the [VARIABLE] etc designations to line up on the right
margin, you should insert \hfill before \bf in the definition of [.

,
Eamonn