[comp.lang.scheme] typesetting Scheme code

dorai@tone.rice.edu (Dorai Sitaram) (03/14/91)

In article <4298@skye.ed.ac.uk> jeff@aiai.uucp (Jeff Dalton) writes:
>One of thge main reasons I'd object is that I find the "&" ugly
>and intrusive.  Other conventions such as using upper case or
>different brakctes ([] or {}, say) also suffer from aesthetic
>and practical objections.  However if there were a program that
>produced Algol-style listings, I wouldn't mind if it put macro
>names in bold face along with if, define, etc.
>
>BTW, does anyone out there have such a program?

Yes.

I wrote something called SLaTeX that allows listings of Scheme code in
LaTeX without restricting it to the usual monospace typewriter font
supported by other code typesetters.

I've placed the current version in the titan.rice.edu's anonymous ftp
area: get public/slatex.sh.

SLaTeX decides which tokens should be, say, boldfaced, italicized, or
sansserifed, pretty much along the style of the Little Lisper [1].
(The user can completely control this default decision process, so
much so that he can flip the fonts around, add new fonts, or even do
something silly like make everything come out in typewriter -- i.e.,
turn the program into a no-op.)

I'd been leery of distributing SLaTeX before because of the frequent
updating that it's undergone following the Rice Scheme-and-similar-
language users' lively demands for bells and whistles, e.g.,

o allowing arbitrarily positionable displays, boxed code, in-text code,
	and directly inputing actual Scheme files; 

o getting little pockets of LaTeX text or mathmode into the Scheme
	code, for readable Schemelike pseudocode (useful for
	expository papers and class handouts);

o making it learn automatically that a macro definition implies that
	keyword should henceforth be boldfaced, etc.

At any time, the ftp site will contain the most recent code.  The shar
file contains the Scheme source (Ch*z, but should carry over to other
Schemes with minor changes), a shellscript that piggybacks the
codesetter on to LaTeX, the requisite LaTeX style file, installation
instructions, a manual in LaTeX, a man page, and a copyleft.  The
first 2 sections in the manual suffice for most uses, with fine tuning
being described later.  (The code, as of now, contains more fine
tuning than documented -- I'll update the docs when I next get time.)

This is free(ly distributable) software, and hence no warranty, though
I'll be glad to field bug and other reports.

(Ozan Yigit, does SLaTeX qualify to be included in your Scheme code
repository?)

--d

[1] D.P. Friedman and M. Felleisen, _The Little Lisper_, Science
Research Associates (3e), 1989, and The MIT Press, 1987.

oz@yunexus.yorku.ca (Ozan Yigit) (03/15/91)

In article <1991Mar14.000537.29788@rice.edu> dorai@tone.rice.edu
(Dorai Sitaram) writes:

>(Ozan Yigit, does SLaTeX qualify to be included in your Scheme code
>repository?)

Thank you Dorai, It is now a part of the utilities section in the
repository.

To bring all schemers up-to-date: The Scheme Repository is currently
hosted in nexus.yorku.ca [130.63.9.1] for anonymous-ftp during non-prime
hours.

The repository currently consists of four directories under pub/scheme:

	bib	- the sheme bibliography (bib/refer, bibtex, printable)
	doc	- miscellaneous text
	scm	- scheme source
	utl	- utilities (schemeweb, SLaTeX)

The scheme source portion of the repository is just updated, thanks to
those of you who have responded with code and suggestions. I expect to
add more scheme code to the repository shortly.

If you have anything that *you* would have wanted to see in such a
repository, [if you were out looking for some neat/useful/interesting
scheme code] than please consider contributing to this repository.

Please send all updates, corrections and new contributions to
scheme@nexus.yorku.ca.

happy scheming.		oz
---
In seeking the unattainable, simplicity  |  Internet: oz@nexus.yorku.ca
only gets in the way. -- Alan J. Perlis  |  Uucp: utai/utzoo!yunexus!oz
---

table of contents for pub/scheme/scm:

advent.scm		A simple adventure game written in an object
			oriented style mostly by a 10-year old. [posted by
			Ted Dunning]

calend.scm		Scheme version of the lisp code for Calendrical
			Calculations by Nachum Dershowitz and Edward M.
			Reingold.

compil.scm		A small, optimizing scheme compiler by Marc Feeley
			and Guy LaPalme.

conform.scm		This code, due to Jim Miller, has something to do
			with lattices, but I really do not understand it.
			It is a heavy-duty grind-and-roll for most scheme
			interpreters.

earley.scm		Earley's parser, by Marc Feeley. [needs tree.scm]

format.scm		Latest version of Ken Dickey's format for scheme.
			implements (format <port> <format-string> . args)

matchcomp.scm		Christian Queinnec's pattern-match compiler code
			for compiling non-linear, second-order patterns on
			S-Expressions.

mceli.scm		Chez version of Micro ELI from Shank and Riesbeck.

mcsam.scm		Chez version of Micro SAM from Shank and Riesbeck.

patmat.scm		A toy pattern matcher, shamelessly borrowed from
			the book Programming in MacScheme.

peval.scm		A toy partial evaluator, by Marc Feeley

polytype.scm		A toy type inferencer for scheme, by Marc Feeley

qprop.scm		Chez version of Scott E. Fahlman's "QuickProp",
			a variation on back-propagation.

schelog.sha		Dorai Sitaram's Prolog-in-Scheme [shar archive]

scoops.sha		Texas Instruments/Amitabh Srivastava implementation
			with re-writes by Steve Sherin. [shar archive]

test.scm		Aubrey Jaffer's IEEE/R^3.99RS compliance test.

tree.scm		Code to display trees on character devices, by Marc
			Feeley. [used by earley.scm]

work.scm		Olivier Danvy's "Putting Scheme to Work" demo.