]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/framework-tex.scm
Run `make grand-replace'.
[lilypond.git] / scm / framework-tex.scm
index 83c64820e566d0b1cc48d1514d121d81a410ecc3..5a602e4e489ec4f2d914b5ba5282f4f01d1e7f90 100644 (file)
@@ -2,7 +2,7 @@
 ;;;;
 ;;;; source file of the GNU LilyPond music typesetter
 ;;;;
-;;;; (c) 2004--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+;;;; (c) 2004--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
 (define-module (scm framework-tex)
   #:export (output-framework-tex       
@@ -10,7 +10,6 @@
 
 (use-modules (ice-9 regex)
             (ice-9 string-fun)
-            (ice-9 format)
             (scm page)
             (scm paper-system)
             (guile)
@@ -20,6 +19,8 @@
             (scm kpathsea)
             (lily))
 
+(define format ergonomic-simple-format)
+
 (define (output-formats)
   (define formats (ly:output-formats))
   (set! formats (completize-formats formats))
@@ -83,7 +84,7 @@
      (apply string-append
            (map
             (lambda (sub-name)
-              (format #f "\\font\\~a=~a scaled ~a%\n"
+              (format "\\font\\~a=~a scaled ~a%\n"
                       (tex-font-command-raw
                        sub-name (ly:font-magnification font))
                       sub-name
 
 (define-public (output-framework basename book scopes fields)
   (let* ((filename (format "~a.tex" basename))
-        (outputter  (ly:make-paper-outputter (open-file filename "wb") "tex"))
+        (outputter  (ly:make-paper-outputter (open-file filename "wb") 'tex))
         (paper (ly:paper-book-paper book))
         (page-stencils (map page-stencil (ly:paper-book-pages book)))
         (last-page (car (last-pair pages)))
                basename book scopes fields)
   (let* ((filename (format "~a.tex" basename))
         (outputter  (ly:make-paper-outputter
-                     (open-file filename "w") "tex"))
+                     (open-file filename "w") 'tex))
         (paper (ly:paper-book-paper book))
         (lines (ly:paper-book-systems book))
         (last-line (car (last-pair lines))))
                basename book scopes fields)
   (let* ((filename (format "~a.tex" basename))
         (outputter  (ly:make-paper-outputter (open-file filename "wb")
-                                             "tex"))
+                                             'tex))
         (paper (ly:paper-book-paper book))
         (lines (ly:paper-book-systems book))
         (first-notes-index (list-index
         (output-scale (ly:output-def-lookup defs 'output-scale)))
     (postscript->pdf (* paper-width output-scale (/ (ly:bp 1)))
                     (* paper-height output-scale (/ (ly:bp 1)))
-                    (string-append (basename name ".tex") ".ps"))))
+                    (string-append (dir-basename name ".tex") ".ps"))))
 
 (define-public (convert-to-png book name)
   (let* ((defs (ly:paper-book-paper book))
      (* paper-width output-scale (/ (ly:bp 1)))
      (* paper-height output-scale (/ (ly:bp 1)))
 
-     (string-append (basename name ".tex") ".ps"))))
+     (string-append (dir-basename name ".tex") ".ps"))))
 
 (define-public (convert-to-ps book name)
   (let* ((paper (ly:paper-book-paper book))
         (preview? (string-contains name ".preview"))
         (papersizename (ly:output-def-lookup paper 'papersizename))
         (landscape? (eq? #t (ly:output-def-lookup paper 'landscape)))
-        (base (basename name ".tex"))
+        (base (dir-basename name ".tex"))
         (ps-name (format "~a.ps"  base ".ps"))
         (cmd (string-append "dvips"
                             (if preview?
            #f " *%.*\n?"
            (ly:kpathsea-expand-variable "extra_mem_top")
            'pre "" 'post)))
-        (base (basename name ".tex"))
+        (base (dir-basename name ".tex"))
         (cmd (format
               #f "latex \\\\nonstopmode \\\\input '~a'" name)))