From: Yuan-chi Chiu
Subject: Formatting CLisp Code
Date: 
Message-ID: <2eo9f5$slu@gondor.sdsu.edu>
Hello Lisp,

   I found a program called "VGrind" and "TGrind" that can format codes
from many languages such as C, C++, Prolog, Pascal, C Shell, etc. to 
nicely formatted TeX or LaTeX documents to be printed.  It has nice 
features such as putting the procedure/function name with big letters
on the right side of the declarations.  Printing line numbers on the
right margin, italicizing the comments, etc.

   Unfortunately, these programs doesn't support Lisp.  In comp.lang.lisp's
FAQ I found this WEB thing, but it is so difficult to use, for you got to
know some TeX stuffs.  Are there a similar program to the "Grind" series
which can format Lisp code for me?

--
--------------------------------------------------------------------------
  Yuan-chi (Bill) Chiu.   ········@ucssun1.sdsu.edu.   Amiga Enthusiast.
--------------------------------------------------------------------------
If you take any activity, any art, any discipline, any skill, take it and
push it as far as it will go, push it beyond where it has ever been before,
push it to the wildest edge of edges, then you force it into the realm
of magic.              - T. Robbins ("The Ascension Factor", Frank Herbert)
___________________________________________________________________________
From: Marco Antoniotti
Subject: Re: Formatting CLisp Code
Date: 
Message-ID: <MARCOXA.93Dec16100515@butsomi.cs.nyu.edu>
In article <··········@gondor.sdsu.edu> ········@ucssun1.sdsu.edu (Yuan-chi Chiu) writes:

   From: ········@ucssun1.sdsu.edu (Yuan-chi Chiu)
   Newsgroups: comp.lang.lisp

   Hello Lisp,

      I found a program called "VGrind" and "TGrind" that can format codes
   from many languages such as C, C++, Prolog, Pascal, C Shell, etc. to 
   nicely formatted TeX or LaTeX documents to be printed.  It has nice 
	...

The 'vgrind' situation is a notoriously sad one. I fiddled around a
bit with the capability database it comes with it but it simply does
not work!!!

Here it is.
If anybody out there can tell me what I do wrong, please let me (us)
know! It might be something very stupid.

BTW. The Lisp repository maintained by M. Kantrowitz, contains a
couple of "TeX" packages, including the whole set of macros used for
CLtL2 (kindly donated by G.L. Steele, as far as I can remember)

-------------------------------------------8<----------------------------------
# [vt]grind entry for CLtL
# COMMON LISP ENTRY
#
# The kw property follows the actual index of CLtL2.
# Keywords are the major types, the special forms and the major
# defining macros (like 'defclass'), plus a random choice of functions
# (e.g. the magnificent 7).
#
# Note: the stupid tgrind does not accept very long entries, so I have
#       to cut down the number of keywords.

clisp|CLISP:\
	:pb=^\d?\((defun|defmacro|defstruct|defclass|defgeneric|defmethod|\
	labels|flet|macrolet|defvar|defconstant|defparameter|deftype)\
	\d\p(\d|\d\a\d):\
	:bb=\(:\
	:be=\):\
	:cb=\#\|:\
	:ce=\|\#:\
	:ab=;:ae=$:\
	:id=\-\+\:_\.\#\|\':\
	:sb=":\
	:se=\e":\
	:pl:px=\(\a?\d?\p\d?\a?:\
	:tc=cltypes:

cltypes:\
	:kw=\
	t\
	number integer ratio rational real float\
	complex \#C\
	character \#\\\
	atom\
	symbol function\
	sequence\
	cons null \(\) list\
	array\
	vector\
	string\
	bit\
	\#\* bit-vector\
	hash-table\
	readtable\
	package\
	pathname\
	stream\
	random-state\
	\#\S\
	keyword\
	nil\
	deftype satisfies typep subtypep type-of:\
	:tc=clforms:

clforms:\
	kw=block catch declare eval-when flet go if labels let let\*\
	quote return-from\
	return setq tagbody the throw\
	locally\
	lambda \&optional \&rest \&key \&aux\
	defun defvar defconstant defparameter:\
	:tc=clconstr:

clconstr:\
	kw=eq eq equal equalp\
	setf psetf\
	apply eval funcall\
	when unless cond case\
	loop do do\* dolist dotimes\
	values\
	defmacro \&body \&whole \&environment\
	:tc=clrest:

clrest:\
	kw=\
	declare\
	defpackage provide require\
	car cdr first rest\
	defstruct\
	read format\
	defclass defgeneric defmethod\
	error cerror:
--
Marco Antoniotti
-------------------------------------------------------------------------------
Robotics Lab		| room: 1219 - tel. #: (212) 998 3370
Courant Institute NYU	| e-mail: ·······@cs.nyu.edu

...e` la semplicita` che e` difficile a farsi.
...it is simplicity that is difficult to make.
				Bertholdt Brecht