aboutsummaryrefslogtreecommitdiff
path: root/doc/user/lib.skb
blob: 4c558db9f121a3fa874b65815829692f39f0fe3e (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
;;; lib.skb  --  Standard library.
;;;
;;; Copyright 2007, 2008  Ludovic Court�s <ludo@gnu.org>
;;; Copyright 2003  Erick Gallesio <eg@essi.fr>
;;;
;;;
;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 2 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program; if not, write to the Free Software
;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
;;; USA.

(chapter :title "Standard Library" 

   (p [This section describes Skribilo's standard library.])


;;;
(section :title "File Functions"
   
   (p [The function ,(code "include") is particularily useful to spread a
long document amongst several files.])
   
   (doc-markup 'include
	       '((file [The file containing the nodes to be included. 
These nodes are included in the document in place of the ,(code "include") 
call.]))
	       :common-args '()
	       :see-also '(*document-path*)
	       :idx *function-index*)
   
   (p [The given file is searched in the current ,(ref :mark
"*document-path*" :text "document path").])
   
   (p [Skribilo provides functions to deal with paths.  These functions
are related to the path that can be specified on the command line,
when the Skribilo compiler is invoked (see Chapter 
,(ref :ident "compiler").)])
   
   (doc-markup '*document-path*
	       '()
               ;;:skribe-source? #f
	       ;;:source "skribilo/parameters.scm"
               :source #f
               :def '(define (*document-path* #!optional opt) ...)
	       :common-args '()
	       :others '()  
	       :see-also '(include *image-path* *bib-path* *source-path*)
	       :idx *function-index*)
   
   (index :index *function-index* "skribe-path")
   (index :index *function-index* "skribe-path-set!")

   (p [,(tt [*document-path*]) is a procedure as returned by ,(srfi-ref
39) ,(tt [make-parameter]).  As such, ,(tt [(*document-path*)]) returns
the current document path, while ,(tt [(*document-path* '("."
"/some/path"))]) changes the value of the current path.  This is
equivalent to Skribe's ,(tt [skribe-path]) and ,(tt [skribe-path-set!])
functions.  The value of ,(tt [*document-path*]) can also be changed
using the ,(tt [-I]) command-line option of the compiler (see ,(numref
:text [Chapter] :ident "compiler") for details).]))


;;; Misc   
(section :title "Configuration Functions"
         :ident "config-module"
   
   (p [Several functions describing the configuration of Skribilo are
exported by the ,(code [(skribilo config)]) module.  First, the ,(code
"skribilo-version") function returns the version of Skribilo being used
as a string.]

   (doc-markup 'skribilo-version
	       '()
	       :common-args '()
	       :source "skribilo/config.scm"
	       :idx *function-index*))
   
   (p [For instance, the following piece of code:])
   (prgm :language skribe
        "[This manual documents version ,(bold (skribilo-version)) of Skribilo.]")
   (p [produces the following output])
   (disp [This manual documents version ,(bold (skribilo-version)) of Skribilo.])
   
   (p [The ,(code "skribilo-url") function returns, not surprisingly,
the URL of the project:]
   
   (doc-markup 'skribilo-url
               '()
               :common-args '()
               :source "skribilo/config.scm"
               :idx *function-index*))
   
   (p [The ,(code [skribilo-module-directory]) returns the directory
under which Skribilo modules were installed:]
      
   (doc-markup 'skribilo-module-directory
	       '()
	       :common-args '()
	       :source "skribilo/config.scm"
	       :idx *function-index*)
	       
   [Similar information can be obtained using the ,(code
[skribilo-config]) program, as described in ,(numref :text [Section]
:ident "skribilo-config").])))


;;; Local Variables:
;;; coding: latin-1
;;; ispell-local-dictionary: "american"
;;; End: