diff --git a/general_include.ly b/general_include.ly index c143a61..091f0b1 100644 --- a/general_include.ly +++ b/general_include.ly @@ -4,8 +4,6 @@ #(ly:set-option 'relative-includes #t) -\include "../lilypond-custom-includes/categories.ly" - compatibilityMode = #(define-void-function (parser location) () (if (< (list-ref (ly:version) 1) 24) @@ -15,6 +13,7 @@ compatibilityMode = \compatibilityMode \include "./styles.ly" +\include #(ly:format "styles/~a.ly" songStyle) #(define (lookup-var varsym default) (let ((value (assoc-ref (hash-map->list cons (struct-ref (current-module) 0)) varsym))) @@ -27,15 +26,7 @@ showCategoryImages = #(lookup-var 'showCategoryImages #t) % check if we have a StandAlone compile or if variable noStandaloneOutput is set #(define isStandAlone (not (lookup-var 'noStandaloneOutput #f))) -#(if (< (list-ref (ly:version) 1) 19) - (case song-style - ((börnel) (set-default-paper-size "b6" 'landscape)) - ((bock) (set-default-paper-size "a6" 'landscape))) - (case song-style - ((börnel) (set-default-paper-size "b6landscape")) - ((bock) (set-default-paper-size "a6landscape"))) - ) - +#(set-default-paper-size songFormatAndSize) #(set-global-staff-size globalSize) #(define-markup-command (print-songinfo layout props) () @@ -50,9 +41,8 @@ showCategoryImages = #(lookup-var 'showCategoryImages #t) (copyright (chain-assoc-get 'header:copyright props #f))) (if (chain-assoc-get 'page:is-bookpart-last-page props #f) (markup #:override '(baseline-skip . 3.0) ( - make-fontsize-markup (case song-style ((börnel) -3.5) ((bock) -1.5)) - ;(symbol->keyword (case song-style ((börnel) 'roman) ((bock) 'sans))) - ((lambda (m) (case song-style ((börnel) (make-roman-markup m)) ((bock) (make-sans-markup m)))) + make-fontsize-markup songInfoFontSize + (make-sans-markup ;%\override #'(line-width . 92) \wordwrap-field #symbol (make-column-markup (list (make-line-markup @@ -96,7 +86,7 @@ showCategoryImages = #(lookup-var 'showCategoryImages #t) \markup { \override #'(baseline-skip . 3.5) \center-column { - \override #`(font-name . ,(case song-style ((börnel) "Oregano") ((bock) "Britannic T. custom"))) { \fontsize #6 \fromproperty #'header:title } + \override #`(font-name . ,songTitleFont) { \fontsize #6 \fromproperty #'header:title } \large \bold \fromproperty #'header:subtitle \smaller \bold \fromproperty #'header:subsubtitle } @@ -178,21 +168,11 @@ showCategoryImages = #(lookup-var 'showCategoryImages #t) ))) #(define (default-pango size) - (case song-style - ((börnel) - (make-pango-font-tree ;"FreeSans" - ;"Spectral" - "Liberation Sans" - "TeX Gyre Heros" - "Luxi Mono" - (/ size 20))) - ((bock) - (make-pango-font-tree ;"FreeSans" - ;"Spectral" - "TimesNewRomanPS" - "Arial" - "Luxi Mono" - (/ size 20))))) + (make-pango-font-tree + songChordFont + songLyricFont + "Luxi Mono" + (/ size 20))) \paper { #(define fonts (default-pango globalSize)) @@ -201,10 +181,10 @@ showCategoryImages = #(lookup-var 'showCategoryImages #t) lyric-size = #lyricSize two-sided = ##t inner-margin = 1.5\cm - outer-margin = #(case song-style ((börnel) 5) ((bock) 8)) + outer-margin = \songMargin binding-offset = 0\cm - top-margin = #(case song-style ((börnel) 5) ((bock) 8)) - bottom-margin = #(case song-style ((börnel) 5) ((bock) 8)) + top-margin = \songMargin + bottom-margin = \songMargin system-system-spacing = #'((basic-distance . 10) (padding . 1.5)) markup-system-spacing = #'((basic-distance . 1)) score-markup-spacing = #'((padding . 2)) @@ -377,9 +357,9 @@ generalLayout = \layout { \context { \ChordNames \semiGermanChords - \override ChordName.font-size = #(case song-style ((börnel) 0) ((bock) 3)) - \override ChordName.font-series = #(case song-style ((börnel) 'bold) ((bock) 'normal)) - \override ChordName.font-family = #(case song-style ((börnel) 'sans) ((bock) 'roman)) + \override ChordName.font-size = \songScoreChordFontSize + \override ChordName.font-series = \songChordFontSeries + \override ChordName.font-family = #'roman chordNameLowercaseMinor = ##t chordChanges = ##t % eigenen chordRootNamer damit F# = Fis und Gb = Ges (also alteration ausgeschrieben) @@ -393,8 +373,8 @@ generalLayout = \layout { \Lyrics \override LyricText.font-size = #lyricSize \override StanzaNumber.font-size = #lyricSize - \override StanzaNumber.font-family = #(case song-style ((börnel) 'roman) ((bock) 'sans)) - \override LyricText.font-family = #(case song-style ((börnel) 'roman) ((bock) 'sans)) + \override StanzaNumber.font-family = #'sans + \override LyricText.font-family = #'sans \override LyricExtender.minimum-length = 0 } \context { @@ -429,7 +409,7 @@ verseChordLayout = \layout { \generalLayout \context { \ChordNames - \override ChordName.font-size = #(case song-style ((börnel) 0) ((bock) 2)) + \override ChordName.font-size = \songTextChordFontSize } } @@ -532,9 +512,9 @@ schwarzkopf = #(define-markup-command (size-box-to-box-style-dependent layout props use-x use-y abox bbox) (boolean? boolean? markup? markup?) (interpret-markup layout props - (case song-style - ((börnel) (make-size-box-to-box-markup use-x use-y abox bbox)) - ((bock) (make-size-box-to-box-left-aligned-markup use-x use-y abox bbox))))) + (case songTextChordAlignment + ((center) (make-size-box-to-box-markup use-x use-y abox bbox)) + ((left) (make-size-box-to-box-left-aligned-markup use-x use-y abox bbox))))) % Akkord mit Bunddiagramm anzeigen #(define-markup-command (fret-chord layout props fret chord) (string? string?) @@ -560,9 +540,9 @@ schwarzkopf = #(define-markup-command (chord-alignment-style-dependent layout props chord-with-text) (markup?) (interpret-markup layout props - (case song-style - ((börnel) (make-center-align-markup chord-with-text)) - ((bock) (make-left-align-markup chord-with-text))))) + (case songTextChordAlignment + ((center) (make-center-align-markup chord-with-text)) + ((left) (make-left-align-markup chord-with-text))))) % Text über Text mittig darstellen #(define-markup-command (textup layout props text uptext) (markup? markup?) @@ -610,7 +590,7 @@ schwarzkopf = (string-append "\\transpose " (car fromto) " " (cdr fromto)) ""))) (interpret-markup layout props - (markup #:override `(baseline-skip . ,(case song-style ((börnel) 5.0) ((bock) 5.5))) #:anchor-x-between #:stanza stanza + (markup #:override `(baseline-skip . ,songTextLineHeigth) #:anchor-x-between #:stanza stanza (make-wrap-newline-markup (regexp-substitute/global #f "\\(( *)([^,()]*)( *),([^)]*)\\)" (regexp-substitute/global #f "(([^ \n]*\\([^()]*\\)[^ \n]*)+)" verse @@ -645,7 +625,7 @@ repStop = \markup { \rotate #180 \repStart } #(define-markup-command (verseformat layout props verse) (markup?) "Textformatierung für Strophen" (interpret-markup layout props - ((lambda (m) (case song-style ((börnel) (make-roman-markup m)) ((bock) (make-sans-markup m)))) (make-fontsize-markup (ly:output-def-lookup layout 'lyric-size) verse)) + (make-sans-markup (make-fontsize-markup (ly:output-def-lookup layout 'lyric-size) verse)) ) ) diff --git a/styles.ly b/styles.ly index cd0579f..86b42f8 100644 --- a/styles.ly +++ b/styles.ly @@ -1,16 +1,16 @@ -#(define book-style - (if (not (defined? 'book-style)) +#(define bookStyle + (if (not (defined? 'bookStyle)) #f - book-style)) + bookStyle)) -#(define song-style - (if (not (defined? 'song-style)) - 'börnel - song-style)) +#(define songStyle + (if (not (defined? 'songStyle)) + (if (not (defined? 'defaultSongStyle)) 'börnel defaultSongStyle) + songStyle)) -#(if (not (boolean? book-style)) - (set! song-style book-style)) +#(if (not (boolean? bookStyle)) + (set! songStyle bookStyle)) #(define (bock-style layout props) "Whether we have bockstyle or not" - (eq? song-style 'bock)) \ No newline at end of file + (eq? songStyle 'bock)) \ No newline at end of file diff --git a/styles/bock.ly b/styles/bock.ly new file mode 100644 index 0000000..35f28a3 --- /dev/null +++ b/styles/bock.ly @@ -0,0 +1,11 @@ +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 \ No newline at end of file diff --git a/styles/börnel.ly b/styles/börnel.ly new file mode 100644 index 0000000..96811a7 --- /dev/null +++ b/styles/börnel.ly @@ -0,0 +1,11 @@ +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 diff --git a/styles/büddel.ly b/styles/büddel.ly new file mode 100644 index 0000000..f06a8fb --- /dev/null +++ b/styles/büddel.ly @@ -0,0 +1,11 @@ +songFormatAndSize = "a5" +songMargin = 5 +songInfoFontSize = 0 +songTitleFont = "Fontin" +songChordFont = "Fontin" +songLyricFont = "FontinSans" +songChordFontSeries = #'bold +songTextChordAlignment = #'left +songScoreChordFontSize = 2 +songTextChordFontSize = 2 +songTextLineHeigth = 5 \ No newline at end of file