]> git.donarmstrong.com Git - lilypond.git/commitdiff
* ps/music-drawing-routines.ps: new routine: insert PDF mark
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 26 Feb 2005 23:09:44 +0000 (23:09 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 26 Feb 2005 23:09:44 +0000 (23:09 +0000)
* scm/output-ps.scm (grob-cause): point & click support for
PostScript

ChangeLog
Documentation/user/changing-defaults.itely
lily/input-scheme.cc
lily/stencil.cc
ps/music-drawing-routines.ps
scm/output-ps.scm
scm/output-tex.scm
scm/safe-lily.scm

index 114c57bebb64249ca5f834dc8ccf9f498ccfce3c..1a5711e0a3d3d62d57621d597cbb24aaca5cab0b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2005-02-27  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * ps/music-drawing-routines.ps: new routine: insert PDF mark
+
+       * scm/output-ps.scm (grob-cause): point & click support for
+       PostScript
+
+2005-02-26  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * lily/input-scheme.cc (LY_DEFINE): rename to
+       ly:input-file-line-column
+
 2005-02-26  Graham Percival  <gperlist@shaw.ca>
 
        * Documentation/user/examples.itely: small fix from Steve Doonan.
@@ -19,6 +31,9 @@
 
 2005-02-26  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * Documentation/user/lilypond-book.itely (Music fragment options):
+       doc fontload.
+
        * Documentation/user/changing-defaults.itely (Text encoding): add
        fontload option to utf8 include
 
index 2f54ed2ec08b79640d667482c81ffe139d170aa9..10a9df0d3aba796c02eb86bcbcb3fe4ba6e93ad1 100644 (file)
@@ -1567,7 +1567,7 @@ and Cyrillic lyrics,
 @cindex Hebrew
 @cindex ASCII, non
 
-@lilypondfile{utf8.ly}
+@lilypondfile[fontload]{utf8.ly}
 
 
 The @TeX{} backend does not handle encoding specially at all.  Strings
@@ -1593,7 +1593,7 @@ interpreting non-ASCII strings.
 
 @seealso
 
-@inputfileref[fontload]{input/regression,utf8.ly}
+@inputfileref{input/regression,utf8.ly}
 
 
 @node Nested scores
index c9f257c5b68ba345cdde822acfc1ad81187f1973..7f2ccf1a021084b78ef6594eae415ae5331fcbd0 100644 (file)
@@ -33,10 +33,7 @@ LY_DEFINE (ly_input_message, "ly:input-message", 2, 0, 0, (SCM sip, SCM msg),
   return SCM_UNSPECIFIED;
 }
 
-/*
-  TODO: rename this function. ly:input-location? vs ly:input-location
- */
-LY_DEFINE (ly_input_location, "ly:input-location", 1, 0, 0, (SCM sip),
+LY_DEFINE (ly_input_file_line_column, "ly:input-file-line-column", 1, 0, 0, (SCM sip),
          "Return input location in @var{sip} as (file-name line column).")
 {
   Input *ip = unsmob_input (sip);
index 0301cc1f5330b24e6beca50c99184635b4daf71c..688efe2855bea5771efca0e166a9d42676da4a5a 100644 (file)
@@ -221,7 +221,8 @@ interpret_stencil_expression (SCM expr,
        {
          SCM grob = scm_cadr (expr);
        
-         (*func) (func_arg, scm_list_2 (head, grob));
+         (*func) (func_arg, scm_list_3 (head,
+                                        ly_quote_scm (ly_offset2scm (o)), grob));
          interpret_stencil_expression (scm_caddr (expr), func, func_arg, o);
          (*func) (func_arg, scm_list_1 (ly_symbol2scm ("no-origin")));
          return;
index 4ac077c9bb18c053d8dd1023db194b01382ce0f4..b54622b3bb3c9f3af5da3e1082babf173fddacae 100644 (file)
@@ -3,6 +3,32 @@
 % Functions for direct and embedded PostScript
 
 
+/pdfmark where
+{pop} {userdict /pdfmark /cleartomark load put} ifelse
+
+
+% llx lly urx ury command
+/mark_file_line
+{
+    /editorcommand exch def
+    /ury exch def
+    /urx exch def
+    /lly exch def
+    /llx exch def
+    [
+       /Rect [ llx lly urx ury ]
+       /Border [ 0 0 0 0 ]
+       /Action 
+       <<
+           /Subtype /Launch
+           /File editorcommand
+       >>
+        /Subtype /Link
+    /ANN
+    pdfmark
+}
+bind def
+
 /set_tex_dimen {
        cvr def
 } bind def
index f682173e3aa3c513af79b34abed448e41ad62d7e..7694e0a3862acd566e9b03aa02106651cf0ab047 100644 (file)
        x-y-named-glyphs))
   ))
 
-(define (grob-cause grob)
-  "")
+(define (grob-cause offset grob)
+  (let* ((cause (ly:grob-property grob 'cause))
+        (music-origin (if (ly:music? cause)
+                          (ly:music-property cause 'origin)))
+        (location (if (ly:input-location? music-origin)
+                      (ly:input-file-line-column music-origin)
+                      #f
+                      ))
+        (x-ext (ly:grob-extent grob grob X)) 
+        (y-ext (ly:grob-extent grob grob Y)) 
+        )
+
+    (if location
+       (format "~a ~a ~a ~a (lily-edit.sh ~a ~a ~a) mark_file_line\n"
+               (+ (car offset) (car x-ext))
+               (+ (cdr offset) (car y-ext))
+               (+ (car offset) (cdr x-ext))
+               (+ (cdr offset) (cdr y-ext))
+               (car location)
+               (cadr location)
+               (caddr location))
+       "")))
 
 ;; WTF is this in every backend?
 (define (horizontal-line x1 x2 th)
index c0aa31680bcb9fa7f94228bc141a643923235390..a95e94965e6b1e8ce5ed9352c88ad7e0f1f41401 100644 (file)
 ;; no-origin not yet supported by Xdvi
 (define (no-origin) "")
 
-(define (grob-cause grob)
+(define (grob-cause offset grob)
   (if (procedure? point-and-click)
       (let* ((cause (ly:grob-property grob 'cause))
             (music-origin (if (ly:music? cause)
index 32adc29083df57247f218322dae7bfdc65513b91..65484d243cd852bad5162b59a4cafae01ac9e9d2 100644 (file)
@@ -59,7 +59,7 @@
    ly:grob-system
    ly:grob-translate-axis!
    ly:grob?
-   ly:input-location
+   ly:input-file-line-column
    ly:input-location?
    ly:input-message
    ly:intlog2