songinfo Ausrichtung einfacher anpassbar gemacht

This commit is contained in:
Christoph Wagner 2023-11-01 09:48:52 +01:00
parent bf596edb2c
commit 14e01900c2
3 changed files with 10 additions and 6 deletions

View File

@ -2,6 +2,7 @@
\include "default_author_style.ly"
\include "default_songinfo_style.ly"
\include "footer_with_songinfo.ly"
\include "styles.ly"
\include #(ly:format "styles/~a.ly" songStyle)

View File

@ -32,8 +32,7 @@
(poetId (chain-assoc-get 'header:poetId props (if songId (songinfo-from songId "poet") #f)))
(composerId (chain-assoc-get 'header:composerId props (if songId (songinfo-from songId "composer") #f)))
(poet-and-composer-same (equal? poetId composerId)))
(let ((blockwidth (* (chain-assoc-get 'header:songinfo-size-factor props 0.9) (ly:output-def-lookup layout 'line-width)))
(infotext (chain-assoc-get 'header:infotext props (chain-assoc-get 'header:songinfo props #f)))
(let ((infotext (chain-assoc-get 'header:infotext props (chain-assoc-get 'header:songinfo props #f)))
(poet-maybe-with-composer (chain-assoc-get 'header:poet props (if poetId (if poet-and-composer-same (format-poet-and-composer poetId) (format-poet poetId)) #f)))
(composer (chain-assoc-get 'header:composer props (if (and composerId (not poet-and-composer-same)) (format-composer composerId) #f)))
(copyright (chain-assoc-get 'header:copyright props #f))
@ -59,7 +58,6 @@
#:override (cons 'songinfo:year_melody
(if (and year_melody (not (and (string? year_melody) (string-null? year_melody)))) year_melody #f))
#:override '(baseline-skip . 3.0)
#:override `(line-width . ,blockwidth)
#:fontsize songInfoFontSize
#:sans
(ly:output-def-lookup layout 'songinfoMarkup)
@ -77,6 +75,12 @@
)
))))
#(define-markup-command (fractional-line-width layout props arg)(markup?)
(interpret-markup layout props
(make-override-markup
`(line-width . ,(* (chain-assoc-get 'header:songinfo-size-factor props 0.9) (ly:output-def-lookup layout 'line-width)))
arg)))
\paper {
print-first-page-number = ##t
first-page-number = #0
@ -84,14 +88,14 @@
oddFooterMarkup = \markup {
\fill-line {
\line { \null }
\line { \general-align #Y #DOWN \print-songinfo }
\line { \general-align #Y #DOWN \fractional-line-width \print-songinfo }
\line { \if \should-print-page-number \print-pagenumber }
}
}
evenFooterMarkup = \markup {
\fill-line {
\line { \if \should-print-page-number \print-pagenumber }
\line { \general-align #Y #DOWN \print-songinfo }
\line { \general-align #Y #DOWN \fractional-line-width \print-songinfo }
\line { \null }
}
}

View File

@ -12,7 +12,6 @@
\include #(if (< (list-ref (ly:version) 1) 25) "legacy-lilypond-compatibility-pre-2.25.ly" "void.ly")
\include "eps_file_from_song_dir.ly"
\include "title_with_category_images.ly"
\include "footer_with_songinfo.ly"
\include "auto_rest_merging.ly"
\include "chord_settings.ly"
\include "transposition.ly"