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