8. Skribe User Manual -- Standard Library

This section describes the Skribe standard library

8.1 File functions

The function include is particularily useful to spread a long document amongst several files.

prototype
(include file)
argumentdescription
fileThe file containing the nodes to be included. These nodes are included in the document in place of the include call.
See also
skribe-load skribe-path skribe-path-set!

The given file is searched in the current Skribe path

The function skribe-load is generally used to load in the Skribe memory, a package or an extension. In general the prelude of a Skribe document (the expressions placed before the document call) contains several skribe-load. The file is search in the Skribe path.

prototype
(skribe-load :engine :path file opt...)
optionenginesdescription
engineThe engine used to evaluate the expressions.
pathThe optional path where to find the file. The default path is skribe-path.
argumentdescription
fileThe file containing the expressions to be loaded.
opt...Additional user options.
See also
skribe-load-options skribe-path skribe-path-set!

Returns the user of options of the last call to skribe-load

prototype
(skribe-load-options)
See also
skribe-load

Skribe provides functions for dealing with paths. These functions are related to the path that can be specified on the command line, when the Skribe compiler is invoked (see Chapter Skribe compiler11.)

prototype
(skribe-path)
(skribe-image-path)
(skribe-bib-path)
(skribe-source-path)
See also
include skribe-load image source bibliography skribe-path-set! skribe-image-path-set! skribe-bib-path-set! skribe-source-path-set!

The function skribe-path-set! sets a new path.

prototype
(skribe-path-set! path)
(skribe-image-path-set! path)
(skribe-bib-path-set! path)
(skribe-source-path-set! path)
argumentdescription
pathA list of strings which is the new Skribe search path.
See also
skribe-path skribe-image-path skribe-bib-path skribe-source-path

8.2 Misc. Functions

The function skribe-release returns the Skribe version as a string

prototype
(skribe-release)

For instance, the following piece of code:

[This manual documents the ,(bold (skribe-release)) Skribe release]

produces the following output

This manual documents the 1.2l Skribe release

The function skribe-configure accesses the whole Skribe configuration. It can be used to get or check the configuration.

prototype
(skribe-configure opt...)
argumentdescription
opt...Optional arguments.

The function skribe-configure can be used in three distinct ways depending on the number of provided arguments:

  1. If no argument is provided, skribe-configure returns a fresh list of Skribe configuration.
  2. If one keyword argument is provided, skribe-configure returns the value associated with this keyword in the configuration list. If this value does not exist, it returns the symbol void.
  3. (code "skribe-configure") is invoked with a list composed of keyword value. The actual configuration is checked against the provided values. Values are compared with equal except if the value to check has to be compared with a procedure. In that particular case the value of the check is the value produces by applying the function to the actual value. The result of skribe-configure is a boolean.

Here are some examples.

;; fetch the whole configuration list
(skribe-configure) 

;; fetch the release number
(skribe-configure :release) 

;; test if the release number is 1.0b
(skribe-configure :release "1.0b") 

;; test if the release number is greater or equal than "1.0b"
(skribe-configure :release (lambda (v) (string>=? v "1.0b")))

;; test if the release number is greater or equal than "1.0b"
;; and the implementation is bigloo
(skribe-configure :release (lambda (v) (string>=? v "1.0b")) :scheme "bigloo")

The function skribe-enforce-configure checks for the Skribe configuration. In case of mismatch, it raises an error. The syntax of the arguments if the same as that of skribe-configure when invoked with several arguments.

prototype
(skribe-enforce-configure opt...)
argumentdescription
opt...Optional arguments.

This Html page has been produced by Skribe.
Last update Tue Jun 29 09:37:13 2010.