summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès2007-11-15 16:11:46 +0100
committerLudovic Courtès2007-11-15 16:11:46 +0100
commit0c26136279ec0f360483fa4a347ff3383a57401d (patch)
tree9035df1b6ecbb83f865e10ea78e11cbbabfdb8d9
parent925c7dc89981ca88ee0bcea73c28668338beece9 (diff)
downloadskribilo-0c26136279ec0f360483fa4a347ff3383a57401d.tar.gz
skribilo-0c26136279ec0f360483fa4a347ff3383a57401d.tar.lz
skribilo-0c26136279ec0f360483fa4a347ff3383a57401d.zip
slide: Add `:unfold?' option to `slide-topic'.
* doc/user/slide.skb: Update. * src/guile/skribilo/package/slide.scm (slide-topic, slide-subtopic)[:unfold?]: New argument. * src/guile/skribilo/package/slide/base.scm (make-outline-slide): Honor `:unfold?'. (slide-topic, slide-subtopic): Mark `:unfold?' as supported.
-rw-r--r--doc/user/slide.skb8
-rw-r--r--src/guile/skribilo/package/slide.scm8
-rw-r--r--src/guile/skribilo/package/slide/base.scm17
3 files changed, 20 insertions, 13 deletions
diff --git a/doc/user/slide.skb b/doc/user/slide.skb
index f937a75..9834ff9 100644
--- a/doc/user/slide.skb
+++ b/doc/user/slide.skb
@@ -103,7 +103,9 @@ used to automatically produce an outline at the beginning of each new
(: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.]))
+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:])
@@ -114,7 +116,9 @@ topics, as well as the titles of the slides under the current topic.]))
[#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.]))
+current subtopic.])
+ (:unfold? [If ,(code [#t]), then the outline will also
+show the contents of the current subtopic.]))
:source "skribilo/package/slide.scm"))
;*---------------------------------------------------------------------*/
diff --git a/src/guile/skribilo/package/slide.scm b/src/guile/skribilo/package/slide.scm
index 2f5d8a8..3195515 100644
--- a/src/guile/skribilo/package/slide.scm
+++ b/src/guile/skribilo/package/slide.scm
@@ -251,7 +251,7 @@
;* slide-topic ... */
;*---------------------------------------------------------------------*/
(define-markup (slide-topic :rest opt
- :key title (outline? #t)
+ :key title (outline? #t) (unfold? #t)
(ident #f) (class #f))
(new container
(markup 'slide-topic)
@@ -260,14 +260,15 @@
(class class)
(loc &invocation-location)
(options `((:outline? ,outline?)
- ,@(the-options opt :outline? :class)))
+ (:unfold? ,unfold?)
+ ,@(the-options opt :outline? :unfold? :class)))
(body (the-body opt))))
;*---------------------------------------------------------------------*/
;* slide-subtopic ... */
;*---------------------------------------------------------------------*/
(define-markup (slide-subtopic :rest opt
- :key title (outline? #f)
+ :key title (outline? #f) (unfold? #f)
(ident #f) (class #f))
(new container
(markup 'slide-subtopic)
@@ -276,6 +277,7 @@
(class class)
(loc &invocation-location)
(options `((:outline? ,outline?)
+ (:unfold? ,unfold?)
,@(the-options opt :outline? :class)))
(body (the-body opt))))
diff --git a/src/guile/skribilo/package/slide/base.scm b/src/guile/skribilo/package/slide/base.scm
index 2532221..f2d0209 100644
--- a/src/guile/skribilo/package/slide/base.scm
+++ b/src/guile/skribilo/package/slide/base.scm
@@ -148,23 +148,24 @@
(define (make-outline-slide topic engine)
- (let ((parent-topic (if (is-markup? topic 'slide-topic)
- topic
- (find1-up (lambda (n)
- (is-markup? n 'slide-topic))
- topic))))
+ (let* ((parent-topic (if (is-markup? topic 'slide-topic)
+ topic
+ (find1-up (lambda (n)
+ (is-markup? n 'slide-topic))
+ topic)))
+ (unfold? (markup-option topic :unfold?)))
(output (slide :title %slide-outline-title :toc #f
:class (markup-class topic)
;; The mark below is needed for cross-referencing by PDF
;; bookmarks.
(if (markup-ident topic) (mark (markup-ident topic)) "")
- (p (make-topic-list parent-topic #t
+ (p (make-topic-list parent-topic unfold?
make-topic-entry)))
engine)))
(markup-writer 'slide-topic (find-engine 'base)
- :options '(:title :outline? :class :ident)
+ :options '(:title :outline? :class :ident :unfold?)
:action (lambda (n e)
(if (markup-option n :outline?)
(make-outline-slide n e))
@@ -173,7 +174,7 @@
(markup-writer 'slide-subtopic (find-engine 'base)
;; FIXME: Largely untested.
- :options '(:title :outline? :class :ident)
+ :options '(:title :outline? :class :ident :unfold?)
:action (lambda (n e)
(if (markup-option n :outline?)
(make-outline-slide n e))