From 8b0fc2d7c9fb453f823197ade19da6e8b7f1dafa Mon Sep 17 00:00:00 2001 From: tux Date: Thu, 2 Nov 2023 23:13:11 +0100 Subject: [PATCH] snippets einzeln baubar und default layout --- all_base_includes.ly | 23 +++++++++++++++++++++++ default_output.ly | 7 +++++++ general_include.ly | 26 ++------------------------ snippet_include.ly | 8 ++++++++ styles.ly | 2 +- styles/default.ly | 14 ++++++++++++++ 6 files changed, 55 insertions(+), 25 deletions(-) create mode 100644 all_base_includes.ly create mode 100644 default_output.ly create mode 100644 snippet_include.ly create mode 100644 styles/default.ly diff --git a/all_base_includes.ly b/all_base_includes.ly new file mode 100644 index 0000000..a31cc28 --- /dev/null +++ b/all_base_includes.ly @@ -0,0 +1,23 @@ +\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" +\include "chord_settings.ly" +\include "transposition.ly" +\include "verses_with_chords.ly" +\include "arrows_in_scores.ly" +\include "swing_style.ly" +\include "inline_score.ly" + +% reset important variables +LAYOUT = \layout { \generalLayout } +HEADER = {} +MUSIC = {} +TEXT = \markuplist {""} \ No newline at end of file diff --git a/default_output.ly b/default_output.ly new file mode 100644 index 0000000..215dd83 --- /dev/null +++ b/default_output.ly @@ -0,0 +1,7 @@ +#(define noDefaultOutput (if (defined? 'noDefaultOutput) noDefaultOutput #f)) +HEADER = \bookpart { + \header { + \basicSongInfo + } +} +\include #(if noDefaultOutput "void.ly" "standalone_output.ly") \ No newline at end of file diff --git a/general_include.ly b/general_include.ly index edc4f7b..f4f1a95 100644 --- a/general_include.ly +++ b/general_include.ly @@ -1,27 +1,5 @@ -\version "2.18" - #(ly:set-option 'relative-includes #t) -\include #(if (< (list-ref (ly:version) 1) 24) "legacy-lilypond-compatibility.ly" "void.ly") +#(define noDefaultOutput #t) -#(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" -\include "chord_settings.ly" -\include "transposition.ly" -\include "verses_with_chords.ly" -\include "arrows_in_scores.ly" -\include "swing_style.ly" -\include "inline_score.ly" - -% reset important variables -LAYOUT = \layout { \generalLayout } -HEADER = {} -MUSIC = {} -TEXT = \markuplist {""} +\include "all_base_includes.ly" \ No newline at end of file diff --git a/snippet_include.ly b/snippet_include.ly new file mode 100644 index 0000000..f0be485 --- /dev/null +++ b/snippet_include.ly @@ -0,0 +1,8 @@ +#(ly:set-option 'relative-includes #t) + +#(define noDefaultOutput (if (defined? 'noDefaultOutput) noDefaultOutput #f)) + +\include #(if noDefaultOutput "void.ly" "all_base_includes.ly") + +#(define AUTHOR_DATA (if (defined? 'AUTHOR_DATA) AUTHOR_DATA (call-with-input-file "../data/authors.json" json->scm))) +#(define SONG_DATA (if (defined? 'SONG_DATA) SONG_DATA (call-with-input-file "../data/songs.json" json->scm))) \ No newline at end of file diff --git a/styles.ly b/styles.ly index 86b42f8..cd0d3b4 100644 --- a/styles.ly +++ b/styles.ly @@ -5,7 +5,7 @@ #(define songStyle (if (not (defined? 'songStyle)) - (if (not (defined? 'defaultSongStyle)) 'börnel defaultSongStyle) + (if (not (defined? 'defaultSongStyle)) 'default defaultSongStyle) songStyle)) #(if (not (boolean? bookStyle)) diff --git a/styles/default.ly b/styles/default.ly new file mode 100644 index 0000000..0323d77 --- /dev/null +++ b/styles/default.ly @@ -0,0 +1,14 @@ +songFormatAndSize = "a4portrait" +songMargin = 5 +songInfoFontSize = -3.5 +songTitleFont = "LilyPond Sans" +songChordFont = "LilyPond Serif" +songLyricFont = "LilyPond Sans" +songChordFontSeries = #'bold +songTextChordAlignment = #'center +songScoreChordFontSize = 0 +songTextChordFontSize = \songScoreChordFontSize +songTextLineHeigth = 5 +songTocColumns = 3 +globalSize = 15 +lyricSize = 1.6 \ No newline at end of file