Wiki
Download
Manual
Eggs
API
Tests
Bugs
show
edit
history
You can edit this page using
wiki syntax
for markup.
Article contents:
== Outdated egg! This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for [[/eggref/5/slatex|the CHICKEN 5 version of this egg]], if it exists. If it does not exist, there may be equivalent functionality provided by another egg; have a look at the [[https://wiki.call-cc.org/chicken-projects/egg-index-5.html|egg index]]. Otherwise, please consider porting this egg to the current version of CHICKEN. [[tags: egg]] == slatex [[toc:]] === Description [[http://www.ccs.neu.edu/home/dorai/slatex/slatxdoc.html|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 [[/users/peter-bex|Peter Bex]] === Requirements 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-chicken} The above also loads instructions for highlighting Chicken-specific macros. See the "[[#styles|Styles]]" section below for more information. For information about the TeX commands that are available from SLaTeX, please refer to the [[http://evalwhen.com/slatex/slatxdoc-Z-H-3.html|official documentation]]. ==== Styles SLaTeX provides style files which you will need to import in your TeX or LaTeX document to make use of SLaTeX. These files are installed by this egg in a location which is automatically added to TeX's search path by the {{slatex}} wrapper program so you can just {{\usepackage}} them. 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. The style files are: ; slatex.sty : The main SLaTeX engine. Include this if you only want basic Scheme highlighting. The style files below include this one, so you won't need to include this yourself unless you want only basic highlighting. ; cltl.sty : Common Lisp The Language keyword definitions. ; slatex-chicken.sty : Chicken-specific keyword definitions. All macros in core Chicken will be recognised by this style file. ==== Library The library can be loaded as usual: <enscript highlight="scheme"> (use slatex) </enscript> It provides the following procedures: <procedure>(process-main-tex-file FILENAME)</procedure> 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. <procedure>(tex-search-path)</procedure> This returns a list of the directories in the path which SLaTeX will search during the code extraction phase (initiated by {{process-main-tex-file}}). It is advisable to keep this the same as the actual search path used by LaTeX as it processes the file again so that any files in the search path which define new Scheme keywords get picked up properly. <procedure>(set-tex-search-path! PATH)</procedure> Set the search path. {{PATH}} can be either a Unix pathstring (paths separated by colons) or a list of strings that represent filesystem paths. === Changelog * 20090928.1 Convert deprecated {{getenv}} calls to {{get-environment-variable}} so it works with new Chicken versions (thanks to Christian Kellermann). * 20090928.0 Initial release === License Copyright (c) 1990-2002, Dorai Sitaram. All rights reserved. Permission to distribute and use this work for any purpose is hereby granted provided this copyright notice is included in the copy. This work is provided as is, with no warranty of any kind.
Description of your changes:
I would like to authenticate
Authentication
Username:
Password:
Spam control
What do you get when you multiply 4 by 3?