]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/output-tex.scm
small fixes.
[lilypond.git] / scm / output-tex.scm
index f86cc536997c76802b980b07ec0580c1c96d11e5..7f8259d4a4417569d963b9cb4bd93e5e3c7eba50 100644 (file)
@@ -6,28 +6,56 @@
 ;;;;                  Han-Wen Nienhuys <hanwen@cs.uu.nl>
 
 
-(define-module (scm output-tex) )
-; (debug-enable 'backtrace)
-(use-modules (scm output-ps)
-            (ice-9 regex)
+;; (debug-enable 'backtrace)
+(define-module (scm output-tex)
+  #:re-export (quote)
+  #:export (define-fonts
+            unknown
+            output-paper-def
+            output-scopes
+            select-font
+            blank
+            dot
+            beam
+            bracket
+            dashed-slur
+            char
+            dashed-line
+            zigzag-line
+            symmetric-x-triangle
+            ez-ball
+            comment
+            end-output
+            experimental-on
+            repeat-slash
+            header-end
+            header
+            placebox
+            bezier-sandwich
+            start-system
+            stop-system
+            stop-last-system
+            horizontal-line
+            filledbox
+            round-filled-box
+            text
+            tuplet
+            polygon
+            draw-line
+            between-system-string
+            define-origin
+            no-origin
+            start-page
+            stop-page
+            )
+)
+
+(use-modules (ice-9 regex)
             (ice-9 string-fun)
             (ice-9 format)
             (guile)
             (srfi srfi-13)
-            (lily)
-            )
-
-(define this-module (current-module))
-
-;; dumper-compatibility
-
-(define (ps-output-expression expr port)
-  (let ((output-ps (resolve-module '(scm output-ps))))
-    (display (eval expr output-ps) port)))
-
-;;; Output interface entry
-(define-public (tex-output-expression expr port)
-  (display (eval expr this-module) port ))
+            (lily))
 
 ;;;;;;;;
 ;;;;;;;; DOCUMENT ME!
@@ -48,7 +76,7 @@
                          (string-encode-integer
                           (inexact->exact (round (* 1000 (cdr ename-mag))))))))))
 
-(define (define-fonts internal-external-name-mag-pairs)
+(define-public (define-fonts internal-external-name-mag-pairs)
   (set! font-name-alist (map tex-encoded-fontswitch
                             internal-external-name-mag-pairs))
   (apply string-append
 ;;
 ;; set! returns #<unspecified>  --hwn
 ;;
-(define (fontify name-mag-pair exp)
+(define-public (fontify name-mag-pair exp)
   (string-append (select-font name-mag-pair)
                 exp))
 
 
-(define (unknown) 
+(define-public (unknown) 
   "%\n\\unknown\n")
 
 (define (symbol->tex-key sym)
   (embedded-ps (list 'dashed-slur thick dash `(quote ,l))))
 
 (define (char i)
-  (string-append "\\char" (inexact->string i 10) " "))
+  (string-append "\\char" (ly:inexact->string i 10) " "))
 
 (define (dashed-line thick on off dx dy)
   (embedded-ps (list 'dashed-line  thick on off dx dy)))
    "\\font\\" command "="
    (car name-mag)
    " scaled "
-   (ly:number->string (inexact->exact (round (* 1000  (cdr name-mag)))))
+   (ly:number->string (inexact->exact (round (* 1000 (cdr name-mag)))))
    "\n"))
 
 (define (ez-ball c l b)
 
 (define (invoke-char s i)
   (string-append 
-   "\n\\" s "{" (inexact->string i 10) "}" ))
+   "\n\\" s "{" (ly:inexact->string i 10) "}" ))
 
 ;; FIXME: explain ploblem: need to do something to make this really safe.  
 (define-public (output-tex-string s)
 (define (filledbox breapth width depth height)
   (if (and #f (defined? 'ps-testing))
       (embedded-ps
-       (string-append (numbers->string (list breapth width depth height))
+       (string-append (ly:numbers->string (list breapth width depth height))
                      " draw_box" ))
       (string-append "\\lyvrule{"
                     (ly:number->string (- breapth)) "}{"