]> git.donarmstrong.com Git - lilypond.git/commitdiff
* scm/framework-texstr.scm (output-framework): new file.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 19 Dec 2004 14:42:51 +0000 (14:42 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 19 Dec 2004 14:42:51 +0000 (14:42 +0000)
* scm/output-texstr.scm: new file. Collect (TEXT . ) calls for TeX
processing.

ChangeLog
scm/framework-texstr.scm [new file with mode: 0644]
scm/output-texstr.scm [new file with mode: 0644]

index 1b5d68e042daa26df96313d7060556f97c5a4542..ec008cbe1a690b50f717c8c1636647df00edd8d0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2004-12-19  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * 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 (file)
index 0000000..2c6a25f
--- /dev/null
@@ -0,0 +1,69 @@
+;;;; framework-tex.scm --
+;;;;
+;;;;  source file of the GNU LilyPond music typesetter
+;;;;
+;;;; (c)  2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+(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 (file)
index 0000000..ffcf179
--- /dev/null
@@ -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))))
+