This section describes the Skribe standard library
The function include
is particularily useful to spread a
long document amongst several files.
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... ) |
engine | | The engine used to evaluate the expressions. |
path | | The optional path where to find the file. The default
path is skribe-path . |
file | The file containing the expressions to be loaded. |
opt... | Additional user options. |
skribe-load-options skribe-path skribe-path-set! |
Returns the user of options of the last call to
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.)
The function skribe-path-set!
sets a new path.
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... ) |
opt... | Optional arguments. |
The function skribe-configure
can be used in three distinct
ways depending on the number of provided arguments:
- If no argument is provided,
skribe-configure
returns
a fresh list of Skribe configuration.
- 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
.
- (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... ) |
opt... | Optional arguments. |