]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/output-tex.scm
* scm/output-tex.scm (ps-output-expression): Eval embedded-ps
[lilypond.git] / scm / output-tex.scm
index e825cc02e30e8dfbc8c1194c00f1fdb475d2b3e7..41d48ef03bcdfbe6ccd9f08c009a67918638098c 100644 (file)
@@ -6,19 +6,27 @@
 ;;;;                  Han-Wen Nienhuys <hanwen@cs.uu.nl>
 
 
-(define-module (scm output-tex) )
-; (debug-enable 'backtrace)
-(use-modules (scm output-ps)
-            (ice-9 regex)
+;; (debug-enable 'backtrace)
+(define-module (scm output-tex))
+(use-modules (ice-9 regex)
             (ice-9 string-fun)
             (ice-9 format)
             (guile)
             (srfi srfi-13)
-            (lily)
-            )
+            (lily))
 
 (define this-module (current-module))
 
+;; dumper-compatibility
+(define output-ps #f)
+(define (ps-output-expression expr port)
+  (if (not output-ps)
+      (let ((ps-module (resolve-module '(scm output-ps))))
+       (eval '(use-modules (guile) (ice-9 regex) (srfi srfi-13) (lily))
+             ps-module)
+       (set! output-ps ps-module)))
+  (display (eval expr output-ps) port))
+
 ;;; Output interface entry
 (define-public (tex-output-expression expr port)
   (display (eval expr this-module) port ))
                (font-load-command (car x) (cdr x)))
              (map cdr font-name-alist))))
 
-
-
+;;
 ;; urg, how can exp be #unspecified?  -- in sketch output
 ;;
 ;; set! returns #<unspecified>  --hwn
+;;
 (define (fontify name-mag-pair exp)
   (string-append (select-font name-mag-pair)
                 exp))
 
 (define (end-output) 
   (begin
-                                       ; uncomment for some stats about lily memory      
-                                       ;               (display (gc-stats))
+    ;; uncomment for some stats about lily memory        
+    ;; (display (gc-stats))
     (string-append
      "\\lilypondend\n"
-                                       ; Put GC stats here.
-                  )))
+     ;; Put GC stats here.
+     )))
 
 (define (experimental-on)
   "")
    "\\lilypondspecial\n"
    "\\lilypondpostscript\n"))
 
-(define (header creator time-stamp
+(define (header creator time-stamp page-count)
   (string-append
    "% Generated by " creator "\n"
    "% at " time-stamp "\n"