songinfo Ausrichtung einfacher anpassbar gemacht
This commit is contained in:
parent
bf596edb2c
commit
14e01900c2
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
\include "default_author_style.ly"
|
\include "default_author_style.ly"
|
||||||
\include "default_songinfo_style.ly"
|
\include "default_songinfo_style.ly"
|
||||||
|
\include "footer_with_songinfo.ly"
|
||||||
\include "styles.ly"
|
\include "styles.ly"
|
||||||
\include #(ly:format "styles/~a.ly" songStyle)
|
\include #(ly:format "styles/~a.ly" songStyle)
|
||||||
|
|
||||||
|
@ -32,8 +32,7 @@
|
|||||||
(poetId (chain-assoc-get 'header:poetId props (if songId (songinfo-from songId "poet") #f)))
|
(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)))
|
(composerId (chain-assoc-get 'header:composerId props (if songId (songinfo-from songId "composer") #f)))
|
||||||
(poet-and-composer-same (equal? poetId composerId)))
|
(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)))
|
(let ((infotext (chain-assoc-get 'header:infotext props (chain-assoc-get 'header:songinfo props #f)))
|
||||||
(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)))
|
(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)))
|
(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))
|
(copyright (chain-assoc-get 'header:copyright props #f))
|
||||||
@ -59,7 +58,6 @@
|
|||||||
#:override (cons 'songinfo:year_melody
|
#:override (cons 'songinfo:year_melody
|
||||||
(if (and year_melody (not (and (string? year_melody) (string-null? year_melody)))) year_melody #f))
|
(if (and year_melody (not (and (string? year_melody) (string-null? year_melody)))) year_melody #f))
|
||||||
#:override '(baseline-skip . 3.0)
|
#:override '(baseline-skip . 3.0)
|
||||||
#:override `(line-width . ,blockwidth)
|
|
||||||
#:fontsize songInfoFontSize
|
#:fontsize songInfoFontSize
|
||||||
#:sans
|
#:sans
|
||||||
(ly:output-def-lookup layout 'songinfoMarkup)
|
(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 {
|
\paper {
|
||||||
print-first-page-number = ##t
|
print-first-page-number = ##t
|
||||||
first-page-number = #0
|
first-page-number = #0
|
||||||
@ -84,14 +88,14 @@
|
|||||||
oddFooterMarkup = \markup {
|
oddFooterMarkup = \markup {
|
||||||
\fill-line {
|
\fill-line {
|
||||||
\line { \null }
|
\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 }
|
\line { \if \should-print-page-number \print-pagenumber }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
evenFooterMarkup = \markup {
|
evenFooterMarkup = \markup {
|
||||||
\fill-line {
|
\fill-line {
|
||||||
\line { \if \should-print-page-number \print-pagenumber }
|
\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 }
|
\line { \null }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
\include #(if (< (list-ref (ly:version) 1) 25) "legacy-lilypond-compatibility-pre-2.25.ly" "void.ly")
|
\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 "eps_file_from_song_dir.ly"
|
||||||
\include "title_with_category_images.ly"
|
\include "title_with_category_images.ly"
|
||||||
\include "footer_with_songinfo.ly"
|
|
||||||
\include "auto_rest_merging.ly"
|
\include "auto_rest_merging.ly"
|
||||||
\include "chord_settings.ly"
|
\include "chord_settings.ly"
|
||||||
\include "transposition.ly"
|
\include "transposition.ly"
|
||||||
|
Loading…
Reference in New Issue
Block a user