X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fframework-eps.scm;h=ad5125d3dd549258a74abcc1df0b0af199ffd871;hb=116fe5fbb8baeb3f7f500030144e33dabc74aa14;hp=78de309b8f47097f4d5ca0245a572133e8fd5bf2;hpb=75eebcb49e52d296b1da3e1074e0825d2c780db4;p=lilypond.git diff --git a/scm/framework-eps.scm b/scm/framework-eps.scm index 78de309b8f..ad5125d3dd 100644 --- a/scm/framework-eps.scm +++ b/scm/framework-eps.scm @@ -2,7 +2,7 @@ ;;;; ;;;; source file of the GNU LilyPond music typesetter ;;;; -;;;; (c) 2004--2006 Han-Wen Nienhuys +;;;; (c) 2004--2006 Han-Wen Nienhuys (define-module (scm framework-eps)) @@ -13,6 +13,8 @@ (ice-9 format) (guile) (scm framework-ps) + (scm paper-system) + (scm page) (scm output-ps) (srfi srfi-1) (srfi srfi-13) @@ -42,21 +44,27 @@ stencil, so LaTeX includegraphics doesn't fuck up the alignment." )) stencils)) + (define (dump-stencils-as-EPSes stencils book basename) + (define do-pdf (member "pdf" (ly:output-formats))) (define paper (ly:paper-book-paper book)) (define (dump-infinite-stack-EPS stencils) (let* ((dump-me (stack-stencils Y DOWN 2.0 stencils))) (dump-stencil-as-EPS paper dump-me basename #t))) - (define (dump-stencils-as-separate-EPS stencils count) + (define (dump-stencils-as-separate-EPS stencils count ) (if (pair? stencils) (let* ((line (car stencils)) - (rest (cdr stencils))) + (rest (cdr stencils)) + (system-base-name (format "~a-~a" basename count)) + ) (dump-stencil-as-EPS - paper line (format "~a-~a" basename count) - (ly:output-def-lookup paper 'force-eps-font-include)) - + paper line system-base-name + (ly:get-option 'include-eps-fonts)) + + (if do-pdf + (postscript->pdf 0 0 (string-append system-base-name ".eps"))) (dump-stencils-as-separate-EPS rest (1+ count))))) @@ -80,7 +88,7 @@ stencil, so LaTeX includegraphics doesn't fuck up the alignment." \\betweenLilyPondSystem{~a} \\fi " c) tex-system-port)) - (display (format "\\includegraphics{~a-~a.eps}\n" + (display (format "\\includegraphics{~a-~a}\n" basename (1+ c)) tex-system-port) (display (format "@image{~a-~a}\n" basename (1+ c)) texi-system-port)) @@ -89,12 +97,17 @@ stencil, so LaTeX includegraphics doesn't fuck up the alignment." (display "@c eof - 'eof' is a Makefile marker; do not remove. " texi-system-port) (display "% eof - 'eof' is Makefile marker; do not remove. " tex-system-port) - (dump-infinite-stack-EPS stencils)) + (dump-infinite-stack-EPS stencils) (postprocess-output book framework-eps-module - (format "~a.eps" basename) (ly:output-formats))) + (format "~a.eps" basename) (ly:output-formats)))) + + (define-public (output-classic-framework basename book scopes fields) (output-scopes scopes fields basename) + + (if (ly:get-option 'dump-signatures) + (write-system-signatures basename (ly:paper-book-systems book) 1)) (dump-stencils-as-EPSes (map paper-system-stencil (ly:paper-book-systems book)) @@ -103,7 +116,8 @@ stencil, so LaTeX includegraphics doesn't fuck up the alignment." (define-public (output-framework basename book scopes fields) (output-scopes scopes fields basename) - (dump-stencils-as-EPSes (ly:paper-book-pages book) book basename)) + (dump-stencils-as-EPSes + (map page-stencil (ly:paper-book-pages book)) book basename)) ; redefine to imports from framework-ps @@ -113,3 +127,4 @@ stencil, so LaTeX includegraphics doesn't fuck up the alignment." (define convert-to-tex convert-to-tex) (define convert-to-dvi convert-to-dvi) +