more flexible titeling
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#(define-markup-command (bookTitleMarkupCustom layout props)()
|
||||
(interpret-markup layout
|
||||
(prepend-alist-chain 'songfilename (chain-assoc-get 'header:songfilename props "") props)
|
||||
(interpret-markup layout props
|
||||
(make-column-markup
|
||||
(list
|
||||
(make-vspace-markup (chain-assoc-get 'header:titletopspace props 0))
|
||||
@@ -38,23 +37,24 @@
|
||||
;'(0 . 0) '(0 . 0)
|
||||
)))
|
||||
|
||||
#(define-markup-command (title-with-category-images layout props right)(boolean?)
|
||||
(interpret-markup layout props
|
||||
#(define-markup-command (build-full-title layout props right)(boolean?)
|
||||
(interpret-markup layout (prepend-alist-chain 'songfilename (chain-assoc-get 'header:songfilename props "") props)
|
||||
(let* ((title (chain-assoc-get 'header:title props ""))
|
||||
(starttext (chain-assoc-get 'header:starttext props #f))
|
||||
(pdfbookmark (if starttext (string-append starttext " | " title) title)))
|
||||
(pdfbookmark (if starttext (string-append starttext " | " title) title))
|
||||
(title-markup (ly:output-def-lookup layout (if right 'oddTitleLineMarkup 'evenTitleLineMarkup))))
|
||||
(if title
|
||||
(if right
|
||||
#{\markup { \title-to-pdf-toc #pdfbookmark \fill-line \general-align #Y #UP { \null \bookTitleMarkupCustom \category-images } } #}
|
||||
#{\markup { \title-to-pdf-toc #pdfbookmark \fill-line \general-align #Y #UP { \category-images \bookTitleMarkupCustom \null } } #})
|
||||
#{ \markup { " " } #})
|
||||
(markup #:title-to-pdf-toc pdfbookmark title-markup)
|
||||
make-null-markup)
|
||||
)))
|
||||
|
||||
\paper {
|
||||
bookTitleMarkup = \markup \null
|
||||
scoreTitleMarkup = \markup \null
|
||||
oddHeaderMarkup = \markup { \if \on-first-page-of-part \title-with-category-images ##t }
|
||||
evenHeaderMarkup = \markup { \if \on-first-page-of-part \title-with-category-images ##f }
|
||||
oddHeaderMarkup = \markup { \if \on-first-page-of-part \build-full-title ##t }
|
||||
evenHeaderMarkup = \markup { \if \on-first-page-of-part \build-full-title ##f }
|
||||
oddTitleLineMarkup = \markup { \fill-line \general-align #Y #UP { \null \bookTitleMarkupCustom \category-images } }
|
||||
evenTitleLineMarkup = \markup { \fill-line \general-align #Y #UP { \category-images \bookTitleMarkupCustom \null } }
|
||||
defaultTitleMarkup = \markup {
|
||||
\override #'(baseline-skip . 3.5)
|
||||
\center-column {
|
||||
|
||||
Reference in New Issue
Block a user