2004-06-15 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * scm/page-layout.scm (default-page-make-stencil): add
+ raggedbottom, raggedlastbottom.
+
+ * Documentation/user/changing-defaults.itely (Page layout): add doc.
+
+ * scm/framework-tex.scm (define-fonts): fix export of
+ papersize.
+
+ * lily/paper-book.cc (classic_output): strip suffixes from
+ framework functions.
+
* lily/tuplet-bracket.cc (before_line_breaking): do not return
SCM_UNDEFINED to Scheme.
Distance between top-most music system and the page header
@item foot-sep
Distance between bottom-most music system and the page footer
+@item raggedbottom
+ If set to true, systems will not be spread across the page.
+@item raggedlastbottom
+ If set to true, systems will not be spread to fill the last page.
@end table
The default page header puts the page number and the @code{instrument}
MAJOR_VERSION=2
MINOR_VERSION=3
PATCH_LEVEL=4
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=hwn1
-\paper {
- #(paper-set-staff-size (* 5.8 mm))
+#(set-global-staff-size (/ (* 5.8 72.27) 25.4))
+
+\bookpaper {
+%#(set-global-staff-size (* 5.8 mm))
linewidth = #(* mm 160)
indent = 8\mm
interscoreline = 2.\mm
baerPaper = \paper {
indent = 7. \mm
linewidth =183.5 \mm
- interscoreline=4.0\mm
+% interscoreline=4.0\mm
\context {
\Score
% \override System #'print-function = #box-grob-stencil
}
}
-
+\bookpaper {
+ raggedbottom = ##t
+}
\score{
\sarabandeCelloStaff
\paper{
if (ly_c_module_p (header_))
scopes = scm_cons (header_, scopes);
- String func_nm = format;
- func_nm = "output-framework-" + func_nm;
String mod_nm = "scm framework-" + format;
SCM mod = scm_c_resolve_module (mod_nm.to_str0 ());
- SCM func = scm_c_module_lookup (mod, func_nm.to_str0 ());
+ SCM func = scm_c_module_lookup (mod, "output-framework");
func = scm_variable_ref (func);
scm_apply_0 (func, scm_list_n (out->self_scm (),
for (int i = 0; i < output_formats.size (); i++)
{
String format = output_formats[i];
- String func_nm = format;
- func_nm = "output-classic-framework-" + func_nm;
String mod_nm = "scm framework-" + format;
SCM mod = scm_c_resolve_module (mod_nm.to_str0 ());
- SCM func = scm_c_module_lookup (mod, func_nm.to_str0 ());
+ SCM func = scm_c_module_lookup (mod, "output-classic-framework");
func = scm_variable_ref (func);
(use-modules (gnome gw canvas))
(use-modules (gnome gw libgnomecanvas)))
-(define-public (output-framework-gnome outputter book scopes fields basename)
+(define-public (output-framework outputter book scopes fields basename)
(let* ((bookpaper (ly:paper-book-book-paper book))
(pages (list->vector (ly:paper-book-pages book))))
(ly:outputter-dump-stencil outputter page)
(ly:outputter-dump-string outputter "} stop-system \nshowpage\n"))
-(define-public (output-framework-ps outputter book scopes fields basename)
+(define-public (output-framework outputter book scopes fields basename)
(let* ((bookpaper (ly:paper-book-book-paper book))
(pages (ly:paper-book-pages book))
(page-number 0)
pages)
(ly:outputter-dump-string outputter "%%Trailer\n%%EOF\n")))
-(define-public (output-classic-framework-ps outputter book scopes fields
+(define-public (output-classic-framework outputter book scopes fields
basename)
(let* ((bookpaper (ly:paper-book-book-paper book))
(lines (ly:paper-book-lines book))
(tex-number-def "lilypondpaper" 'outputscale
(number->string (exact->inexact
(ly:bookpaper-outputscale bookpaper))))
- (tex-string-def "lilypondpapersize" 'papersize
+ (tex-string-def "lilypondpaper" 'papersize
(eval 'papersize (ly:output-def-scope bookpaper)))
(apply string-append
"}\\vss\n}\n\\vfill\n"
"}\\vss\n}\n\\vfill\\lilypondpagebreak\n")))
-(define-public (output-framework-tex outputter book scopes fields basename)
+(define-public (output-framework outputter book scopes fields basename)
(let* ((bookpaper (ly:paper-book-book-paper book))
(pages (ly:paper-book-pages book))
(last-page (car (last-pair pages)))
"}%\n"
"}\\interscoreline\n")))
-(define-public (output-classic-framework-tex
+(define-public (output-classic-framework
outputter book scopes fields basename)
(let* ((bookpaper (ly:paper-book-book-paper book))
(lines (ly:paper-book-lines book))
(lambda (line) (dump-line outputter line (eq? line last-line))) lines)
(ly:outputter-dump-string outputter "\\lilypondend\n")))
+
+(define-public (output-preview-framework
+ outputter book scopes fields basename)
+ (let* ((bookpaper (ly:paper-book-book-paper book))
+ (lines (ly:paper-book-lines book)))
+ (for-each
+ (lambda (x)
+ (ly:outputter-dump-string outputter x))
+ (list
+ ;;FIXME
+ (header "creator" "timestamp" bookpaper (length lines) #f)
+ "\\def\\lilypondclassic{1}%\n"
+ (output-scopes scopes fields basename)
+ (define-fonts bookpaper)
+ (header-end)))
+
+ (dump-line outputter (car lines) #t)
+ (ly:outputter-dump-string outputter "\\lilypondend\n")))
"Construct a stencil representing the page from LINES. "
(let*
((top-margin (ly:output-def-lookup paper 'top-margin))
-
+
;; TODO: naming vsize/hsize not analogous to TeX.
(hsize (ly:output-def-lookup paper 'hsize))
(line-stencils (map ly:paper-system-stencil lines))
(height-proc (ly:output-def-lookup paper 'page-music-height))
(music-height (height-proc paper scopes number last?))
+ (ragged (ly:output-def-lookup paper 'raggedbottom))
+ (ragged-last (ly:output-def-lookup paper 'raggedlastbottom))
+ (ragged-bottom (or (eq? #t ragged)
+ (and last? (eq? #t ragged-last))))
+
(spc-left (- music-height
(apply + (map (lambda (x)
(interval-length (ly:stencil-extent x Y)))
line-stencils))))
(stretchable-lines (remove ly:paper-system-title? (cdr lines)))
(stretch (if (or (null? stretchable-lines)
- (> spc-left (/ music-height 2)))
-
+ (> spc-left (/ music-height 2))
+ ragged-bottom)
0.0
(/ spc-left (length stretchable-lines))))