2023-07-22 22:07:57 +02:00
|
|
|
#(define-markup-command (bookTitleMarkupCustom layout props)()
|
|
|
|
(interpret-markup layout
|
|
|
|
(prepend-alist-chain 'defaultmarkup #{
|
|
|
|
\markup {
|
|
|
|
\override #'(baseline-skip . 3.5)
|
|
|
|
\center-column {
|
2024-07-10 22:29:58 +02:00
|
|
|
\override #`(font-name . ,songTitleFont) { \fontsize #songTitleSize \fromproperty #'header:title }
|
2023-07-22 22:07:57 +02:00
|
|
|
\large \bold \fromproperty #'header:subtitle
|
|
|
|
\smaller \bold \fromproperty #'header:subsubtitle
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#}
|
|
|
|
(prepend-alist-chain 'songfilename (chain-assoc-get 'header:songfilename props "") props))
|
|
|
|
(make-column-markup
|
|
|
|
(list
|
|
|
|
(make-vspace-markup (chain-assoc-get 'header:titletopspace props 0))
|
|
|
|
(make-customEps-markup (chain-assoc-get 'header:titlesize props 3.5) "titel.eps")
|
|
|
|
))
|
|
|
|
))
|
|
|
|
|
|
|
|
#(define-markup-command (category-image layout props size category)(number? string?)
|
|
|
|
(interpret-markup layout props
|
|
|
|
(if noStandaloneOutput
|
|
|
|
(make-epsfileref-markup Y size
|
|
|
|
(category-image-path category))
|
|
|
|
(make-epsfile-markup Y size
|
|
|
|
(category-image-path category)))))
|
|
|
|
|
|
|
|
#(define showCategoryImages (if (defined? 'showCategoryImages) showCategoryImages #t))
|
|
|
|
|
|
|
|
#(define-markup-command (category-images layout props)()
|
|
|
|
(interpret-markup layout props
|
|
|
|
(if showCategoryImages
|
|
|
|
(make-line-markup (map (lambda (category) (make-category-image-markup 5 category))
|
|
|
|
(string-tokenize (chain-assoc-get 'header:categories props ""))))
|
|
|
|
(make-null-markup))))
|
|
|
|
|
2023-11-22 15:28:31 +01:00
|
|
|
#(define pdf-encode (@@ (lily framework-ps) pdf-encode))
|
2023-07-22 22:07:57 +02:00
|
|
|
% PDF tags
|
|
|
|
#(define-markup-command (title-to-pdf-toc layout props title) (string?)
|
|
|
|
(ly:make-stencil
|
|
|
|
(list 'embedded-ps
|
|
|
|
(ly:format
|
2023-08-10 13:20:16 +02:00
|
|
|
"[/Action /GoTo /View [/Fit] /Title (~a) /OUT pdfmark" (pdf-encode title)))
|
2023-07-22 22:07:57 +02:00
|
|
|
empty-interval empty-interval
|
|
|
|
;'(0 . 0) '(0 . 0)
|
|
|
|
))
|
|
|
|
|
|
|
|
#(define-markup-command (title-with-category-images layout props right)(boolean?)
|
|
|
|
(interpret-markup layout props
|
2024-12-01 15:48:25 +01:00
|
|
|
(let* ((title (chain-assoc-get 'header:title props ""))
|
|
|
|
(starttext (chain-assoc-get 'header:starttext props #f))
|
|
|
|
(pdfbookmark (if starttext (string-append starttext " | " title) title)))
|
2023-07-22 22:07:57 +02:00
|
|
|
(if title
|
|
|
|
;(if (chain-assoc-get 'header:categories props #f)
|
|
|
|
(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 \fill-line \general-align #Y #UP { \null \bookTitleMarkupCustom \null } #})
|
|
|
|
;(make-null-markup))
|
|
|
|
#{ \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 }
|
|
|
|
}
|