]> git.donarmstrong.com Git - lilypond.git/commitdiff
* scm/output-ps.scm: Resurrect.
authorJan Nieuwenhuizen <janneke@gnu.org>
Tue, 24 Feb 2004 21:59:24 +0000 (21:59 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Tue, 24 Feb 2004 21:59:24 +0000 (21:59 +0000)
* scm/output-tex.scm: Minimal cleanups.

* scm/paper.scm (paper-set-staff-size): Add lineheight.

ChangeLog
scm/output-ps.scm
scm/output-tex.scm
scm/paper.scm

index d3f55a571bb0ca41d7a5d865581e1d161b35d66a..c9a4c5eb843caac30d15ad2e843a252b5bbe0826 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2004-02-24  Jan Nieuwenhuizen  <janneke@gnu.org>
 
+       * scm/output-ps.scm: Resurrect.
+       
+       * scm/output-tex.scm: Minimal cleanups.
+
+       * scm/paper.scm (paper-set-staff-size): Add lineheight.
+
        * make/ly-rules.make: Remove any broken lily-*.tex files before
        lilypond-book run.
 
index dd9dba0ddb5d38da907c4012eb98f0b20a368f28..4bf3f57866d1c80118a0e26b13b8daf92bd5489d 100644 (file)
   (string-append
    "%!PS-Adobe-3.0\n"
    "%%Creator: " creator generate "\n"))
+
 (define (header-end)
   (string-append
    ;; URG: now we can't use scm output without Lily
 (define (unknown) 
   "\n unknown\n")
 
+;; top-of-file, wtf?
+(define (top-of-file)
+  (header (string-append "GNU LilyPond (" (lilypond-version) "), ")
+          (strftime "%c" (localtime (current-time)))))
+
+(define (output-paper-def pd)
+  (apply
+   string-append
+   (module-map
+    (lambda (sym var)
+      (let ((val (variable-ref var))
+           (key (symbol->string sym)))
+       
+       (cond
+        ((string? val)
+         (ps-string-def "lilypondpaper" sym val))
+        ((number? val)
+         (ps-number-def "lilypondpaper" sym
+                        (if (integer? val)
+                            (number->string val)
+                            (number->string (exact->inexact val)))))
+        (else ""))))
+      
+    (ly:output-def-scope pd))))
+
+
+(define (ps-string-def a b c)
+  (string-append "/" a (symbol->string b) " (" c ") def\n"))
+
+(define (ps-number-def a b c)
+  (string-append "/" a (symbol->string b) " " c " def\n"))
+
+(define (output-scopes scopes fields basename)
+  (define (output-scope scope)
+    (apply
+     string-append
+     (module-map
+      (lambda (sym var)
+       (let ((val (variable-ref var))
+             (tex-key (symbol->string sym)))
+        
+         (if (memq sym fields)
+             (header-to-file basename sym val))
+         
+         (cond
+          ((string? val)
+           (ps-string-def "lilypond" sym val))
+          
+          ((number? val)
+           (ps-number-def "lilypond" sym
+                          (if (integer? val)
+                              (number->string val)
+                              (number->string (exact->inexact val)))))
+          (else ""))))
+      scope)))
+  
+  (apply string-append
+   (map output-scope scopes)) )
+
index 94f1739dcb007ba3d01a1b4c9ffcb53c7776a027..ff3ecebcea42d75514eecefa8c95a98c6662fadf 100644 (file)
       (string-append "\\def\\" prefix (symbol->tex-key key) "{"  (output-tex-string str) "}%\n")
       ))
 
+(define (tex-number-def prefix key number)
+  (string-append "\\def\\" prefix (symbol->tex-key key) "{" number "}%\n"))
+
 (define (output-paper-def pd)
   (apply
    string-append
    (module-map
     (lambda (sym var)
-      (let
-         ((val (variable-ref var))
-          (key (symbol->tex-key sym))
-          )
+      (let ((val (variable-ref var))
+           (key (symbol->tex-key sym)))
 
        (cond
         ((string? val)
          (tex-string-def "lilypondpaper" sym val))
         ((number? val)
-         (string-append "\\def\\lilypondpaper" key "{"
-                        (if (integer? val)
-                            (number->string val)
-                            (number->string (exact->inexact val)))
-                        "}%\n"))
-        (else ""))
-       ))
+         (tex-number-def "lilypondpaper" sym
+                         (if (integer? val)
+                             (number->string val)
+                             (number->string (exact->inexact val)))))
+        (else ""))))
       
-    (ly:output-def-scope pd))
-  ))
+    (ly:output-def-scope pd))))
 
 (define (output-scopes scopes fields basename)
   (define (output-scope scope)
      string-append
      (module-map
      (lambda (sym var)
-       (let
-          ((val (variable-ref var))
-           (tex-key (symbol->string sym))
-          )
+       (let ((val (variable-ref var))
+            (tex-key (symbol->string sym)))
+        
         (if (memq sym fields)
             (header-to-file basename sym val))
 
         (cond
          ((string? val)
-          (tex-string-def "lilypond" sym val) )
+          (tex-string-def "lilypond" sym val))
          ((number? val)
-          (string-append "\\def\\" tex-key "{"
-                         (if (integer? val)
-                             (number->string val)
-                             (number->string (exact->inexact val)))
-                             "}"))
-         (else "") )
-
-        ))
-     scope)
-    ))
+          (tex-number-def "lilypond" sym
+                          (if (integer? val)
+                              (number->string val)
+                              (number->string (exact->inexact val)))))
+         (else ""))))
+     scope)))
   
   (apply string-append
-   (map output-scope scopes)) )
-
+        (map output-scope scopes)))
 
 (define (select-font name-mag-pair)
   (let*
        
        (string-append "\\" (cddr c)))))
 
+;; top-of-file, wtf?  ugh: tagline?
 (define (top-of-file)
   (string-append
    "% generated by LilyPond "
index bb802bb17bf24799ccc32073d116ef404de38966..7267c087738b9137b3dff911b6401dadba2de15f 100644 (file)
@@ -26,7 +26,7 @@
     (module-define! m 'ledgerlinethickness (+ (* 0.5 pt) (/ ss 10)))
     (module-define! m 'blotdiameter (* 0.35 pt))
     (module-define! m 'interscoreline (* 4 mm))
-  ))
+    (module-define! m 'lineheight (* 14 ss))))
 
 (define-public (set-global-staff-size sz)
   "Set the default staff size, where SZ is thought to be in PT."