CVSROOT: /cvsroot/lilypond
Module name: lilypond
Branch:
Changes by: Han-Wen Nienhuys <[EMAIL PROTECTED]> 05/10/17 00:38:04
Modified files:
. : ChangeLog
Documentation/user: advanced-notation.itely basic-notation.itely
changing-defaults.itely
scm : document-translation.scm
Log message:
(Difficult tweaks):
use callbacks.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.4186&tr2=1.4187&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/Documentation/user/advanced-notation.itely.diff?tr1=1.64&tr2=1.65&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/Documentation/user/basic-notation.itely.diff?tr1=1.47&tr2=1.48&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/Documentation/user/changing-defaults.itely.diff?tr1=1.137&tr2=1.138&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/document-translation.scm.diff?tr1=1.26&tr2=1.27&r1=text&r2=text
Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.4186 lilypond/ChangeLog:1.4187
--- lilypond/ChangeLog:1.4186 Mon Oct 17 00:30:31 2005
+++ lilypond/ChangeLog Mon Oct 17 00:38:02 2005
@@ -1,5 +1,8 @@
2005-10-17 Han-Wen Nienhuys <[EMAIL PROTECTED]>
+ * Documentation/user/changing-defaults.itely (Difficult tweaks):
+ use callbacks.
+
* lily/context-property.cc (execute_general_pushpop_property):
robustness checks.
Index: lilypond/Documentation/user/advanced-notation.itely
diff -u lilypond/Documentation/user/advanced-notation.itely:1.64
lilypond/Documentation/user/advanced-notation.itely:1.65
--- lilypond/Documentation/user/advanced-notation.itely:1.64 Tue Oct 4
12:19:00 2005
+++ lilypond/Documentation/user/advanced-notation.itely Mon Oct 17 00:38:03 2005
@@ -1525,7 +1525,7 @@
}
{
- \override Staff.TimeSignature #'print-function = #Text_interface::print
+ \override Staff.TimeSignature #'callbacks #'stencil = #Text_interface::print
\override Staff.TimeSignature #'text = #tsMarkup
\time 3/2
c'2 \bar ":" c'4 c'4.
Index: lilypond/Documentation/user/basic-notation.itely
diff -u lilypond/Documentation/user/basic-notation.itely:1.47
lilypond/Documentation/user/basic-notation.itely:1.48
--- lilypond/Documentation/user/basic-notation.itely:1.47 Tue Oct 4
12:19:00 2005
+++ lilypond/Documentation/user/basic-notation.itely Mon Oct 17 00:38:03 2005
@@ -2987,7 +2987,7 @@
measure rest with a different print function,
@lilypond[fragment,verbatim]
-\override MultiMeasureRest #'print-function
+\override MultiMeasureRest #'callbacks #'stencil
= #Multi_measure_rest::percent
R1
@end lilypond
Index: lilypond/Documentation/user/changing-defaults.itely
diff -u lilypond/Documentation/user/changing-defaults.itely:1.137
lilypond/Documentation/user/changing-defaults.itely:1.138
--- lilypond/Documentation/user/changing-defaults.itely:1.137 Sun Oct 16
11:36:36 2005
+++ lilypond/Documentation/user/changing-defaults.itely Mon Oct 17 00:38:04 2005
@@ -1140,18 +1140,25 @@
@example
(Fingering
- . ((print-function . ,Text_interface::print)
- (padding . 0.6)
- (staff-padding . 0.6)
+ . ((padding . 0.5)
+ (avoid-slur . around)
+ (slur-padding . 0.2)
+ (staff-padding . 0.5)
(self-alignment-X . 0)
(self-alignment-Y . 0)
(script-priority . 100)
- (font-size . -5)
- (meta . ((interfaces . (finger-interface font-interface
- text-script-interface text-interface
- side-position-interface
- self-alignment-interface
- item-interface))))))
+ (callbacks . ((stencil . ,Text_interface::print)
+ (direction . ,Script_interface::calc_direction)))
+ (font-encoding . fetaNumber)
+ (font-size . -5) ; don't overlap when next to heads.
+ (meta . ((class . Item)
+ (interfaces . (finger-interface
+ font-interface
+ text-script-interface
+ text-interface
+ side-position-interface
+ self-alignment-interface
+ item-interface))))))
@end example
@noindent
@@ -1278,13 +1285,11 @@
properties, including @code{\override}s.
-[THIS SECTION IS OUT OF DATE. REWRITE ME.]
-
In other words, an @code{\override} always affects all pieces of a
broken spanner. To change only one part of a spanner at a line break,
it is necessary to hook into the formatting process. The
[EMAIL PROTECTED] property contains the Scheme procedure
-that is called after the line breaks have been determined, and layout
[EMAIL PROTECTED] callback contains the Scheme procedure that
+is called after the line breaks have been determined, and layout
objects have been split over different systems.
In the following example, we define a procedure
@@ -1304,8 +1309,7 @@
This procedure is installed into @internalsref{Tie}, so the last part
of the broken tie is translated up.
[EMAIL PROTECTED]
[EMAIL PROTECTED] lypond[quote,verbatim,raggedright]
[EMAIL PROTECTED],verbatim,raggedright]
#(define (my-callback grob)
(let* (
; have we been split?
@@ -1320,7 +1324,7 @@
(ly:grob-set-property! grob 'extra-offset '(-2 . 5)))))
\relative c'' {
- \override Tie #'after-line-breaking-callback =
+ \override Tie #'callbacks #'after-line-breaking =
#my-callback
c1 ~ \break c2 ~ c
}
@@ -1328,12 +1332,10 @@
@end ignore
@noindent
-When applying this trick, the new @code{after-line-breaking-callback}
-should also call the old @code{after-line-breaking-callback}, if there
-is one. For example, if using this with @code{Slur},
[EMAIL PROTECTED]::after_line_breaking} should also be called.
-
-[END OUT OF DATE]
+When applying this trick, the new @code{after-line-breaking} callback
+should also call the old one @code{after-line-breaking}, if there is
+one. For example, if using this with @code{Hairpin},
[EMAIL PROTECTED]::after_line_breaking} should also be called.
@item Some objects cannot be changed with @code{\override} for
Index: lilypond/scm/document-translation.scm
diff -u lilypond/scm/document-translation.scm:1.26
lilypond/scm/document-translation.scm:1.27
--- lilypond/scm/document-translation.scm:1.26 Mon Oct 17 00:30:32 2005
+++ lilypond/scm/document-translation.scm Mon Oct 17 00:38:04 2005
@@ -128,7 +128,7 @@
(string-append
"@item Set "
(format "grob-property @code{~a} " (string-join path " "))
- (format " in @ref{~a} " sym)
+ (format " in @ref{~a} " context-sym)
(if (not (null? (cddr body)))
(format " to @code{~a}" (scm->texi value))
"")
@@ -136,12 +136,11 @@
"\n")))
((equal? (object-property sym 'is-grob?) #t) "")
((equal? tag 'assign)
- (string-append
- "@item Set translator property @code{"
- (symbol->string (car body))
- "} to @code{"
- (scm->texi (cadr body))
- "}\n")))))
+ (format "@item Set translator property @code{~a} to @code{~a}"
+ context-sym
+ (scm->texi (car args))))
+ )))
+
(define (context-doc context-desc)
(let* ((name-sym (cdr (assoc 'context-name context-desc)))
_______________________________________________
Lilypond-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-cvs