X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=scm%2Fframework-tex.scm;h=8cfa09b76f30cf00a73744f1ee80c03f8394c841;hb=faebd4ac836603abe2f9c373ab09d33ea5deda16;hp=001da511130b6f488819fc7aaeb3d0c317b1f5d2;hpb=69d06539ea9a4a30269ca94547a79c47cf21cc30;p=lilypond.git diff --git a/scm/framework-tex.scm b/scm/framework-tex.scm index 001da51113..8cfa09b76f 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--2007 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)))