;;;;
;;;; source file of the GNU LilyPond music typesetter
;;;;
-;;;; (c) 2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+;;;; (c) 2004--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
(define-module (scm framework-eps))
(define (dump-stencils-as-EPSes stencils book basename)
(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)
- ))
+ (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)
(if (pair? stencils)
- (let*
- ((line (car stencils))
- (rest (cdr stencils)))
+ (let* ((line (car stencils))
+ (rest (cdr stencils)))
+
(dump-stencil-as-EPS
paper
line (format "~a-~a" basename count)
- #f)
-
- (dump-stencils-as-separate-EPS rest (1+ count))
- )))
+ (ly:output-def-lookup paper 'force-eps-font-include))
+
+ (dump-stencils-as-separate-EPS rest (1+ count)))))
(let* ((tex-system-name (format "~a-systems.tex" basename))
(texi-system-name (format "~a-systems.texi" basename))
(tex-system-port (open-output-file tex-system-name))
(texi-system-port (open-output-file texi-system-name)))
- (display (format "Writing ~a\n" tex-system-name))
- (display (format "Writing ~a\n" texi-system-name))
+ (ly:message (_ "Writing ~a...") tex-system-name)
+ (ly:message (_ "Writing ~a...") texi-system-name)
(dump-stencils-as-separate-EPS stencils 1)
(for-each (lambda (c)
- (display (format "\\includegraphics{~a-~a.eps}%\n"
+ (if (< 0 c)
+ (begin
+ (display "\\ifx\\betweenLilyPondSystem \\undefined\n" tex-system-port)
+ (display " \\relax\n" tex-system-port)
+ (display "\\else\n" tex-system-port)
+ (display (format
+ " \\betweenLilyPondSystem{~a}\n" c) tex-system-port)
+ (display "\\fi\n" tex-system-port)))
+ (display (format "\\includegraphics{~a-~a.eps}\n"
basename (1+ c)) tex-system-port)
- (display (format "@image{~a-~a}@c\n"
+ (display (format "@image{~a-~a}\n"
basename (1+ c)) texi-system-port))
(iota (length stencils)))
-
- (display "@c eof" texi-system-port)
- (display "% eof" tex-system-port)
+ (display "@c eof - 'eof' is a Makefile marker; don not remove. " texi-system-port)
+ (display "% eof - 'eof' is Makefile marker; do not remove. " tex-system-port)
(dump-infinite-stack-EPS stencils))
(postprocess-output book framework-eps-module
(format "~a.eps" basename) (ly:output-formats)))
-(define-public (output-classic-framework
- basename book scopes fields)
-
+(define-public (output-classic-framework basename book scopes fields)
+ (output-scopes scopes fields basename)
+
(dump-stencils-as-EPSes
(map ly:paper-system-stencil (ly:paper-book-systems book))
book
basename))
(define-public (output-framework basename book scopes fields)
- (dump-stencils-as-EPSes (ly:paper-book-pages book)
- book
- basename))
+ (output-scopes scopes fields basename)
+ (dump-stencils-as-EPSes (ly:paper-book-pages book) book basename))
; redefine to imports from framework-ps