aboutsummaryrefslogtreecommitdiff
path: root/doc/user/slide.skb
blob: fa1534f7ba7b6953117adfbca60c125c8e545587 (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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
;;; slide.skb  --  Slides
;;;
;;; Copyright 2006, 2008  Ludovic Court�s <ludo@gnu.org>
;;; Copyright 2004  Manuel Serrano
;;;
;;;
;;; 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.


;*---------------------------------------------------------------------*/
;*    dummy-slide-set-output ...                                       */
;*---------------------------------------------------------------------*/
(define dummy-slide-set-output
   (lambda (n e)
      (let* ((a (markup-option n :author))
	     (t (markup-option n :title))
	     (b (markup-body n))
	     (ta (table (tr (map (lambda (n)
				    (td :valign 'top :align 'center n))
	                         (if (list? a) a (list a)))))))
	 (skribe-eval (center (bold t)) e)
	 (skribe-eval (center ta) e)
	 (output b e))))

(define dummy-slide-output
   (lambda (n e)
      (let* ((t (markup-option n :title))
	     (b (markup-body n)))
	 (skribe-eval (bold t) e)
	 (output b e))))

(define dummy-slide-vspace-output
   (lambda (n e)
     (skribe-eval (linebreak) e)
     (skribe-eval (center (tt "[vspace]")) e)
     (skribe-eval (linebreak) e)))

(define dummy-slide-embed-output
   (lambda (n e)
     (skribe-eval (linebreak) e)
     (skribe-eval (tt (or (markup-option n :alt)
			  (markup-option n :command)))
		  e)))

;*---------------------------------------------------------------------*/
;*    Computer programs                                                */
;*---------------------------------------------------------------------*/
(chapter :title "Slide Package"
         :ident "slides"

   (p [This chapter describes the facilities Skribilo offers authoring
slides.  As usual, in order to access the functionalities described in
this chapter, the ,(code [(use-modules (skribilo package slide))])
expression must be introduced at the beginning of the document.])

   ;; FIXME: The following paragraph describes inaccessible features.
   #;(p [The Slide package supports two ,(markup-ref "skribe-load") user
options: ,(param :advi) and ,(param :prosper).  The first one tells
Skribe to generate slides for the Advi presenter. The second one tells
Skribe to generate slides for the LaTeX prosper package.])

