(ly:stencil-add (ly:make-stencil link-expr xextent yextent) stil)))
+(define-public (book-first-page layout props)
+ "Return the @code{'first-page-number} of the entire book"
+ (define (ancestor layout)
+ "Return the topmost layout ancestor"
+ (let ((parent (ly:output-def-parent layout)))
+ (if (not (ly:output-def? parent))
+ layout
+ (ancestor parent))))
+ (ly:output-def-lookup (ancestor layout) 'first-page-number))
+
(define-markup-command (with-link layout props label arg)
(symbol? markup?)
#:category other
(if (list? table)
(assoc-get label table)
#f))
- (first-page-number
- (ly:output-def-lookup layout 'first-page-number))
+ (first-page-number (book-first-page layout props))
(current-page-number
(if table-page-number
(1+ (- table-page-number first-page-number))
(define-markup-command (whiteout-box layout props arg)
(markup?)
#:category other
+ #:properties ((thickness 0))
"
-@cindex adding a rounded rectangular white background to text
+@cindex adding a rectangular white background to text
-Provide a rounded rectangular white background for @var{arg}.
+Provide a rectangular white background for @var{arg}.
@lilypond[verbatim,quote]
\\markup {
\\combine
\\filled-box #'(-1 . 10) #'(-3 . 4) #1
- \\whiteout-box whiteout-box
+ \\override #'(thickness . 1.5) \\whiteout-box whiteout-box
}
@end lilypond"
- (stencil-whiteout-box (interpret-markup layout props arg)))
+ (stencil-whiteout-box
+ (interpret-markup layout props arg)
+ (* thickness
+ (ly:output-def-lookup layout 'line-thickness))))
(define-markup-command (pad-markup layout props amount arg)
(number? markup?)