;
; (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
+; TODO
+; - naming
+; - ready ps code (draw_bracket) vs tex/ps macros/calls (pianobrace),
+; all preparations from ps,tex to scm
+
;;; graphical lisp element
(define (add-column p) (display "adding column (in guile): ") (display p) (newline))
(string-append (number->string (car c)) " ")
(string-append (number->string (cadr c)) " ")))
+(define
+ (embedded-ps-tex s)
+ (string-append "\\embeddedps{" s "}"))
+
+(define
+ (invoke-char-ps s i)
+ (string-append
+ "(\\" (inexact->string i 8) ") " s " " ))
+
+(define
+ (invoke-char-tex s i)
+ (string-append
+ "\n\\" s "{" (inexact->string i 10) "}" ))
+
+(define
+ (invoke-dim1-ps s d)
+ (string-append
+ (number->string d) " " s ))
+
+(define
+ (invoke-dim1-tex s d)
+ (string-append
+ "\n\\" s "{" (number->dim-tex d) "}"))
+
(define
(invoke-output o s)
(eval-string (string-append s "-" o)))
(define
(beam-tex width slope thick)
- (string-append
- "\\embeddedps{"
- (beam-ps width slope thick)
- "}"))
+ (embedded-ps-tex (beam-ps width slope thick)))
(define
- (bracket o h) (empty o))
+ (bracket o h)
+ ((invoke-output o "bracket") h))
(define
- (char o n)
- ((invoke-output o "char") n))
+ (bracket-ps h)
+ (invoke-dim1-ps "draw_bracket" h))
(define
- (char-ps n)
- (string-append
- "(\\" (inexact->string n 8) ") show"))
+ (bracket-tex h)
+ (embedded-ps-tex (bracket-ps h)))
(define
- (char-tex n)
- (string-append
- "\\char" (inexact->string n 10)))
+ (char o n)
+ ((invoke-output o "invoke-char") "show" n))
(define
(dashed-slur o thick dash l)
(define
(dashed-slur-tex thick dash l)
- (string-append
- "\\embeddedps{"
- (dashed-slur-ps thick dash l)
- "}"))
+ (embedded-ps-tex (dashed-slur-ps thick dash l)))
+
+(define
+ (doublebar o h)
+ ((invoke-output o "invoke-dim1") "doublebar" h))
(define
(empty o)
(empty-tex)
"%\n\\empty%\n")
+(define
+ (emptybar o h) (empty o))
+
(define
(end-output o)
((invoke-output o "end-output")))
(experimental-on-tex) "\\turnOnExperimentalFeatures")
(define
- (finishbar o h) (empty o))
+ (finishbar o h)
+ ((invoke-output o "invoke-dim1") "finishbar" h))
(define
(font i)
(define
(font-def o i s)
- (empty o))
-; ((invoke-output o "font-def") i s))
+ ((invoke-output o "font-def") i s))
+; (empty o))
(define
(font-def-ps i s)
(define
(maatstreep o h)
- ((invoke-output o "maatstreep") h))
+ ((invoke-output o "invoke-dim1") "maatstreep" h))
(define
- (maatstreep-ps h)
- (string-append
- (number->string h) " maatstreep " ))
-
-(define
- (maatstreep-tex h)
- (string-append
- "\n\\maatstreep{" (number->dim-tex h) "}"))
-
-(define
- (pianobrace o h) (empty o))
+ (pianobrace o i)
+ ((invoke-output o "invoke-char") "pianobrace" i))
(define
(placebox o x y b)
(number->dim-tex y) "}{" (number->dim-tex x) "}{" s "}"))
(define
- (repeatbar o h) (empty o))
+ (repeatbar o h)
+ ((invoke-output o "invoke-dim1") "repeatbar" h))
+
+(define
+ (repeatbarstartrepeat o h)
+ ((invoke-output o "invoke-dim1") "repeatbarstartrepeat" h))
(define
(rulesym o x y)
(setLarge o s)
((invoke-output o "text") "Large" s))
+(define
+ (setnumber o s)
+ ((invoke-output o "text") "number" s))
+
(define
(settext o s)
((invoke-output o "text") "text" s))
+(define
+ (settypewriter o s)
+ ((invoke-output o "text") "typewriter" s))
+
(define
(slur o l)
((invoke-output o "slur") l))
(define
(slur-tex l)
- (string-append
- "\\embeddedps{"
- (slur-ps l)
- "}"))
+ (embedded-ps-tex (slur-ps l)))
(define
(stem o kern width height depth)
"\\hbox{%\n"))
(define
- (startrepeat o h) (empty o))
+ (startrepeat o h)
+ ((invoke-output o "invoke-dim1") "startrepeat" h))
(define
(stop-line o)
"}\\interscoreline")
(define
- (stoprepeat o h) (empty o))
+ (stoprepeat o h)
+ ((invoke-output o "invoke-dim1") "stoprepeat" h))
(define
(text-ps f s)