]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/output-tex.scm
Imported sources
[lilypond.git] / scm / output-tex.scm
index 54ea6318e8aaf1dcb6407b2edf37b0297b852db9..2128cec4fe592babcd9fbc6840e75d1d96689624 100644 (file)
@@ -1,9 +1,8 @@
-
 ;;; tex.scm -- implement Scheme output routines for TeX
 ;;;
 ;;;  source file of the GNU LilyPond music typesetter
 ;;; 
-;;; (c)  1998--2003 Jan Nieuwenhuizen <janneke@gnu.org>
+;;; (c)  1998--2004 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;; Han-Wen Nienhuys <hanwen@cs.uu.nl>
 
 
@@ -28,6 +27,7 @@
 (define (tex-encoded-fontswitch name-mag)
   (let* ((iname-mag (car name-mag))
         (ename-mag (cdr name-mag)))
+
     (cons iname-mag
          (cons ename-mag
                (string-append  "magfont"
@@ -35,7 +35,7 @@
                           (hashq (car ename-mag) 1000000))
                          "m"
                          (string-encode-integer
-                          (inexact->exact (* 1000 (cdr ename-mag)))))))))
+                          (inexact->exact (round (* 1000 (cdr ename-mag))))))))))
 
 (define (define-fonts internal-external-name-mag-pairs)
   (set! font-name-alist (map tex-encoded-fontswitch
 
     (if (eq? c #f)
        (begin
-         (display "FAILED\n")
-         (display (object-type (car name-mag-pair)))
-         (display (object-type (caaar font-name-alist)))
-
          (ly:warn (string-append
                    "Programming error: No such font known "
                    (car name-mag-pair) " "
-                   (ly:number->string (cdr name-mag-pair))
-                   ))
-         "") ; issue no command
-       (string-append "\\" (cddr c)))
-    
-    
-    ))
+                   (ly:number->string (cdr name-mag-pair))))
+         
+         (display "FAILED\n" (current-error-port))
+         (if #f ;(pair? name-mag-pair))
+             (display (object-type (car name-mag-pair)) (current-error-port))
+             (write name-mag-pair (current-error-port)))
+         (if #f ;  (pair? font-name-alist)
+             (display
+              (object-type (caaar font-name-alist)) (current-error-port))
+             (write font-name-alist (current-error-port)))
+
+         ;; (format #f "\n%FAILED: (select-font ~S)\n" name-mag-pair))
+         "")
+       
+       (string-append "\\" (cddr c)))))
 
 (define (blank)
   "")
@@ -87,8 +91,8 @@
 (define (dot x y radius)
   (embedded-ps (list 'dot x y radius)))
 
-(define (beam width slope thick)
-  (embedded-ps (list 'beam  width slope thick)))
+(define (beam width slope thick blot)
+  (embedded-ps (list 'beam  width slope thick blot)))
 
 (define (bracket arch_angle arch_width arch_height height arch_thick thick)
   (embedded-ps (list 'bracket  arch_angle arch_width arch_height height arch_thick thick)))
    "\\font\\" command "="
    (car name-mag)
    " scaled "
-   (ly:number->string (inexact->exact (* 1000  (cdr name-mag))))
+   (ly:number->string (inexact->exact (round (* 1000  (cdr name-mag)))))
    "\n"))
 
 (define (ez-ball c l b)
    "\\lilypondspecial\n"
    "\\lilypondpostscript\n"))
 
-;; Note: this string must match the string in ly2dvi.py!!!
+;; Note: this string must match the string in lilypond.py!!!
 (define (header creator generate) 
   (string-append
    "% Generated automatically by: " creator generate "\n"))
 (define (no-origin) "")
 
 (define-public (tex-output-expression expr port)
-  (display (eval expr this-module) port )
-  )
+  (display (eval expr this-module) port ))