]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/titling.scm
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / scm / titling.scm
index a72fa8085696e99e4ccbba800a6b0bb0324ba5d4..f6ac5f0b124ecc84f08a0023a9da150116f70cbd 100644 (file)
@@ -2,12 +2,12 @@
 ;;;;
 ;;;;  source file of the GNU LilyPond music typesetter
 ;;;;
-;;;; (c) 2004 Jan Nieuwenhuizen <janneke@gnu.org>
+;;;; (c) 2004--2006 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;;;          Han-Wen Nienhuys <hanwen@cs.uu.nl>
 
-(define-public (page-properties layout)
-  (list (append `((linewidth . ,(ly:paper-get-number
-                                layout 'linewidth)))
+(define-public (layout-extract-page-properties layout)
+  (list (append `((line-width . ,(ly:paper-get-number
+                                layout 'line-width)))
                (ly:output-def-lookup layout 'text-font-defaults))))
 
 ;;;;;;;;;;;;;;;;;;
@@ -24,33 +24,34 @@ page:last?, page:page-number-string and page:page-number
 
   (define (interpret-in-page-env potential-markup)
     (if (markup? potential-markup)
-       (let*
-           ((alists  (map ly:module->alist scopes))
-            (prefixed-alists
-             (map (lambda (alist)
-                    (map (lambda (entry)
-                           (cons
-                            (string->symbol
-                             (string-append
-                              "header:"
-                              (symbol->string (car entry))))
-                            (cdr entry)
-                            ))
-                         alist))
-                  alists))
-            (pgnum-alist (list
-                          (cons 'page:last? last?)
-                          (cons 'page:page-number-string
-                                (number->string page-number))
-                          (cons 'page:page-number  page-number)))
-            (props (append
-                    (list pgnum-alist)
-                    prefixed-alists
-                    (page-properties layout)))
-            )
-
+       (let* ((alists (map ly:module->alist scopes))
+              (prefixed-alists
+               (map (lambda (alist)
+                      (map (lambda (entry)
+                             (cons
+                              (string->symbol
+                               (string-append
+                                "header:"
+                                (symbol->string (car entry))))
+                              (cdr entry)))
+                           alist))
+                    alists))
+              (pgnum-alist
+               (list
+                (cons 'header:tagline
+                      (ly:modules-lookup scopes 'tagline
+                                         (ly:output-def-lookup layout 'tagline)))
+                (cons 'page:last? last?)
+                (cons 'page:page-number-string
+                      (number->string page-number))
+                (cons 'page:page-number page-number)))
+              (props (append
+                      (list pgnum-alist)
+                      prefixed-alists
+                      (layout-extract-page-properties layout))))
+         
          (interpret-markup layout props potential-markup))
-       
+
        empty-stencil))
 
   (interpret-in-page-env
@@ -69,28 +70,23 @@ PROPS argument will include variables set in SCOPES (prefixed with
     (let ((x (ly:modules-lookup scopes sym)))
       (if (markup? x) x #f)))
 
-  (let*
-      ((alists  (map ly:module->alist scopes))
-       (prefixed-alist
-       (map (lambda (alist)
-              (map (lambda (entry)
-                     (cons
-                      (string->symbol
-                       (string-append
-                        "header:"
-                        (symbol->string (car entry))))
-                      (cdr entry)
-                     ))
-                   alist))
-            alists))
-       (props (append prefixed-alist
-                     (page-properties layout)))
+  (let* ((alists (map ly:module->alist scopes))
+        (prefixed-alist
+         (map (lambda (alist)
+                (map (lambda (entry)
+                       (cons
+                        (string->symbol
+                         (string-append
+                          "header:"
+                          (symbol->string (car entry))))
+                        (cdr entry)))
+                     alist))
+              alists))
+        (props (append prefixed-alist
+                       (layout-extract-page-properties layout)))
 
-       (markup (ly:output-def-lookup layout what))
-       )
+        (markup (ly:output-def-lookup layout what)))
 
     (if (markup? markup)
        (interpret-markup layout props markup)
-       (ly:make-stencil '() '(1 . -1) '(1 . -1)))
-  ))
-
+       (ly:make-stencil '() '(1 . -1) '(1 . -1)))))