From c89219f19ce7b000e0fb0f27544ce52b59d118be Mon Sep 17 00:00:00 2001 From: Louis Date: Wed, 2 Apr 2014 16:45:16 +0200 Subject: [PATCH] L'exemple fonctionne avec chacun des templateso MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Même s'il produit un fichier vide pour layout.tex, ce qui est normal. --- songbook_core/data/examples/example-layout.sb | 15 +++++++++++++++ songbook_core/data/examples/example-patacrep.sb | 15 +++++++++++++++ songbook_core/data/examples/example-songs.sb | 15 +++++++++++++++ songbook_core/data/templates/layout.tex | 7 ++++++- songbook_core/data/templates/songs.tex | 12 ------------ 5 files changed, 51 insertions(+), 13 deletions(-) create mode 100644 songbook_core/data/examples/example-layout.sb create mode 100644 songbook_core/data/examples/example-patacrep.sb create mode 100644 songbook_core/data/examples/example-songs.sb diff --git a/songbook_core/data/examples/example-layout.sb b/songbook_core/data/examples/example-layout.sb new file mode 100644 index 00000000..56e545de --- /dev/null +++ b/songbook_core/data/examples/example-layout.sb @@ -0,0 +1,15 @@ +{ +"template" : "layout.tex", +"bookoptions" : [ + "importantdiagramonly", + "repeatchords", + "lilypond", + "pictures" + ], +"booktype" : "chorded", +"lang" : "french", +"authwords" : { + "sep" : ["and", "et"] + }, + "datadir" : "." +} diff --git a/songbook_core/data/examples/example-patacrep.sb b/songbook_core/data/examples/example-patacrep.sb new file mode 100644 index 00000000..bd722524 --- /dev/null +++ b/songbook_core/data/examples/example-patacrep.sb @@ -0,0 +1,15 @@ +{ +"template" : "patacrep.tex", +"bookoptions" : [ + "importantdiagramonly", + "repeatchords", + "lilypond", + "pictures" + ], +"booktype" : "chorded", +"lang" : "french", +"authwords" : { + "sep" : ["and", "et"] + }, + "datadir" : "." +} diff --git a/songbook_core/data/examples/example-songs.sb b/songbook_core/data/examples/example-songs.sb new file mode 100644 index 00000000..668eaca3 --- /dev/null +++ b/songbook_core/data/examples/example-songs.sb @@ -0,0 +1,15 @@ +{ +"template" : "songs.tex", +"bookoptions" : [ + "importantdiagramonly", + "repeatchords", + "lilypond", + "pictures" + ], +"booktype" : "chorded", +"lang" : "french", +"authwords" : { + "sep" : ["and", "et"] + }, + "datadir" : "." +} diff --git a/songbook_core/data/templates/layout.tex b/songbook_core/data/templates/layout.tex index 5b4d8afe..2b422832 100644 --- a/songbook_core/data/templates/layout.tex +++ b/songbook_core/data/templates/layout.tex @@ -59,7 +59,10 @@ "mainfontsize": {"description": {"en": "Font Size", "fr": "Taille de police"}, "type":"font", "default":{"default": "10"} - } + }, +"lang": {"description": {"en": "Language", "fr": "Langue"}, + "default": {"en": "english", "fr": "french"} + } } (% endvariables %) @@ -76,6 +79,8 @@ \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} + + \lang{((lang))} (* endblock songbookpreambule *) (* block preambule *) diff --git a/songbook_core/data/templates/songs.tex b/songbook_core/data/templates/songs.tex index 2ab9f201..4529996b 100644 --- a/songbook_core/data/templates/songs.tex +++ b/songbook_core/data/templates/songs.tex @@ -1,14 +1,3 @@ -(% variables %) -{ -"languages": {"description": {"en": "List of languages used by songs", "fr": "Liste des langues utilisées par les chansons"}, - "default": {"en": "english", "fr": "french"} - }, -"lang": {"description": {"en": "Language", "fr": "Langue"}, - "default": {"en": "english", "fr": "french"} - } -} -(% endvariables %) - (* extends "layout.tex" *) (* block songbookpreambule *) @@ -19,7 +8,6 @@ \PassOptionsToPackage{((lang))}{babel} (* endfor *) \usepackage[((lang))]{babel} - \lang{((lang))} \graphicspath{{((datadir))/img/}} (* endblock *)