Compare commits

..

No commits in common. "bc769f08312dcba138b2663b8fe392485f0a5c85" and "8b0fc2d7c9fb453f823197ade19da6e8b7f1dafa" have entirely different histories.

14 changed files with 133 additions and 45 deletions

View File

@ -1,8 +1,11 @@
\include #(if (< (list-ref (ly:version) 1) 24) "legacy-lilypond-compatibility.ly" "void.ly")
#(define noStandaloneOutput (if (defined? 'noStandaloneOutput) noStandaloneOutput #f)) #(define noStandaloneOutput (if (defined? 'noStandaloneOutput) noStandaloneOutput #f))
#(if (defined? 'LAYOUT) #f (load "json_parser.scm")) #(if (defined? 'LAYOUT) #f (load "json_parser.scm"))
#(use-modules (json parser)) #(use-modules (json parser))
\include "basic_format_and_style_settings.ly" \include "basic_format_and_style_settings.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 "auto_rest_merging.ly" \include "auto_rest_merging.ly"

View File

@ -1,9 +1,10 @@
\language "deutsch" \language "deutsch"
\include "default_style.ly"
\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 "footer_with_songinfo.ly"
\include "styles.ly"
\include #(ly:format "styles/~a.ly" songStyle)
\include #(if (defined? 'customStyleOverridesFile) customStyleOverridesFile "void.ly") \include #(if (defined? 'customStyleOverridesFile) customStyleOverridesFile "void.ly")
@ -94,8 +95,6 @@ schwarzkopf =
\override NoteHead.color = #grey \override NoteHead.color = #grey
#}) #})
stanza = % hübsche Wiederholungszeichen für den Liedtext
#(define-music-function (parser location stanzanumber) (number?) repStart = "𝄆"
#{ \set stanza = #(ly:format stanzaFormat stanzanumber) #}) repStop = "𝄇"
ref = { \set stanza = \refString }

View File

