]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/lily.scm
release: 1.2.6
[lilypond.git] / scm / lily.scm
index 1e66463e58c7dbc2ec5adf87485b0a41a422f725..f1431284bce8d48ddcfe92bf91701169f89bf231 100644 (file)
    (("Clef_item"  "Span_bar") . (minimum_space 3.7))
    (("Time_signature" "Span_bar") . (minimum_space 2.0))
    (("Key_item"  "Span_bar") . (minimum_space 2.5))
-   (("Staff_bar" "Time_signature") . (minimum_space 2.0)) ;double check this.
+   (("Staff_bar" "Time_signature") . (minimum_space 1.5)) ;double check this.
    (("Time_signature" "begin-of-note") . (extra_space 2.0)) ;double check this.
    (("Key_item" "begin-of-note") . (extra_space 2.5))
    (("Staff_bar" "begin-of-note") . (extra_space 1.0))
 
   (define (select-font font-name magnification)
       (if (not (equal? font-name current-font))
-         (begin
+         (let* ((font-cmd (assoc font-name font-alist)))
            (set! current-font font-name)
-           (define font-cmd (assoc font-name font-alist))
            (if (eq? font-cmd #f)
                (begin
                  (set! font-cmd (cached-fontname font-count))
     (string-append
      "\\font" (font-switch i) "=" s "\n"))
 
-  ;; UGH
-   
-  (define (header-end) "\\turnOnPostScript")
+  (define (header-end)
+    (string-append
+     "\\special{! "
+     (ly-gulp-file "lily.ps")
+     ;; breaks on ppc
+;;     (regexp-substitute/global #f "\n" (ly-gulp-file "lily.ps") 'pre " %\n" 'post)
+     "}"
+     "\\input lilyponddefs \\turnOnPostScript"))
 
   (define (header creator generate) 
     (string-append
   ;;
   ;; need to do something to make this really safe.
   ;;
-  (if security-paranoia
-      (define (output-tex-string s)
-       (regexp-substitute/global #f "\\\\" s 'pre "$\\backslash$" 'post))
-      (define (output-tex-string s)    s))
+  (define (output-tex-string s)
+      (if security-paranoia
+         (regexp-substitute/global #f "\\\\" s 'pre "$\\backslash$" 'post)
+         s))
+      
 
   (define (lily-def key val)
     (string-append
      (apply string-append (map control->string l)) 
      (number->string thick) 
      " [ "
-     (if (> 1 dash) (number->string (- (* thick dash) thick)) "0") " "
+     (if (> 1 dash)
+        (number->string (- (* thick dash) thick))
+        "0")
+     " "
      (number->string (* 2 thick))
      " ] 0 draw_dashed_slur"))
 
   (define (font-switch i)
     (string-append (font i) " "))
 
-  (define (header-end) "")
+  (define (header-end)
+    (string-append
+     (ly-gulp-file "lilyponddefs.ps")
+     " {exch pop //systemdict /run get exec} "
+     (ly-gulp-file "lily.ps")
+     "{ exch pop //systemdict /run get exec } "
+    ))
+  
   (define (lily-def key val)
 
      (if (string=? (substring key 0 (min (string-length "mudelapaper") (string-length key))) "mudelapaper")