Compare commits

...

3 Commits

14 changed files with 45 additions and 133 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -3,20 +3,26 @@
#(make-on-the-fly-markup
(lambda (layout props m)
(let ((name (chain-assoc-get 'author:name props #f))
(trail_name (chain-assoc-get 'author:trail_name props #f))
(birth_year (chain-assoc-get 'author:birth_year props #f))
(death_year (chain-assoc-get 'author:death_year props #f))
(organization (chain-assoc-get 'author:organization props #f)))
(trail_name (chain-assoc-get 'author:trail_name props #f))
(birth_year (chain-assoc-get 'author:birth_year props #f))
(death_year (chain-assoc-get 'author:death_year 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
(string-append
name
(if trail_name (ly:format " (~a)" trail_name) "")
(if (and birth_year death_year)
(ly:format ", (~a~a)" birth_year death_year)
(if birth_year
(ly:format ", (*~a)" birth_year)
(if death_year (ly:format ", (†~a)" death_year) "")))
(if organization (ly:format ", ~a" organization) "")
(if (or (string-present trail_name) (string-present name))
(render_informations (filter string-present (list
trail_name
name
(if (and (string-present birth_year) (string-present death_year))
(ly:format "~a~a" birth_year death_year)
(if (string-present birth_year)
(ly:format "*~a" birth_year)
(if (string-present death_year) (ly:format "†~a" death_year) "")))
organization
)))
""
))))
(make-null-markup)
)

View File

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

View File

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

View File

@ -1,22 +0,0 @@
% 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

@ -1,27 +0,0 @@
% 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)))))

View File

@ -1,14 +0,0 @@
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

View File

@ -1,14 +0,0 @@
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

View File

@ -1,14 +0,0 @@
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

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

View File

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