5  Obtaining and installing SLaTeX

SLaTeX is available as a .tar.bz2 package from Northeastern University at the URL http://www.ccs.neu.edu/~dorai/slatex/slatxdoc.html. bunzip2’ing and untar’ing produces a directory slatex, containing, among others, the files slatex.sty and scmxlate‑slatex‑src.scm.

To configure SLaTeX on your system:

1. Copy (or move, or link) slatex.sty to a suitable place, ie, one of the directories mentioned in your TEXINPUTS variable.

2. Ensure that you have scmxlate installed on your system. Note down the full pathname of the file scmxlate.scm file in the scmxlate directory as unpacked on your system.

3. Change directory (cd) to slatex.1

3. Edit the file scmxlate‑slatex‑src.scm as suggested by the comments in the file itself. In particular, the filename in the expression

(scmxlate-target-file "/home/dorai/.www/slatex/slatex.scm")

should be changed to reflect where you will (manually) place the slatex.scm file that will be created by the configuration process.

4. Invoke your Scheme or Common Lisp interpreter. Load the file scmxlate/scmxlate.scm, using its correct relative or full pathname. Eg,

(load "wherever-it-is/scmxlate/scmxlate.scm")

at the Scheme (or Common Lisp) prompt. You may be asked some questions. scmxlate will configure SLaTeX for your Scheme dialect and operating system, creating a Scheme file called slatex.scm.

The configuration process also creates a shell script slatex (slatex.bat on Windows) and a Scheme file callsla.scm. The shellscript lets you invoke SLaTeX from your operating-system command line. The file callsla.scm lets you call SLaTeX from Scheme or Common Lisp. The latter is a convenient alternative if the shellscript cannot be created for your system, or if you prefer working within a Scheme or Common Lisp session anyway.

5. Exit Scheme or Common Lisp (if scmxlate hasn’t exited on its own). Copy (or move, or link) the newly created slatex.scm to the location you identified in scmxlate‑slatex‑src.scm. Copy (or move, or link) the shell script slatex or slatex.bat to a directory in your PATH. Copy (or move, or link) the file callsla.scm to a place convenient to you or your Scheme/CL system.

If you have the shellscript, and if the document in question is slatxdoc.tex, SLaTeX can be invoked as

slatex slatxdoc.tex 

(The extension is optional if it is .tex.)

Using the callsla.scm, the same can be accomplished by loading callsla.scm into your Scheme/CL and then typing

(call-slatex "slatxdoc.tex")

(Again, the extension .tex is optional.)

(Yes, slatxdoc.tex is the document you’re reading now. You might as well check your configured SLaTeX on its own documentation.)

SLaTeX has been tested on many Scheme and Common Lisp implementations. If your dialect doesn’t work, send email to ds26 at gte dot com, with details about your Scheme’s macro facility, and how it implements the non-standard Scheme procedures delete‑file, file‑exists?, and force‑output.


1 The SLaTeX files use Unix-style newlines. If you’re on a Windows box, you may want to use an appropriate newline modifier to make the files comply with your operating system’s newline format.