Compare commits
2 Commits
4b7d1a46eb
...
7851a31e76
Author | SHA1 | Date | |
---|---|---|---|
7851a31e76 | |||
0fcfaf450c |
@@ -7,7 +7,6 @@
|
|||||||
poetAndComposerEqualPrefix = "Worte und Weise:"
|
poetAndComposerEqualPrefix = "Worte und Weise:"
|
||||||
voicePrefix = "Stimme:"
|
voicePrefix = "Stimme:"
|
||||||
versePrefix = "Strophe:"
|
versePrefix = "Strophe:"
|
||||||
translationAuthorPrefix = "Übersetzung:"
|
|
||||||
translationPrefix = "Übersetzung:"
|
translationPrefix = "Übersetzung:"
|
||||||
pronunciationPrefix = "Aussprache:"
|
pronunciationPrefix = "Aussprache:"
|
||||||
interludePrefix = "Zwischenspiel:"
|
interludePrefix = "Zwischenspiel:"
|
||||||
@@ -45,6 +44,8 @@
|
|||||||
(year_melody (chain-assoc-get 'songinfo:year_melody props #f))
|
(year_melody (chain-assoc-get 'songinfo:year_melody props #f))
|
||||||
(poet-with-year (if (and poet-maybe-with-composer year_text) (string-append poet-maybe-with-composer ", " year_text) poet-maybe-with-composer))
|
(poet-with-year (if (and poet-maybe-with-composer year_text) (string-append poet-maybe-with-composer ", " year_text) poet-maybe-with-composer))
|
||||||
(composer-with-year (if (and composer year_melody) (string-append composer ", " year_melody) composer))
|
(composer-with-year (if (and composer year_melody) (string-append composer ", " year_melody) composer))
|
||||||
|
(poet-and-composer-oneliner (if (and poet-with-year composer-with-year) (markup poet-with-year between-poet-and-composer-markup composer-with-year) #f))
|
||||||
|
(current-line-width (chain-assoc-get 'line-width props (ly:output-def-lookup layout 'line-width)))
|
||||||
(string-with-paragraphs->markuplist (lambda (prefix text)
|
(string-with-paragraphs->markuplist (lambda (prefix text)
|
||||||
(if text
|
(if text
|
||||||
(apply append
|
(apply append
|
||||||
@@ -53,20 +54,16 @@
|
|||||||
(make-wordwrap-internal-markup-list #t
|
(make-wordwrap-internal-markup-list #t
|
||||||
#{ \markuplist { $(ly:parser-include-string paragraph) } #}))
|
#{ \markuplist { $(ly:parser-include-string paragraph) } #}))
|
||||||
(ly:regex-split (ly:make-regex "\n[ \t\n]*\n[ \t\n]*") (string-append prefix text))))
|
(ly:regex-split (ly:make-regex "\n[ \t\n]*\n[ \t\n]*") (string-append prefix text))))
|
||||||
'())))
|
'()))))
|
||||||
(poet-and-composer-markup-list
|
|
||||||
(string-with-paragraphs->markuplist "" (string-append
|
|
||||||
(if poet-with-year (string-append "\n\n" poet-with-year) "")
|
|
||||||
(if composer-with-year (string-append "\n\n" composer-with-year) "")
|
|
||||||
)))
|
|
||||||
(poet-and-composer-oneliner (if (and poet-with-year composer-with-year) (make-line-markup (cons (cadr poet-and-composer-markup-list) (cons between-poet-and-composer-markup (cddr poet-and-composer-markup-list)))) #f))
|
|
||||||
(current-line-width (chain-assoc-get 'line-width props (ly:output-def-lookup layout 'line-width))))
|
|
||||||
(stack-lines DOWN 0.0 (chain-assoc-get 'baseline-skip props)
|
(stack-lines DOWN 0.0 (chain-assoc-get 'baseline-skip props)
|
||||||
(interpret-markup-list layout props
|
(interpret-markup-list layout props
|
||||||
(append
|
(append
|
||||||
(if (and poet-and-composer-oneliner (< (interval-length (ly:stencil-extent (interpret-markup layout props poet-and-composer-oneliner) X)) current-line-width))
|
(if (and poet-and-composer-oneliner (< (interval-length (ly:stencil-extent (interpret-markup layout props poet-and-composer-oneliner) X)) current-line-width))
|
||||||
(list poet-and-composer-oneliner)
|
(string-with-paragraphs->markuplist "" poet-and-composer-oneliner)
|
||||||
poet-and-composer-markup-list)
|
(string-with-paragraphs->markuplist "" (string-append
|
||||||
|
(if poet-with-year (string-append "\n\n" poet-with-year) "")
|
||||||
|
(if composer-with-year (string-append "\n\n" composer-with-year) "")
|
||||||
|
)))
|
||||||
(string-with-paragraphs->markuplist "" (string-append
|
(string-with-paragraphs->markuplist "" (string-append
|
||||||
(if copyright (string-append "\n\n© " copyright) "")))
|
(if copyright (string-append "\n\n© " copyright) "")))
|
||||||
(string-with-paragraphs->markuplist "" infotext)
|
(string-with-paragraphs->markuplist "" infotext)
|
||||||
|
@@ -142,7 +142,7 @@
|
|||||||
) ", ")
|
) ", ")
|
||||||
(render-partial-contribution-group 'versePrefix versePoetData)
|
(render-partial-contribution-group 'versePrefix versePoetData)
|
||||||
(join-present (list
|
(join-present (list
|
||||||
(render-contribution-group (ly:output-def-lookup layout 'translationAuthorPrefix) translatorIds)
|
(render-contribution-group (ly:output-def-lookup layout 'translationPrefix) translatorIds)
|
||||||
year_translation
|
year_translation
|
||||||
) ", ")
|
) ", ")
|
||||||
(join-present (list
|
(join-present (list
|
||||||
|
@@ -56,11 +56,11 @@
|
|||||||
|
|
||||||
#(let ((index-item-list (list)))
|
#(let ((index-item-list (list)))
|
||||||
(set! add-index-item!
|
(set! add-index-item!
|
||||||
(lambda* (markup-symbol textoptions sorttext #:optional (label (gensym "index")))
|
(lambda* (markup-symbol text sorttext #:optional (label (gensym "index")))
|
||||||
(set! index-item-list
|
(set! index-item-list
|
||||||
;; We insert index items sorted from the beginning on and do
|
;; We insert index items sorted from the beginning on and do
|
||||||
;; not sort them later - this saves pretty much computing time
|
;; not sort them later - this saves pretty much computing time
|
||||||
(insert-alphabetical-sorted! (list label markup-symbol textoptions
|
(insert-alphabetical-sorted! (list label markup-symbol text
|
||||||
;; this crazy hack is necessary because lilypond depends on guile 1.8 atm
|
;; this crazy hack is necessary because lilypond depends on guile 1.8 atm
|
||||||
;; and so the cool unicode conversion functions cannot be used
|
;; and so the cool unicode conversion functions cannot be used
|
||||||
(ly:string-substitute " " ""
|
(ly:string-substitute " " ""
|
||||||
@@ -92,20 +92,20 @@
|
|||||||
(cons (car ilist) (insert-alphabetical-sorted! iitem (cdr ilist))))))
|
(cons (car ilist) (insert-alphabetical-sorted! iitem (cdr ilist))))))
|
||||||
|
|
||||||
% code for category index
|
% code for category index
|
||||||
#(define*-public (add-category-index-item! categories markup-symbol textoptions #:optional label) #f)
|
#(define*-public (add-category-index-item! categories markup-symbol text #:optional label) #f)
|
||||||
#(define-public (category-index-items) #f)
|
#(define-public (category-index-items) #f)
|
||||||
|
|
||||||
#(let ((category-index-hash (make-hash-table)))
|
#(let ((category-index-hash (make-hash-table)))
|
||||||
(set! add-category-index-item!
|
(set! add-category-index-item!
|
||||||
(lambda* (categories markup-symbol textoptions #:optional (label (gensym "index")))
|
(lambda* (categories markup-symbol text #:optional (label (gensym "index")))
|
||||||
(for-each (lambda (category)
|
(for-each (lambda (category)
|
||||||
(let* ((catsym (string->symbol category))
|
(let* ((catsym (string->symbol category))
|
||||||
(catlist (hashq-ref category-index-hash catsym
|
(catlist (hashq-ref category-index-hash catsym
|
||||||
(list (list label 'indexCategoryMarkup `(((rawtext . ,category))))))))
|
(list (list label 'indexCategoryMarkup category)))))
|
||||||
(if (assq catsym category-names)
|
(if (assq catsym category-names)
|
||||||
(hashq-set! category-index-hash catsym
|
(hashq-set! category-index-hash catsym
|
||||||
(cons (list label markup-symbol textoptions) catlist))
|
(cons (list label markup-symbol text) catlist))
|
||||||
(ly:error "song: <~a> category ~a is not defined!" (markup->string (chain-assoc-get 'rawtext textoptions)) category))))
|
(ly:error "song: <~a> category ~a is not defined!" (markup->string text) category))))
|
||||||
categories)
|
categories)
|
||||||
(make-music 'EventChord
|
(make-music 'EventChord
|
||||||
'page-marker #t
|
'page-marker #t
|
||||||
@@ -121,13 +121,13 @@
|
|||||||
|
|
||||||
#(let ((author-index-hash (make-hash-table)))
|
#(let ((author-index-hash (make-hash-table)))
|
||||||
(set! add-author-index-item!
|
(set! add-author-index-item!
|
||||||
(lambda* (authorIDs markup-symbol textoptions #:optional (label (gensym "index")))
|
(lambda* (authorIDs markup-symbol text #:optional (label (gensym "index")))
|
||||||
(for-each (lambda (authorID)
|
(for-each (lambda (authorID)
|
||||||
(let* ((authorsym (string->symbol authorID))
|
(let* ((authorsym (string->symbol authorID))
|
||||||
(authorlist (hashq-ref author-index-hash authorsym
|
(authorlist (hashq-ref author-index-hash authorsym
|
||||||
(list (list label 'indexAuthorMarkup `(((rawtext . ,authorID))))))))
|
(list (list label 'indexAuthorMarkup authorID)))))
|
||||||
(hashq-set! author-index-hash authorsym
|
(hashq-set! author-index-hash authorsym
|
||||||
(cons (list label markup-symbol textoptions) authorlist))
|
(cons (list label markup-symbol text) authorlist))
|
||||||
))
|
))
|
||||||
authorIDs)
|
authorIDs)
|
||||||
(make-music 'EventChord
|
(make-music 'EventChord
|
||||||
|
Reference in New Issue
Block a user