;*---------------------------------------------------------------------*/
;*    slide ... @label slide@                                          */
;*---------------------------------------------------------------------*/
(section :title "Slides and Slide Topics"
   
   (p [A ,(code "slide") function call creates a slide.])
   
   (doc-markup 'slide
	       `((:title [The title of the slide.])
		 (:number [The number of the slide (a boolean or an integer).])
		 (:toc [This argument controls if the slide must
be referenced in the ,(mark :mark "toc" "table of contents").])
		 (:vspace [The boolean ,(code "#f") or an integer representing
the vertical space size between the title and the body of the slide.])
		 (:vfill [A boolean that is used to control whether a LaTeX
,(code "\\vfill") is issued at the end of the slide.])
		 (:transition [The boolean ,(code "#f") or a symbol in the 
list ,(code "(split blinds box wipe dissolve glitter)").])
		 (:bg [The background color of the slide.])
		 (:image [The background image of the slide.]))
	       :source "skribilo/package/slide.scm")
   
    (p [Optionally, one may group slides into ,(emph [topics]) and
,(emph [subtopics]).  Topics and subtopics are just logical grouping
under a given title that are meant to provide structure to a set of
slides.  With their ,(code [:outline?]) option, these two markups can be
used to automatically produce an outline at the beginning of each new
(sub)topic, so that the audience knows what the talk is heading to.])
   
   (doc-markup 'slide-topic
	       `((:title [The title of a topic.])
	         (:outline? [A boolean (i.e., ,(code [#t]) or ,(code
[#f])) telling whether an outline should be produced at the beginning of
this topic.  The outline will typically list the titles of the different
topics, as well as the titles of the slides under the current topic.])
	         (:unfold? [If ,(code [#t]), then the outline will also
show the contents of the current topic.]))
	       :source "skribilo/package/slide.scm")
   
   (p [The ,(code [slide-subtopic]) markup is similar:])

   (doc-markup 'slide-subtopic
	       `((:title [The title of a subtopic.])
	         (:outline? [A boolean (i.e., ,(code [#t]) or ,(code
[#f])) telling whether an outline should be produced at the beginning of
this subtopic.  The outline will typically list the titles of the
different subtopics, as well as the titles of the slides under the
current subtopic.])
	         (:unfold? [If ,(code [#t]), then the outline will also
show the contents of the current subtopic.]))
	       :source "skribilo/package/slide.scm")
   
   (p [This package understands the following additional customs (see
Section ,(ref :subsection "Engine Customs" :page #t)):

,(description
    (item :key (tt [slide-outline-title])
       [The title of outline slides.  By default, no title is
produced.])
    (item :key (tt [slide-outline-active-color])
       [The color in which the current slide topic is displayed in
outline slides.])
    (item :key (tt [slide-outline-inactive-color])
       [The color in which inactive slide topics are displayed in
outline slides.]))]))

;*---------------------------------------------------------------------*/
;*    slide-pause                                                      */
;*---------------------------------------------------------------------*/
(section :title "Pause"
   
   (p [A ,(code "slide-pause") function call introduces a pause in the slide
projection.  This may not be supported by all engines.])
   
   (doc-markup 'slide-pause
	       '()
	       :common-args '()
	       :source "skribilo/package/slide.scm"))

;*---------------------------------------------------------------------*/
;*    slide-vspace ...                                                 */
;*---------------------------------------------------------------------*/
(section :title "Slide Vertical Space"
   
   (p [The ,(code "slide-vspace") introduces a vertical space in the slide.])
   
   (doc-markup 'slide-vspace
	       '((:unit [The unit of the space.])
		 (#!rest val [The size of the vertical space.]))
	       :common-args '()
	       :source "skribilo/package/slide.scm"))

;*---------------------------------------------------------------------*/
;*    slide-embed ...                                                  */
;*---------------------------------------------------------------------*/
(section :title "Slide Embed Applications"
   
   (p [Embed an application inside a slide.])
   
   (doc-markup 'slide-embed
	       `((:command [The binary file for running the embedded 
application.])
	         (:arguments [Additional arguments to be passed to the
application (a list of strings).])
		 (:geometry-opt [The name of the geometry option to be sent
to the embedded application.])
		 (:geometry [The geometry value to be sent.])
		 (:rgeometry [A relative geometry to be sent.])
		 (:transient-opt [The name of the transient option to be sent
to the embedded application.])
		 (:transient [The transient value to be sent.])
		 (:alt [An alternative Skribilo expression to be used if the
output format does not support embedded application.]))
	       :common-args '()
	       :source "skribilo/package/slide.scm"))

;*---------------------------------------------------------------------*/
;*    Example                                                          */
;*---------------------------------------------------------------------*/
(section :title "Example"
   (p [Here is a complete example of Skribilo slides:])
   
   (if (and (engine-format? "html") 
	    (not (equal? (engine-custom (find-engine 'html) 'html-variant)
	         "html4")))
       ;; Show the example and its result
       (example-produce
         (example :legend "Example of Skribilo slides"
		  (prgm :file "src/slides.skb"))
	 (disp
	  (processor :combinator
		     (lambda (e1 e2)
		       (let ((e (copy-engine 'document-engine e2)))
			 (markup-writer 'document e
					:options '(:title :author :ending)
					:action dummy-slide-set-output)
			 (markup-writer 'slide e
					:options '(:title :ident
						   :number :toc :vspace)
					:action dummy-slide-output)
			 (markup-writer 'slide-vspace
					:action dummy-slide-vspace-output)
			 (markup-writer 'slide-embed
			                :options '(:command :arguments :alt)
					:action dummy-slide-embed-output)
			 e))
		     (include "src/slides.skb"))))
       ;; Show only the example (i.e. don't produce a document in a document)
       (example :legend "Example of Skribilo slides"
	       (prgm :file "src/slides.skb")))))

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