-\version "2.12.0"
+\version "2.15.17"
%% defined later, in a closure
#(define-public (add-toc-item! markup-symbol text)
}
}
+tocItemWithDotsMarkup = \markup \fill-with-pattern #1 #RIGHT .
+ \fromproperty #'toc:text \fromproperty #'toc:page
+
#(define-markup-list-command (table-of-contents layout props) ()
- "Outputs the table of contents, using the paper variable
+ ( _i "Outputs the table of contents, using the paper variable
@code{tocTitleMarkup} for its title, then the list of lines
built using the @code{tocItem} music function
-Usage: @code{\\markuplines \\table-of-contents}"
+Usage: @code{\\markuplist \\table-of-contents}" )
(cons (interpret-markup layout props
(ly:output-def-lookup layout 'tocTitleMarkup))
(space-lines (chain-assoc-get 'baseline-skip props)
(text (caddr toc-item)))
(interpret-markup
layout
- (cons (list (cons 'toc:page
- (markup #:page-ref label "XXX" "?"))
- (cons 'toc:text text))
+ (cons (list (cons 'toc:page
+ (markup #:with-link label #:page-ref label "XXX" "?"))
+ (cons 'toc:text (markup #:with-link label text))
+ (cons 'toc:label label))
props)
(ly:output-def-lookup layout toc-markup))))
(toc-items)))))