no breaks in toc after section title
This commit is contained in:
@@ -90,7 +90,7 @@
|
||||
(for-each (lambda (category)
|
||||
(let* ((catsym (string->symbol category))
|
||||
(catlist (hashq-ref category-index-hash catsym
|
||||
(list (list label 'indexCategoryMarkup `(((rawtext . ,category))))))))
|
||||
(list (list label 'indexCategoryMarkup `(((combine-with-next . #t) (rawtext . ,category))))))))
|
||||
(if (assq catsym category-names)
|
||||
(hashq-set! category-index-hash catsym
|
||||
(cons (list label markup-symbol textoptions) catlist))
|
||||
@@ -114,7 +114,7 @@
|
||||
(for-each (lambda (authorID)
|
||||
(let* ((authorsym (string->symbol authorID))
|
||||
(authorlist (hashq-ref author-index-hash authorsym
|
||||
(list (list label 'indexAuthorMarkup `(((rawtext . ,authorID))))))))
|
||||
(list (list label 'indexAuthorMarkup `(((combine-with-next . #t) (rawtext . ,authorID))))))))
|
||||
(hashq-set! author-index-hash authorsym
|
||||
(cons (list label markup-symbol textoptions) authorlist))
|
||||
))
|
||||
@@ -218,7 +218,7 @@
|
||||
}
|
||||
|
||||
#(define (prepare-item-markup items layout)
|
||||
(map (lambda (index-item)
|
||||
(define (single-item-markup index-item)
|
||||
(let* ((label (car index-item))
|
||||
(index-markup (cadr index-item))
|
||||
(textoptions (caddr index-item))
|
||||
@@ -231,7 +231,16 @@
|
||||
#:override (cons 'index:alternative alternative)
|
||||
#:override (cons 'index:songnumber songnumber)
|
||||
(ly:output-def-lookup layout index-markup))))
|
||||
(items)))
|
||||
(if (null? items)
|
||||
items
|
||||
(let* ((index-item (car items))
|
||||
(combine-with-next (chain-assoc-get 'combine-with-next (caddr index-item) #f))
|
||||
(restitems (cdr items))
|
||||
(item-markup (single-item-markup index-item)))
|
||||
(if (and combine-with-next (not (null? restitems)))
|
||||
(cons (make-column-markup (list item-markup (single-item-markup (car restitems)))) (prepare-item-markup (cdr restitems) layout))
|
||||
(cons item-markup (prepare-item-markup restitems layout))))
|
||||
))
|
||||
|
||||
#(define-markup-list-command (index-in-columns-with-title layout props index-type title-markup) (symbol? markup?)
|
||||
( _i "Outputs index alphabetical sorted or in categories" )
|
||||
@@ -245,7 +254,7 @@
|
||||
(make-columnlayout-markup-list songTocColumns 2
|
||||
(let ((h (- (ly:output-def-lookup layout 'paper-height) 12)))
|
||||
(cons (- h (interval-length (ly:stencil-extent title Y))) h))
|
||||
(prepare-item-markup items layout))))))
|
||||
(prepare-item-markup (items) layout))))))
|
||||
|
||||
indexItem =
|
||||
#(define-music-function (parser location sorttext text) (string? markup?)
|
||||
@@ -255,7 +264,7 @@ indexItem =
|
||||
indexSection =
|
||||
#(define-music-function (parser location sorttext text) (string? markup?)
|
||||
"Add a section line to the alphabetical index, using @code{indexSectionMarkup} paper variable markup. This can be used to divide the alphabetical index into different sections, for example one section for each first letter."
|
||||
(add-index-item! 'indexSectionMarkup (prepend-alist-chain 'rawtext text '()) sorttext))
|
||||
(add-index-item! 'indexSectionMarkup (prepend-alist-chain 'combine-with-next #t (prepend-alist-chain 'rawtext text '())) sorttext))
|
||||
|
||||
#(define (extract-and-check-vars-from-header bookheader varlist)
|
||||
(let* ((headervars (hash-map->list cons (struct-ref (ly:book-header bookheader) 0)))
|
||||
|
||||
Reference in New Issue
Block a user