-;; top-of-file, wtf?
-(define (top-of-file)
- (header (string-append "GNU LilyPond (" (lilypond-version) "), ")
- (strftime "%c" (localtime (current-time))))
- ;;; ugh
- (ps-string-def
- "lilypond" 'tagline
- (string-append "Engraved by LilyPond (" (lilypond-version) ")")))
-
-(define (output-paper-def pd)
- (apply
- string-append
- (module-map
- (lambda (sym var)
- (let ((val (variable-ref var))
- (key (symbol->string sym)))
-
- (cond
- ((string? val)
- (ps-string-def "lilypondpaper" sym val))
- ((number? val)
- (ps-number-def "lilypondpaper" sym
- (if (integer? val)
- (number->string val)
- (number->string (exact->inexact val)))))
- (else ""))))
-
- (ly:output-def-scope pd))))
-
-
-(define (ps-string-def a b c)
- (string-append "/" a (symbol->string b) " (" c ") def\n"))
-
-(define (ps-number-def a b c)
- (string-append "/" a (symbol->string b) " " c " def\n"))
-
-
-(define (output-scopes paper scopes fields basename)
-
- ;; FIXME: customise/generate these
- (let ((props '((;;(linewidth . 120)
- (font-family . roman)
- (word-space . 1)
- (baseline-skip . 2)
- (font-series . medium)
- (font-style . roman)
- (font-shape . upright)
- (font-size . 0)))))
-
- (define (output-scope scope)
- (apply
- string-append
- (module-map
- (lambda (sym var)
- (let ((val (variable-ref var))
- (tex-key (symbol->string sym)))
-
- (if (memq sym fields)
- (header-to-file basename sym val))
-
- (cond
- ;; define strings, for /make-lilypond-title to pick up
- ((string? val) (ps-string-def "lilypond" sym val))
-
- ;; generate stencil from markup
- ((markup? val) (set! header-stencils
- (append header-stencils
- (list
- (ly:stencil-get-expr
- (interpret-markup paper props val)))))
-
- "")
- ((number? val) (ps-number-def
- "lilypond" sym (if (integer? val)
- (number->string val)
- (number->string
- (exact->inexact val)))))
- (else ""))))
- scope)))
+(define (zigzag-line centre? zzw zzh thick dx dy)
+ (string-append
+ (if centre? "true" "false") " "
+ (ly:number->string zzw) " "
+ (ly:number->string zzh) " "
+ (ly:number->string thick) " "
+ "0 0 "
+ (ly:number->string dx) " "
+ (ly:number->string dy)
+ " draw_zigzag_line"))