+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.
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
@cindex Hebrew
@cindex ASCII, non
-@lilypondfile{utf8.ly}
+@lilypondfile[fontload]{utf8.ly}
The @TeX{} backend does not handle encoding specially at all. Strings
@seealso
-@inputfileref[fontload]{input/regression,utf8.ly}
+@inputfileref{input/regression,utf8.ly}
@node Nested scores
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);
{
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;
% 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
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)
;; 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)
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