CVSROOT: /cvsroot/lilypond
Module name: lilypond
Branch:
Changes by: Han-Wen Nienhuys <[EMAIL PROTECTED]> 05/07/21 01:11:50
Modified files:
. : ChangeLog VERSION
Documentation/user: global.itely
lily : font-interface.cc grob-scheme.cc
input-scheme.cc output-def-scheme.cc
output-def.cc
scm : page-layout.scm paper.scm
Log message:
* lily/output-def-scheme.cc (LY_DEFINE): take default argument.
* lily/output-def.cc (lookup_variable): return SCM_UNDEFINED if
undefined.
* Documentation/user/global.itely (Page formatting): document
horizontalshift.
* scm/page-layout.scm (default-page-music-height):
horizontalshift: new variable, shift all systems by
horizontalshift to the right, to make space for instrument names.
* scm/paper.scm (set-paper-dimension-variables): add horizontalshift
* lily/input-scheme.cc (LY_DEFINE): take format commands.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.3903&tr2=1.3904&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/VERSION.diff?tr1=1.647&tr2=1.648&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/Documentation/user/global.itely.diff?tr1=1.25&tr2=1.26&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/font-interface.cc.diff?tr1=1.52&tr2=1.53&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/grob-scheme.cc.diff?tr1=1.48&tr2=1.49&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/input-scheme.cc.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/output-def-scheme.cc.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/output-def.cc.diff?tr1=1.18&tr2=1.19&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/page-layout.scm.diff?tr1=1.77&tr2=1.78&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/paper.scm.diff?tr1=1.55&tr2=1.56&r1=text&r2=text
Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.3903 lilypond/ChangeLog:1.3904
--- lilypond/ChangeLog:1.3903 Wed Jul 20 15:02:18 2005
+++ lilypond/ChangeLog Thu Jul 21 01:11:50 2005
@@ -1,3 +1,19 @@
+2005-07-21 Han-Wen Nienhuys <[EMAIL PROTECTED]>
+
+ * lily/output-def-scheme.cc (LY_DEFINE): take default argument.
+
+ * lily/output-def.cc (lookup_variable): return SCM_UNDEFINED if
undefined.
+
+ * Documentation/user/global.itely (Page formatting): document
+ horizontalshift.
+
+ * scm/page-layout.scm (default-page-music-height):
+ horizontalshift: new variable, shift all systems by
+ horizontalshift to the right, to make space for instrument names.
+
+ * scm/paper.scm (set-paper-dimension-variables): add horizontalshift
+
+ * lily/input-scheme.cc (LY_DEFINE): take format commands.
2005-07-20 Han-Wen Nienhuys <[EMAIL PROTECTED]>
@@ -10,6 +26,8 @@
* lily/include/paper-column.hh (class Paper_column): add
non-static get_rank() member.
+ * VERSION: release 2.7.1
+
* scm/framework-null.scm: new file, used for benchmarking.
2005-07-20 Heikki Junes <[EMAIL PROTECTED]>
Index: lilypond/Documentation/user/global.itely
diff -u lilypond/Documentation/user/global.itely:1.25
lilypond/Documentation/user/global.itely:1.26
--- lilypond/Documentation/user/global.itely:1.25 Sun Jul 17 02:01:39 2005
+++ lilypond/Documentation/user/global.itely Thu Jul 21 01:11:50 2005
@@ -315,6 +315,14 @@
Increasing this will put systems whose bounding boxes almost touch
farther apart.
+
[EMAIL PROTECTED] horizontalshift
+All systems (including titles and system separators) are shifted by
+this amount to the right. Page markup, such as headers and footers are
+not affected by this. The purpose of this variable is to make space
+for instrument names at the left.
+
+
@item aftertitlespace
Amount of space between the title and the first system.
Index: lilypond/VERSION
diff -u lilypond/VERSION:1.647 lilypond/VERSION:1.648
--- lilypond/VERSION:1.647 Sat Jul 9 22:35:37 2005
+++ lilypond/VERSION Thu Jul 21 01:11:50 2005
@@ -1,6 +1,6 @@
PACKAGE_NAME=LilyPond
MAJOR_VERSION=2
MINOR_VERSION=7
-PATCH_LEVEL=1
+PATCH_LEVEL=2
MY_PATCH_LEVEL=
Index: lilypond/lily/font-interface.cc
diff -u lilypond/lily/font-interface.cc:1.52
lilypond/lily/font-interface.cc:1.53
--- lilypond/lily/font-interface.cc:1.52 Fri Jul 8 17:53:40 2005
+++ lilypond/lily/font-interface.cc Thu Jul 21 01:11:50 2005
@@ -34,6 +34,8 @@
{
SCM defaults
= g->get_layout ()->lookup_variable (ly_symbol2scm ("font-defaults"));
+ if (defaults == SCM_UNDEFINED)
+ defaults = SCM_EOL;
return g->get_property_alist_chain (defaults);
}
@@ -42,6 +44,8 @@
{
SCM defaults
= g->get_layout ()->lookup_variable (ly_symbol2scm ("text-font-defaults"));
+ if (defaults == SCM_UNDEFINED)
+ defaults = SCM_EOL;
return g->get_property_alist_chain (defaults);
}
Index: lilypond/lily/grob-scheme.cc
diff -u lilypond/lily/grob-scheme.cc:1.48 lilypond/lily/grob-scheme.cc:1.49
--- lilypond/lily/grob-scheme.cc:1.48 Sat Jul 16 12:23:33 2005
+++ lilypond/lily/grob-scheme.cc Thu Jul 21 01:11:50 2005
@@ -93,9 +93,12 @@
SCM_ASSERT_TYPE (sc, grob, SCM_ARG1, __FUNCTION__, "grob");
if (global == SCM_UNDEFINED)
- global
- = sc->get_layout ()->lookup_variable (ly_symbol2scm ("font-defaults"));
-
+ {
+ global = sc->get_layout ()->lookup_variable (ly_symbol2scm
("font-defaults"));
+ if (global == SCM_UNDEFINED)
+ global = SCM_EOL;
+ }
+
return sc->get_property_alist_chain (global);
}
Index: lilypond/lily/input-scheme.cc
diff -u lilypond/lily/input-scheme.cc:1.6 lilypond/lily/input-scheme.cc:1.7
--- lilypond/lily/input-scheme.cc:1.6 Wed Jun 8 13:07:11 2005
+++ lilypond/lily/input-scheme.cc Thu Jul 21 01:11:50 2005
@@ -18,13 +18,15 @@
return unsmob_input (x) ? SCM_BOOL_T : SCM_BOOL_F;
}
-LY_DEFINE (ly_input_message, "ly:input-message", 2, 0, 0, (SCM sip, SCM msg),
- "Print @var{msg} as a GNU compliant error message, pointing to the"
- "location in @var{sip}.\n")
+LY_DEFINE (ly_input_message, "ly:input-message", 2, 0, 1, (SCM sip, SCM msg,
SCM rest),
+ "Print @var{msg} as a GNU compliant error message, pointing to the "
+ "location in @var{sip}. @var{msg} is interpreted similar to
@code{format}'s argument\n")
{
Input *ip = unsmob_input (sip);
SCM_ASSERT_TYPE (ip, sip, SCM_ARG1, __FUNCTION__, "input location");
SCM_ASSERT_TYPE (scm_is_string (msg), msg, SCM_ARG2, __FUNCTION__, "string");
+
+ msg = scm_simple_format (SCM_BOOL_F, msg, rest);
String m = ly_scm2string (msg);
ip->message (m);
Index: lilypond/lily/output-def-scheme.cc
diff -u lilypond/lily/output-def-scheme.cc:1.5
lilypond/lily/output-def-scheme.cc:1.6
--- lilypond/lily/output-def-scheme.cc:1.5 Tue Mar 8 13:02:05 2005
+++ lilypond/lily/output-def-scheme.cc Thu Jul 21 01:11:50 2005
@@ -15,15 +15,24 @@
#include "context-def.hh"
LY_DEFINE (ly_layout_lookup, "ly:output-def-lookup",
- 2, 0, 0, (SCM pap, SCM sym),
+ 2, 1, 0, (SCM pap, SCM sym, SCM def),
"Lookup @var{sym} in @var{pap}. "
- "Return the value or @code{'()} if undefined.")
+ "Return the value or @var{def} (which defaults to @code{'()}) if
undefined.")
{
Output_def *op = unsmob_output_def (pap);
SCM_ASSERT_TYPE (op, pap, SCM_ARG1, __FUNCTION__, "Output_def");
SCM_ASSERT_TYPE (scm_is_symbol (sym), sym, SCM_ARG2, __FUNCTION__, "symbol");
+
+ SCM answer = op->lookup_variable (sym);
+ if (answer == SCM_UNDEFINED)
+ {
+ if (def == SCM_UNDEFINED)
+ def = SCM_EOL;
- return op->lookup_variable (sym);
+ answer = def;
+ }
+
+ return answer;
}
LY_DEFINE (ly_output_def_scope, "ly:output-def-scope",
Index: lilypond/lily/output-def.cc
diff -u lilypond/lily/output-def.cc:1.18 lilypond/lily/output-def.cc:1.19
--- lilypond/lily/output-def.cc:1.18 Mon Jul 11 12:51:13 2005
+++ lilypond/lily/output-def.cc Thu Jul 21 01:11:50 2005
@@ -114,7 +114,7 @@
if (parent_)
return parent_->lookup_variable (sym);
- return SCM_EOL;
+ return SCM_UNDEFINED;
}
SCM
Index: lilypond/scm/page-layout.scm
diff -u lilypond/scm/page-layout.scm:1.77 lilypond/scm/page-layout.scm:1.78
--- lilypond/scm/page-layout.scm:1.77 Tue Apr 12 22:49:25 2005
+++ lilypond/scm/page-layout.scm Thu Jul 21 01:11:50 2005
@@ -84,7 +84,8 @@
(vsize (ly:output-def-lookup layout 'vsize))
(hsize (ly:output-def-lookup layout 'hsize))
-
+
+ (system-xoffset (ly:output-def-lookup layout 'horizontalshift 0.0))
(system-separator-markup (ly:output-def-lookup layout
'systemSeparatorMarkup))
(system-separator-stencil (if (markup? system-separator-markup)
(interpret-markup layout
@@ -93,53 +94,57 @@
#f))
(lmargin (ly:output-def-lookup layout 'leftmargin))
(leftmargin (if lmargin
- lmargin
- (/ (- hsize
- (ly:output-def-lookup layout 'linewidth)) 2)))
-
- (rightmargin (ly:output-def-lookup layout 'rightmargin))
- (bottom-edge (- vsize
- (ly:output-def-lookup layout 'bottommargin)))
-
- (head (page-headfoot layout scopes number 'make-header 'headsep UP
last?))
- (foot (page-headfoot layout scopes number 'make-footer 'footsep DOWN
last?))
-
- (head-height (if (ly:stencil? head)
- (interval-length (ly:stencil-extent head Y))
- 0.0))
-
- (height-proc (ly:output-def-lookup layout 'page-music-height))
-
- (page-stencil (ly:make-stencil '()
- (cons leftmargin hsize)
- (cons (- topmargin) 0)))
- (last-system #f)
- (last-y 0.0)
- (add-to-page (lambda (stencil y)
- (set! page-stencil
- (ly:stencil-add page-stencil
- (ly:stencil-translate-axis stencil
- (- 0 head-height y topmargin)
Y)))))
- (add-system
- (lambda (stencil-position)
- (let* ((system (car stencil-position))
- (stencil (ly:paper-system-stencil system))
- (y (cadr stencil-position))
- (is-title (ly:paper-system-title?
- (car stencil-position))))
- (add-to-page stencil y)
- (if (and (ly:stencil? system-separator-stencil)
- last-system
- (not (ly:paper-system-title? system))
- (not (ly:paper-system-title? last-system)))
- (add-to-page
- system-separator-stencil
- (average (- last-y
- (car (ly:paper-system-staff-extents last-system)))
- (- y
- (cdr (ly:paper-system-staff-extents system))))))
- (set! last-system system)
- (set! last-y y)))))
+ lmargin
+ (/ (- hsize
+ (ly:output-def-lookup layout 'linewidth)) 2)))
+
+ (rightmargin (ly:output-def-lookup layout 'rightmargin))
+ (bottom-edge (- vsize
+ (ly:output-def-lookup layout 'bottommargin)))
+
+ (head (page-headfoot layout scopes number 'make-header 'headsep UP
last?))
+ (foot (page-headfoot layout scopes number 'make-footer 'footsep DOWN
last?))
+
+ (head-height (if (ly:stencil? head)
+ (interval-length (ly:stencil-extent head Y))
+ 0.0))
+
+ (height-proc (ly:output-def-lookup layout 'page-music-height))
+
+ (page-stencil (ly:make-stencil '()
+ (cons leftmargin hsize)
+ (cons (- topmargin) 0)))
+ (last-system #f)
+ (last-y 0.0)
+ (add-to-page (lambda (stencil y)
+ (set! page-stencil
+ (ly:stencil-add page-stencil
+ (ly:stencil-translate stencil
+ (cons
+
system-xoffset
+ (- 0
head-height y topmargin))
+
+ )))))
+ (add-system
+ (lambda (stencil-position)
+ (let* ((system (car stencil-position))
+ (stencil (ly:paper-system-stencil system))
+ (y (cadr stencil-position))
+ (is-title (ly:paper-system-title?
+ (car stencil-position))))
+ (add-to-page stencil y)
+ (if (and (ly:stencil? system-separator-stencil)
+ last-system
+ (not (ly:paper-system-title? system))
+ (not (ly:paper-system-title? last-system)))
+ (add-to-page
+ system-separator-stencil
+ (average (- last-y
+ (car (ly:paper-system-staff-extents
last-system)))
+ (- y
+ (cdr (ly:paper-system-staff-extents system))))))
+ (set! last-system system)
+ (set! last-y y)))))
(if #f
(display (list
Index: lilypond/scm/paper.scm
diff -u lilypond/scm/paper.scm:1.55 lilypond/scm/paper.scm:1.56
--- lilypond/scm/paper.scm:1.55 Tue Apr 12 22:49:25 2005
+++ lilypond/scm/paper.scm Thu Jul 21 01:11:50 2005
@@ -8,7 +8,7 @@
(module-define! mod 'dimension-variables
'(pt mm cm in staffheight staff-space
betweensystemspace betweensystempadding
- linewidth indent hsize vsize
+ linewidth indent hsize vsize horizontalshift
staffspace linethickness ledgerlinethickness
blotdiameter interscoreline leftmargin rightmargin)))
_______________________________________________
Lilypond-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-cvs