Generated: Friday, November 25, 2005, 10:36:17 Copyright © 2005 , Kurt Nørmark The local LAML software home page

LAML Guide for DrScheme Users

I do not use LAML with DrScheme, because it is slow and relatively inconvenient. For novices, however, DrScheme may be a good choice because it is very helpful and pedagogical. Here is how you do it.

First choose language level using the menu point 'language>choose language...'. Set the language level to "PLT > textual (MzScheme, includes R5RS)". Restart DrScheme after this.

Then follow the general advice on how to use LAML from a Scheme interpreter. Issue the commands in the Interactions window of DrScheme. This procedure allows you to use the laml procedure and the other high level LAML commands

In case you want to process an existing laml file (a file with 'laml' extension) by simply executing it from DrScheme, the first few lines of the file must be modified slightly. Usually, the start of a LAML file goes like this:

   (load (string-append laml-dir "laml.scm"))
   (laml-style "simple-html4.01-transitional-validating")
   ...

If we assume - as an example - that the you want to process the file index.laml in the directory c:/users/kurt/ you should in general replace this prefix part with something similar to:

   (define laml-dir "c:/laml/")
   (load (string-append laml-dir "laml.scm"))
   (fake-startup-parameters "index" "c:/users/kurt/")
   (laml-style "simple-html4.01-transitional-validating")
   ...

It is quite tedious to write these slightly redundant informations in each and every LAML file. The other modes of LAML activation take care of these details for you. But this cannot easily be arranged for in DrScheme. At least, I do not know how to do it...

In the first line, you should of course set laml-dir to the path corresponding to the directory in which you installed LAML. Remember the terminating forward slash.

In line 3, use the actual source file name without extension as the first parameter of fake-startup-parameters. Use the directory in which the LAML source file is located (the so-called LAML startup directory) - full path - as the second parameter. Notice that the startup directory is usually different from laml-dir, as defined in the first line. Remember to terminate all directories with a forward slash, and never use backward slashes in directory paths. Also remember a trailing forward slash at the end of a directory path, such as "dir1/dir2/ ".

Back to main LAML page.