From 2aa140cdc7b08509f9fbec9a50c404e10cd9f25a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 25 Jan 2008 18:24:23 +0100 Subject: lout: Make it so that customs are not modified by `slide'. * src/guile/skribilo/engine/lout.scm (lout-pdf-bookmark-node?): Handle `slide-(sub)?topic' nodes. (lout-engine)[pdf-bookmark-closed-pred]: Likewise. * src/guile/skribilo/package/slide/lout.scm: Don't modify the `pdf-bookmark-closed-pred' and `pdf-bookmark-node-pred' customs. It had the side-effect of removing all bookmarks from the user manual. --- src/guile/skribilo/engine/lout.scm | 8 ++++++-- src/guile/skribilo/package/slide/lout.scm | 23 ++++------------------- 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/src/guile/skribilo/engine/lout.scm b/src/guile/skribilo/engine/lout.scm index 364a0bd..4b6b62d 100644 --- a/src/guile/skribilo/engine/lout.scm +++ b/src/guile/skribilo/engine/lout.scm @@ -550,7 +550,9 @@ (or (is-markup? node 'chapter) (is-markup? node 'section) (is-markup? node 'subsection) - (is-markup? node 'slide))) + (is-markup? node 'slide) + (is-markup? node 'slide-topic) + (is-markup? node 'slide-subtopic))) @@ -737,7 +739,9 @@ ;; opens the PDF document. (pdf-bookmark-closed-pred ,(lambda (n e) - (not (is-markup? n 'chapter)))) + (not (and (markup? n) + (memq (markup-markup n) + '(chapter slide slide-topic)))))) ;; color (color? #t) diff --git a/src/guile/skribilo/package/slide/lout.scm b/src/guile/skribilo/package/slide/lout.scm index c6e7f07..ef5ded9 100644 --- a/src/guile/skribilo/package/slide/lout.scm +++ b/src/guile/skribilo/package/slide/lout.scm @@ -1,6 +1,6 @@ ;;; lout.scm -- Lout implementation of the `slide' package. ;;; -;;; Copyright 2005, 2006 Ludovic Courtès +;;; Copyright 2005, 2006, 2008 Ludovic Courtès ;;; ;;; ;;; This program is free software; you can redistribute it and/or modify @@ -140,21 +140,6 @@ ) - -;;; -;;; Customs for a nice handling of topics/subtopics. -;;; - -(let ((lout (find-engine 'lout))) - (if lout - (begin - (engine-custom-set! lout 'pdf-bookmark-node-pred - (lambda (n e) - (or (is-markup? n 'slide) - (is-markup? n 'slide-topic) - (is-markup? n 'slide-subtopic)))) - (engine-custom-set! lout 'pdf-bookmark-closed-pred - (lambda (n e) #f))))) - - -;;; arch-tag: 0c717553-5cbb-46ed-937a-f844b6aeb145 +;;; Local Variables: +;;; coding: latin-1 +;;; End: -- cgit v1.2.3