]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/framework-ps.scm
Doc:Extending -- Add example of grob-interpret-markup
[lilypond.git] / scm / framework-ps.scm
index b920d060585d17b2a8c7fcb98b11dd0e0029ffd0..baacb96124f856885d4e933bd023d216d23cc4d8 100644 (file)
@@ -1,8 +1,19 @@
-;;;; framework-ps.scm -- structure for PostScript output
+;;;; This file is part of LilyPond, the GNU music typesetter.
 ;;;;
-;;;;  source file of the GNU LilyPond music typesetter
+;;;; Copyright (C) 2004--2010 Han-Wen Nienhuys <hanwen@xs4all.nl>
 ;;;;
-;;;; (c) 2004--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
+;;;; LilyPond 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 3 of the License, or
+;;;; (at your option) any later version.
+;;;;
+;;;; LilyPond 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 LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (scm framework-ps))
 
@@ -582,30 +593,17 @@ fonts inline."
     (for-each (lambda (system-list)
                ;; filter out headers and top-level markup
                (if (pair? system-list)
-               (clip-score-systems
-                (if (> count 0)
-                    (format "~a-~a" basename count)
-                    basename)
-                system-list)))
+                   (clip-score-systems
+                    (if (> count 0)
+                        (format "~a-~a" basename count)
+                        basename)
+                    system-list)))
              score-system-list)))
 
 (define-public (output-preview-framework basename book scopes fields)
   (let* ((paper (ly:paper-book-paper book))
-        (systems (ly:paper-book-systems book))
-        (scale (ly:output-def-lookup paper 'output-scale))
-        (to-dump-systems '()))
-    ;; skip booktitles.
-    (if (and (not (ly:get-option 'include-book-title-preview))
-            (pair? systems)
-            (ly:prob-property (car systems) 'is-book-title #f))
-       (set! systems (cdr systems)))
-    (for-each
-     (lambda (sys)
-       (if (or (paper-system-title? sys)
-              (not (pair? to-dump-systems))
-              (paper-system-title? (car to-dump-systems)))
-          (set! to-dump-systems (cons sys to-dump-systems))))
-     systems)
+        (systems (relevant-book-systems book))
+        (to-dump-systems (relevant-dump-systems systems)))
     (dump-stencil-as-EPS paper
                         (stack-stencils Y DOWN 0.0
                                         (map paper-system-stencil
@@ -616,26 +614,6 @@ fonts inline."
                        (format "~a.preview.eps" basename)
                        (cons "png" (ly:output-formats)))))
 
-(if #f
-    (define-public (output-preview-framework basename book scopes fields)
-      (let* ((paper (ly:paper-book-paper book))
-            (systems (ly:paper-book-systems book))
-            (scale (ly:output-def-lookup paper 'output-scale))
-            (titles (take-while paper-system-title? systems))
-            (non-title (find (lambda (x)
-                               (not (paper-system-title? x))) systems))
-            (dump-me
-             (stack-stencils Y DOWN 0.0
-                             (map paper-system-stencil
-                                  (append titles (list non-title))))))
-       (output-scopes scopes fields basename)
-       (dump-stencil-as-EPS paper dump-me
-                            (format "~a.preview" basename)
-                            #t)
-       (postprocess-output book framework-ps-module
-                           (format "~a.preview.eps" basename)
-                           (ly:output-formats)))))
-
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (define-public (convert-to-pdf book name)