You are looking at historical revision 20593 of this page. It may differ significantly from its current revision.

• egg

## slatex

### Description

SLaTeX is a wrapper program for LaTeX which typesets blocks of Scheme and Lisp code listings.

### Author

Dorai Sitaram, ported to CHICKEN and packaged as an egg by Peter Bex

None

### Documentation

This egg provides a library as well as a program. Most people will only need the program.

#### Program

SLaTeX can be invoked as follows:

` slatex [OPTION ...] FILE[.tex] [COMMAND ...]`

The commandline syntax is identical to that of LaTeX (or TeX), and everything but the main TeX file argument is ignored by SLaTeX and passed on verbatim to the LaTeX program.

SLaTeX will detect whether the input file is a plain TeX file or a LaTeX file by analysing the first command it finds. If it's a LaTeX command (documentstyle, documentclass or NeedsTeXFormat), it will call the latex program on the file, otherwise it will call tex. Comments and non-command text are safely skipped.

You will also need to use the SLaTeX package in your LaTeX sources:

` \usepackage{slatex}`

For information about the TeX commands that are available from SLaTeX, please refer to the official documentation.

#### Styles

SLaTeX provides two style files which you will need to import in your TeX or LaTeX document. These files are installed by this egg in a location which is automatically added to TeX's search path by the slatex wrapper program. If for some reason it cannot be found, please add it to your TEXINPUTS. It can be found under share/chicken/slatex/ under Chicken's installed prefix.

#### Library

The library can be loaded as usual:

`(use slatex)`

It currently provides only one procedure:

[procedure] (process-main-tex-file FILENAME)

This procedure will extract all the Scheme code blocks from your TeX files and create fully typeset TeX files from them. These files are written to the current directory and generally named .Z[Z]jobname.tex where jobname is the name of the TeX file being processed. It will generate temporary files named .Z[Z]jobname.scm, which should be removed during processing. The slatex.sty file knows how to find these files and pull them in to replace the raw source code blocks.

The FILENAME argument is the file of the main TeX source file which includes all the others (in short, it's the same one you would provide on the commandline for the latex command). The extension is optional; a .tex will automatically be appended if missing.

``` Copyright (c) 1990-2002, Dorai Sitaram.