X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fframework-tex.scm;h=5a602e4e489ec4f2d914b5ba5282f4f01d1e7f90;hb=5b4b0d6e9a197e8f9eb085b7c2ad78b8be3e5cfc;hp=83c64820e566d0b1cc48d1514d121d81a410ecc3;hpb=7eaeba29769613cb105e71ac40a71746d1601d90;p=lilypond.git diff --git a/scm/framework-tex.scm b/scm/framework-tex.scm index 83c64820e5..5a602e4e48 100644 --- a/scm/framework-tex.scm +++ b/scm/framework-tex.scm @@ -2,7 +2,7 @@ ;;;; ;;;; source file of the GNU LilyPond music typesetter ;;;; -;;;; (c) 2004--2006 Han-Wen Nienhuys +;;;; (c) 2004--2008 Han-Wen Nienhuys (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 @@ -190,7 +191,7 @@ (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))) @@ -233,7 +234,7 @@ 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)))) @@ -260,7 +261,7 @@ 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 @@ -295,7 +296,7 @@ (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)) @@ -311,14 +312,14 @@ (* 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? @@ -351,7 +352,7 @@ #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)))