From 472b7e0192906f7a491a3c538bc36387578e86ef Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sun, 19 Dec 2004 14:42:51 +0000 Subject: [PATCH] * scm/framework-texstr.scm (output-framework): new file. * scm/output-texstr.scm: new file. Collect (TEXT . ) calls for TeX processing. --- ChangeLog | 5 +++ scm/framework-texstr.scm | 69 ++++++++++++++++++++++++++++++++++++++++ scm/output-texstr.scm | 28 ++++++++++++++++ 3 files changed, 102 insertions(+) create mode 100644 scm/framework-texstr.scm create mode 100644 scm/output-texstr.scm diff --git a/ChangeLog b/ChangeLog index 1b5d68e042..ec008cbe1a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2004-12-19 Han-Wen Nienhuys + * scm/framework-texstr.scm (output-framework): new file. + + * scm/output-texstr.scm: new file. Collect (TEXT . ) calls for TeX + processing. + * Documentation/user/invoking.itely (Invoking lilypond): add SVG * stepmake/stepmake/metafont-rules.make: make single SVG/PFA/PFB diff --git a/scm/framework-texstr.scm b/scm/framework-texstr.scm new file mode 100644 index 0000000000..2c6a25f8b7 --- /dev/null +++ b/scm/framework-texstr.scm @@ -0,0 +1,69 @@ +;;;; framework-tex.scm -- +;;;; +;;;; source file of the GNU LilyPond music typesetter +;;;; +;;;; (c) 2004 Han-Wen Nienhuys + +(define-module (scm framework-texstr) + #:export (output-framework-tex + output-classic-framework-tex)) + +(use-modules (ice-9 regex) + (ice-9 string-fun) + (ice-9 format) + (guile) + (srfi srfi-1) + (srfi srfi-13) + (lily)) + +(define (dump-page putter page last? with-extents?) + (ly:outputter-dump-string + putter + (format "\\lybox{~a}{~a}{%\n" + (if with-extents? + (interval-start (ly:stencil-extent page X)) + 0.0) + (if with-extents? + (- (interval-start (ly:stencil-extent page Y))) + 0.0))) + (ly:outputter-dump-string + putter + (if last? + "}%\n\\vfill\n" + "}%\n\\vfill\n\\lilypondpagebreak\n"))) + +(define-public (output-framework outputter book scopes fields basename ) + (let* ((paper (ly:paper-book-paper book)) + (pages (ly:paper-book-pages book)) + ) + (for-each + (lambda (x) + (ly:outputter-dump-string outputter x)) + (list)) + (for-each + (lambda (page) + (ly:outputter-dump-stencil outputter page)) + pages))) + +(define (dump-line putter line last?) + (ly:outputter-dump-string + putter + (format "\\lybox{~a}{~a}{%\n" + (ly:number->string + (max 0 (interval-end (ly:paper-system-extent line X)))) + (ly:number->string + (interval-length (ly:paper-system-extent line Y))))) + + (ly:outputter-dump-stencil putter (ly:paper-system-stencil line)) + (ly:outputter-dump-string + putter + (if last? + "}%\n" + "}\\interscoreline\n"))) + + +(define-public (convert-to-ps . args) #t) +(define-public (convert-to-pdf . args) #t) +(define-public (convert-to-png . args) #t) +(define-public (convert-to-dvi . args) #t) +(define-public (convert-to-tex . args) #t) diff --git a/scm/output-texstr.scm b/scm/output-texstr.scm new file mode 100644 index 0000000000..ffcf1797f1 --- /dev/null +++ b/scm/output-texstr.scm @@ -0,0 +1,28 @@ + +(define-module (scm output-texstr)) +(define this-module (current-module)) + +(use-modules + (guile) + (ice-9 regex) + (srfi srfi-13) + (lily)) + + +(define (dummy . foo) #f) +(map (lambda (x) (module-define! this-module x dummy)) + (append + (ly:all-stencil-expressions) + (ly:all-output-backend-commands))) + + +(define-public (text font s) + (call-with-output-string + (lambda (port) + (write (list + "HOI" + (ly:font-file-name font) + (ly:font-magnification font) + s + ) port)))) + -- 2.39.5