@ -1,3 +1,5 @@
\version "2.18"
#(define song-list '()) #(define song-list '())
#(define (files-in-directory dirname) #(define (files-in-directory dirname)
@ -118,7 +120,7 @@ includeSong =
#{ #{
\bookOutputName #filename \bookOutputName #filename
#} #}
(ly:parser-parse-string (ly:parser-clone) (ly:parser-parse-string (if (< (list-ref (ly:version) 1) 19) (ly:parser-clone parser) (ly:parser-clone))
(ly:format "\\include \"~a/~a/~a.ly\"" songPath filename filename)) (ly:format "\\include \"~a/~a/~a.ly\"" songPath filename filename))
(let ((label (gensym "index"))) (let ((label (gensym "index")))
(set! additional-page-switch-label-list (set! additional-page-switch-label-list
@ -153,7 +155,7 @@ imagepage =
songs = songs =
#(define-void-function (parser location) () #(define-void-function (parser location) ()
(for-each (lambda (songitems) (for-each (lambda (songitems)
(ly:book-add-bookpart! (ly:parser-lookup '$current-book) (ly:book-add-bookpart! (if (< (list-ref (ly:version) 1) 19) (ly:parser-lookup parser '$current-book) (ly:parser-lookup '$current-book))
(let ((filename (car songitems)) (let ((filename (car songitems))
(songvars (cdr songitems))) (songvars (cdr songitems)))
(if (eq? filename 'emptyPage) (if (eq? filename 'emptyPage)

View File

@ -99,11 +99,13 @@ generalLayout = \layout {
(interpret-markup layout props (interpret-markup layout props
#{ \markup { \override #'(baseline-skip . 2) #{ \markup { \override #'(baseline-skip . 2)
\center-column { \center-column {
\score { \new ChordNames { \score { \new ChordNames { #(if (< (list-ref (ly:version) 1) 19)
#(ly:parser-include-string (string-append "\\chordmode { s4 " chord " }")) (ly:parser-include-string parser (string-append "\\chordmode { s4 " chord " }"))
} \layout { \generalLayout } } (ly:parser-include-string (string-append "\\chordmode { s4 " chord " }"))
\override #'(fret-diagram-details . ((barre-type . straight))) { ) } \layout { \generalLayout } }
\fret-diagram-terse #fret \override #'(fret-diagram-details . (
(barre-type . straight))) {
\fret-diagram-terse #fret
} }
} }
} }

View File

@ -3,26 +3,20 @@
#(make-on-the-fly-markup #(make-on-the-fly-markup
(lambda (layout props m) (lambda (layout props m)
(let ((name (chain-assoc-get 'author:name props #f)) (let ((name (chain-assoc-get 'author:name props #f))
(trail_name (chain-assoc-get 'author:trail_name props #f)) (trail_name (chain-assoc-get 'author:trail_name props #f))
(birth_year (chain-assoc-get 'author:birth_year props #f)) (birth_year (chain-assoc-get 'author:birth_year props #f))
(death_year (chain-assoc-get 'author:death_year props #f)) (death_year (chain-assoc-get 'author:death_year props #f))
(organization (chain-assoc-get 'author:organization props #f)) (organization (chain-assoc-get 'author:organization props #f)))
(string-present (lambda (str) (and str (not (and (string? str) (string-null? str))))))
(render_informations (lambda (infolist) (string-append (car infolist) (if (null? (cdr infolist)) "" (string-append " (" (string-join (cdr infolist) ", ") ")")))))
)
(interpret-markup layout props (interpret-markup layout props
(if (or (string-present trail_name) (string-present name)) (string-append
(render_informations (filter string-present (list name
trail_name (if trail_name (ly:format " (~a)" trail_name) "")
name (if (and birth_year death_year)
(if (and (string-present birth_year) (string-present death_year)) (ly:format ", (~a~a)" birth_year death_year)
(ly:format "~a~a" birth_year death_year) (if birth_year
(if (string-present birth_year) (ly:format ", (*~a)" birth_year)
(ly:format "*~a" birth_year) (if death_year (ly:format ", (†~a)" death_year) "")))
(if (string-present death_year) (ly:format "†~a" death_year) ""))) (if organization (ly:format ", ~a" organization) "")
organization
)))
""
)))) ))))
(make-null-markup) (make-null-markup)
) )

View File

@ -1,4 +1,3 @@
\version "2.25.8"
#(ly:set-option 'relative-includes #t) #(ly:set-option 'relative-includes #t)
#(define noDefaultOutput #t) #(define noDefaultOutput #t)

View File

@ -0,0 +1,22 @@
% guile regular expressions aktivieren:
#(use-modules (ice-9 regex))
#(define ly:make-regex make-regexp)
#(define ly:regex-exec regexp-exec)
#(define ly:regex-match-substring match:substring)
#(define (ly:regex-replace pattern text . replacements)
(apply regexp-substitute/global #f pattern text 'pre (append replacements (list 'post))))
% old font handling
#(define (default-pango size)
(make-pango-font-tree
songChordFont
songLyricFont
"Luxi Mono"
(/ size 20)))
\paper {
#(define fonts (default-pango globalSize))
}

View File

@ -0,0 +1,27 @@
% this is to be compatible to older lilypond versions
\version "2.18.0"
#(define (on-first-page layout props)
"Whether the markup is printed on the first page of the book."
(= (chain-assoc-get 'page:page-number props -1)
(book-first-page layout props)))
#(define-markup-command (if layout props condition? argument)
(procedure? markup?)
#:category conditionals
(if (condition? layout props)
(interpret-markup layout props argument)
empty-stencil))
#(define (on-first-page-of-part layout props)
"Whether the markup is printed on the first page of the book part."
(= (chain-assoc-get 'page:page-number props -1)
(ly:output-def-lookup layout 'first-page-number)))
#(define (should-print-page-number layout props)
"Whether the page number should be printed on this page. This depends
on the settings @code{print-@/page-@/numbers} and
@code{print-@/first-@/page-@/number} of the @code{\\paper} block."
(and (eq? #t (ly:output-def-lookup layout 'print-page-number))
(or (not (on-first-page layout props))
(eq? #t (ly:output-def-lookup layout 'print-first-page-number)))))

14
styles/bock.ly Normal file
View File

@ -0,0 +1,14 @@
songFormatAndSize = "a6landscape"
songMargin = 8
songInfoFontSize = -1.5
songTitleFont = "Britannic T. custom"
songChordFont = "TimesNewRomanPS"
songLyricFont = "Arial"
songChordFontSeries = #'normal
songTextChordAlignment = #'left
songScoreChordFontSize = 3
songTextChordFontSize = 2
songTextLineHeigth = 5.5
songTocColumns = 3
globalSize = 15
lyricSize = 1.6

14
styles/börnel.ly Normal file
View File

@ -0,0 +1,14 @@
songFormatAndSize = "b6landscape"
songMargin = 5
songInfoFontSize = -3.5
songTitleFont = "Oregano"
songChordFont = "TeX Gyre Heros"
songLyricFont = "Liberation Sans"
songChordFontSeries = #'bold
songTextChordAlignment = #'center
songScoreChordFontSize = 0
songTextChordFontSize = \songScoreChordFontSize
songTextLineHeigth = 5
songTocColumns = 3
globalSize = 15
lyricSize = 1.6

14
styles/büdel.ly Normal file
View File

@ -0,0 +1,14 @@
songFormatAndSize = "a5"
songMargin = 5
songInfoFontSize = 0
songTitleFont = "Fontin Bold"
songChordFont = "Fontin"
songLyricFont = "FontinSans"
songChordFontSeries = #'bold
songTextChordAlignment = #'left
songScoreChordFontSize = 2
songTextChordFontSize = 2
songTextLineHeigth = 5.3
songTocColumns = 2
globalSize = 14
lyricSize = 1.6

View File

@ -12,8 +12,3 @@ songTextLineHeigth = 5
songTocColumns = 3 songTocColumns = 3
globalSize = 15 globalSize = 15
lyricSize = 1.6 lyricSize = 1.6
stanzaFormat = "~a."
refString = "Ref.:"
% hübsche Wiederholungszeichen für den Liedtext
repStart = "𝄆"
repStop = "𝄇"

View File

@ -35,7 +35,10 @@
(string-tokenize (chain-assoc-get 'header:categories props "")))) (string-tokenize (chain-assoc-get 'header:categories props ""))))
(make-null-markup)))) (make-null-markup))))
#(define pdf-encode (@@ (lily framework-ps) pdf-encode)) #(define pdf-encode
(if (< (list-ref (ly:version) 1) 24)
ly:encode-string-for-pdf
(@@ (lily framework-ps) pdf-encode)))
% PDF tags % PDF tags
#(define-markup-command (title-to-pdf-toc layout props title) (string?) #(define-markup-command (title-to-pdf-toc layout props title) (string?)
(ly:make-stencil (ly:make-stencil

View File

@ -88,18 +88,18 @@
)) ))
#(define-markup-command (stanza-raw layout props arg) #(define-markup-command (stanza-raw layout props arg)
(string-or-music?) (markup?)
(let ((verselayout (chain-assoc-get 'verselayout props generalLayout))) (let ((verselayout (chain-assoc-get 'verselayout props generalLayout)))
(interpret-markup layout props (interpret-markup layout props
(if (and (string? arg) (string-null? arg)) (if (and (string? arg) (string-null? arg))
" " " "
#{\markup #{\markup
\score { \new Lyrics { \lyricmode { #(if (ly:music? arg) arg #{ \set stanza = #arg #}) "" } } \layout { \verselayout } } \score { \new Lyrics { \lyricmode { \set stanza = #arg "" } } \layout { \verselayout } }
#} #}
)))) ))))
#(define-markup-command (stanza layout props arg) #(define-markup-command (stanza layout props arg)
(string-or-music?) (markup?)
(interpret-markup layout props (interpret-markup layout props
(make-size-box-to-box-markup #f #t (make-stanza-raw-markup arg) (make-stanza-raw-markup "x")))) (make-size-box-to-box-markup #f #t (make-stanza-raw-markup arg) (make-stanza-raw-markup "x"))))
@ -119,7 +119,7 @@
1 "\n" 2)))))) 1 "\n" 2))))))
% Kompletten Vers mit Akkorden % Kompletten Vers mit Akkorden
#(define-markup-command (chordverse layout props stanza verse) (string-or-music? string?) #(define-markup-command (chordverse layout props stanza verse) (markup? string?)
#:properties ((intraverse-vspace 0)(custom-verse-breaks '())) #:properties ((intraverse-vspace 0)(custom-verse-breaks '()))
"Vers mit Akkorden" "Vers mit Akkorden"
(let* ((fromto (chain-assoc-get 'transposition props #f)) (let* ((fromto (chain-assoc-get 'transposition props #f))
@ -137,7 +137,7 @@
)))) ))))
% Kompletter Vers aus dem Akkorde entfernt werden % Kompletter Vers aus dem Akkorde entfernt werden
#(define-markup-command (nochordverse layout props stanza verse) (string-or-music? string?) #(define-markup-command (nochordverse layout props stanza verse) (markup? string?)
#:properties ((intraverse-vspace 0)(custom-verse-breaks '())) #:properties ((intraverse-vspace 0)(custom-verse-breaks '()))
"Vers ohne Akkorde" "Vers ohne Akkorde"
(interpret-markup layout props (interpret-markup layout props