diff options
author | Ludovic Courtes | 2008-02-15 16:21:56 +0100 |
---|---|---|
committer | Ludovic Courtes | 2008-02-15 16:21:56 +0100 |
commit | 3908f426de0cefb90d5bdb2ac979e91505f78c86 (patch) | |
tree | f4dc77bdcfc86393a5e03c7ec680d25cc30f7d7a /src/guile | |
parent | ccf9b00387aab504f1cf73329d07a86224281a82 (diff) | |
download | skribilo-3908f426de0cefb90d5bdb2ac979e91505f78c86.tar.gz skribilo-3908f426de0cefb90d5bdb2ac979e91505f78c86.tar.lz skribilo-3908f426de0cefb90d5bdb2ac979e91505f78c86.zip |
slide: Add new customs.
* src/guile/skribilo/package/slide/base.scm: Support the `slide-outline-title',
`slide-outline-active-color' and `slide-outline-inactive-color' customs.
* doc/user/slide.skb, NEWS: Update.
Diffstat (limited to 'src/guile')
-rw-r--r-- | src/guile/skribilo/package/slide.scm | 4 | ||||
-rw-r--r-- | src/guile/skribilo/package/slide/base.scm | 26 |
2 files changed, 16 insertions, 14 deletions
diff --git a/src/guile/skribilo/package/slide.scm b/src/guile/skribilo/package/slide.scm index 5a62a20..86cfb90 100644 --- a/src/guile/skribilo/package/slide.scm +++ b/src/guile/skribilo/package/slide.scm @@ -1,7 +1,7 @@ ;;; slide.scm -- Overhead transparencies. ;;; +;;; Copyright 2006, 2007, 2008 Ludovic Courtès <ludo@gnu.org> ;;; Copyright 2003, 2004 Manuel Serrano -;;; Copyright 2006, 2007 Ludovic Courtès <ludo@gnu.org> ;;; ;;; ;;; This program is free software; you can redistribute it and/or modify @@ -288,8 +288,6 @@ ;;; Initialization. ;;; -(format (current-error-port) "Slides initializing...~%") - ;; Register specific implementations for lazy loading. (when-engine-is-loaded 'base (lambda () diff --git a/src/guile/skribilo/package/slide/base.scm b/src/guile/skribilo/package/slide/base.scm index f2d0209..45657c5 100644 --- a/src/guile/skribilo/package/slide/base.scm +++ b/src/guile/skribilo/package/slide/base.scm @@ -1,7 +1,7 @@ ;;; base.scm -- Overhead transparencies, `base' engine. ;;; +;;; Copyright 2006, 2008 Ludovic Courtès <ludo@gnu.org> ;;; Copyright 2003, 2004 Manuel Serrano -;;; Copyright 2006 Ludovic Courtès <ludovic.courtes@laas.fr> ;;; ;;; ;;; This program is free software; you can redistribute it and/or modify @@ -31,7 +31,7 @@ :use-module (srfi srfi-1) - :export (%slide-outline-title %slide-outline-itemize-symbols)) + :export (%slide-outline-itemize-symbols)) (fluid-set! current-reader %skribilo-module-reader) @@ -119,12 +119,16 @@ (make-entry-proc t current-topic)) %slide-outline-itemize-symbols))) -(define (make-topic-entry topic current-topic) +(define (make-topic-entry topic current-topic engine) ;; Produce an entry for `topic'. Colorize it based on the fact ;; that the current topic is `current-topic' (it may need to be ;; hightlighted). - (let ((current? (eq? topic current-topic))) - (color :fg (if current? "#000000" "#666666") + (let ((current? (eq? topic current-topic)) + (active (or (engine-custom engine 'slide-outline-active-color) + "#000000")) + (inactive (or (engine-custom engine 'slide-outline-inactive-color) + "#666666"))) + (color :fg (if current? active inactive) (apply (if current? bold (lambda (x) x)) (list (markup-option topic :title)))))) @@ -133,9 +137,6 @@ ;;; Default topic/subtopic handling. ;;; -;; Title for the automatically-generated outline slide. -(define %slide-outline-title "") - ;; Circular list of symbols to be passed to `itemize' in outlines. (define %slide-outline-itemize-symbols (let loop ((names '(#t "-" "bullet" "->" "middot"))) @@ -153,14 +154,17 @@ (find1-up (lambda (n) (is-markup? n 'slide-topic)) topic))) - (unfold? (markup-option topic :unfold?))) - (output (slide :title %slide-outline-title :toc #f + (unfold? (markup-option topic :unfold?)) + (title (or (engine-custom engine 'slide-outline-title) ""))) + (output (slide :title 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 unfold? - make-topic-entry))) + (lambda (topic current) + (make-topic-entry topic current + engine))))) engine))) |