doco about systemSeparatorMarkup.
* scm/page-layout.scm (default-page-make-stencil): add-to-page
function.
(default-page-make-stencil): insert system separators.
* scm/define-markup-commands.scm (hcenter): add
(beam): add.
+2005-02-02 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * Documentation/user/changing-defaults.itely (Page layout): add
+ doco about systemSeparatorMarkup.
+
+ * scm/page-layout.scm (default-page-make-stencil): add-to-page
+ function.
+ (default-page-make-stencil): insert system separators.
+
+ * scm/define-markup-commands.scm (hcenter): add
+ (beam): add.
+
+2005-02-01 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * scm/output-ps.scm (ez-ball): reinstate ez notation.
+
2005-02-01 Jan Nieuwenhuizen <janneke@gnu.org>
* lily/main.cc: Spell backend consistently. Sort options.
@itemize @bullet
+@item
+Separator slashes may be inserted between systems in a score. See
+@file{input/regression/system-separator.ly} for an example.
+
@item
Locations of errors in the input are now calculated more precisely.
Amount of space between consecutive titles (e.g., the title of the
book and the title of a piece).
+@item systemSeparatorMarkup
+This contains a markup object, which will be inserted between
+systems. This is often used for orchestral scores.
+
+The markup command @code{\slashSeparator} is provided as a sensible
+default, for example
+
+@lilypond[raggedright]
+\paper {
+ systemSeparatorMarkup = \slashSeparator
+}
+
+\relative { c1 \break c1 }
+@end lilypond
+
+
@end table
@end quotation
--- /dev/null
+\header {
+
+ texidoc = "System separators maybe defined as markups in the
+@code{systemSeparator} field of the bookpaper block. They are centered
+between the boundary staffs of each system. "
+
+}
+
+\paper {
+ systemSeparatorMarkup = \slashSeparator
+
+}
+foobar = \relative { c1 c \break c c \break c c }
+\book
+{
+ \score {
+ \new GrandStaff <<
+ \new Staff \foobar
+ \new Staff \foobar
+ >>
+ }
+}
beforetitlespace = 10 \mm
betweentitlespace = 2 \mm
-
raggedbottom = ##f
%%
%%
raggedlastbottom= ##t
- %% ugh. Should use /etc/papersize and set explicitely for
+ %% ugh. Should use /etc/papersize and set explicitly for
%% documentation.
papersizename = "a4"
+
+slashSeparator = \markup {
+ \hcenter
+ \vcenter \combine
+ \beam #2.0 #0.5 #0.48
+ \raise #0.7 \beam #2.0 #0.5 #0.48
+ }
+
bookTitleMarkup = \markup {
\column {
(stack-lines -1 0.0 (chain-assoc-get 'baseline-skip props) cmols)))
(def-markup-command (vcenter layout props arg) (markup?)
- "Align @code{arg} to its center. "
+ "Align @code{arg} to its Y center. "
(let* ((mol (interpret-markup layout props arg)))
(ly:stencil-align-to! mol Y CENTER)
mol))
+(def-markup-command (hcenter layout props arg) (markup?)
+ "Align @code{arg} to its X center. "
+ (let* ((mol (interpret-markup layout props arg)))
+ (ly:stencil-align-to! mol X CENTER)
+ mol))
+
(def-markup-command (right-align layout props arg) (markup?)
"Align @var{arg} on its right edge. "
(let* ((m (interpret-markup layout props arg)))
(* -0.5 (chain-assoc-get 'baseline-skip props))
Y))
+(def-markup-command (beam layout props width slope thickness) (number? number? number?)
+ "Create a beam with the specified parameters."
+
+ (let*
+ ((y (* slope width))
+ (yext (cons (min 0 y) (max 0 y)))
+ (half (/ thickness 2)))
+
+ (ly:make-stencil
+ (list 'beam width
+ slope
+ thickness
+ (ly:output-def-lookup layout 'blotdiameter))
+ (cons 0 width)
+ (cons (+ (- half) (car yext))
+ (+ half (cdr yext))))
+
+ ))
+
+
(def-markup-command (normal-size-sub layout props arg) (markup?)
"Set @var{arg} in subscript, in a normal font size."
(ly:stencil-translate-axis
(define-public (moment-min a b)
(if (ly:moment<? a b) a b))
+(define-public (average x . lst)
+ (/ (+ x (apply + lst)) (1+ (length lst))))
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; lily specific variables.
(ly:numbers->string (list letter-col ball-col))
;; FIXME: barf
" /Helvetica-Bold "
- " draw_ez_ball")
-
- "")
+ " draw_ez_ball"))
;; FIXME: use draw_round_box
(define (filledbox breapth width depth height)
(vsize (ly:output-def-lookup layout 'vsize))
(hsize (ly:output-def-lookup layout 'hsize))
-
+
+ (system-separator-markup (ly:output-def-lookup layout 'systemSeparatorMarkup))
+ (system-separator-stencil (if (markup? system-separator-markup)
+ (interpret-markup layout
+ (page-properties layout)
+ system-separator-markup)
+ #f))
(lmargin (ly:output-def-lookup layout 'leftmargin))
(leftmargin (if lmargin
lmargin
(interval-length (ly:stencil-extent head Y))
0.0))
- (line-stencils (map ly:paper-system-stencil lines))
(height-proc (ly:output-def-lookup layout 'page-music-height))
(page-stencil (ly:make-stencil '()
(cons leftmargin hsize)
(cons (- topmargin) 0)))
- (was-title #t)
+ (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)
- (set! page-stencil
- (ly:stencil-add
- (ly:stencil-translate-axis
- (car stencil-position)
- (- 0
- head-height
- (cadr stencil-position)
- topmargin)
- Y)
- page-stencil)))))
+ (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
(set! page-stencil (ly:stencil-combine-at-edge
page-stencil Y DOWN head 0. 0.))
- (map add-system (zip line-stencils offsets))
+ (map add-system (zip lines offsets))
(if (ly:stencil? foot)
(set! page-stencil
(ly:stencil-add