[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Add \path markup command, and use it for \eyeglasses. (issue1730044
From: |
Jan Nieuwenhuizen |
Subject: |
Re: Add \path markup command, and use it for \eyeglasses. (issue1730044) |
Date: |
Sat, 26 Jun 2010 16:47:12 +0200 |
Op zaterdag 26-06-2010 om 00:06 uur [tijdzone +0000], schreef
address@hidden:
> Let me know what you think.
It's getting there...
This is not exactly what I had in mind
+ (if (or (eq? (caar commands) 'moveto)
+ (eq? (caar commands) 'rmoveto))
+ (let ((command (car commands)))
+ (begin
I was thinking to let GUILE do that work using eval,
look at this below
scm/ps-path.scm:
;; ps-path module: postscript PATH routines
;; move/add these to scm/output-ps.scm?
(define-module (scm ps-path)
:export (moveto))
(define-public (moveto x y)
(format #t "~a ~a moveto (postscript)\n" x y))
;; end ps-path.scm
and eval-path.scm:
#! /usr/bin/guile -s
!#
(define (main args)
(display "main\n")
(format #t "scm ps-path: ~A\n" (resolve-module '(scm ps-path)))
(format #t "scm-ps-path moveto: ~A\n" (module-ref (resolve-module '(scm
ps-path)) 'moveto))
(eval '(moveto 1 2) (resolve-module '(scm ps-path)))
(map (lambda (x) (eval-string x (resolve-module '(scm ps-path))))
(cdr args)))
(main (command-line))
;; end eval-path.scm
16:44:45 address@hidden:~/vc/lilypond
$ GUILE_LOAD_PATH=. ./eval-ps-path.scm
main
scm ps-path: #<directory (scm ps-path) 7f7cccaf3fa0>
scm-ps-path moveto: #<procedure moveto (x y)>
1 2 moveto (postscript)
16:44:54 address@hidden:~/vc/lilypond
Jan.
--
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyOfSource.com | AvatarĀ® http://AvatarAcademy.nl
- Re: Add \path markup command, and use it for \eyeglasses. (issue1730044), pnorcks, 2010/06/21
- Re: Add \path markup command, and use it for \eyeglasses. (issue1730044), Carl . D . Sorensen, 2010/06/21
- Re: Add \path markup command, and use it for \eyeglasses. (issue1730044), hanwenn, 2010/06/22
- Re: Add \path markup command, and use it for \eyeglasses. (issue1730044), jan . nieuwenhuizen, 2010/06/22
- Re: Add \path markup command, and use it for \eyeglasses. (issue1730044), pnorcks, 2010/06/25
- Re: Add \path markup command, and use it for \eyeglasses. (issue1730044), Carl . D . Sorensen, 2010/06/26