diff --git a/patacrep/data/examples/example-test.sb b/patacrep/data/examples/example-test.sb new file mode 100644 index 00000000..4190c003 --- /dev/null +++ b/patacrep/data/examples/example-test.sb @@ -0,0 +1,13 @@ +{ +"bookoptions" : [ + "diagram", + "repeatchords", + "lilypond", + "pictures" + ], +"booktype" : "chorded", +"template" : "patacrep.tex", +"encoding": "utf8", + "content": ["tests/*.sg", "tests/*.sgc"] + +} diff --git a/patacrep/data/examples/songs/chords.sgc b/patacrep/data/examples/songs/tests/chords.sgc similarity index 100% rename from patacrep/data/examples/songs/chords.sgc rename to patacrep/data/examples/songs/tests/chords.sgc diff --git a/patacrep/data/examples/songs/errors.sgc b/patacrep/data/examples/songs/tests/errors.sgc similarity index 100% rename from patacrep/data/examples/songs/errors.sgc rename to patacrep/data/examples/songs/tests/errors.sgc diff --git a/patacrep/data/examples/songs/tests/nolyrics.sgc b/patacrep/data/examples/songs/tests/nolyrics.sgc new file mode 100644 index 00000000..beebbdb6 --- /dev/null +++ b/patacrep/data/examples/songs/tests/nolyrics.sgc @@ -0,0 +1,11 @@ +{title: No lyrics} +{subtitle: Test of verses without any lyrics} + +[A]This is a [Bb]verse +With [C#]lyrics + +[Adim] [Dmaj] +[Em3] + +[G4]This is [Emaj3]another +[Absus8]With lyrics diff --git a/patacrep/songs/chordpro/data/latex/content_verse b/patacrep/songs/chordpro/data/latex/content_verse index 7f27c4eb..176b104b 100644 --- a/patacrep/songs/chordpro/data/latex/content_verse +++ b/patacrep/songs/chordpro/data/latex/content_verse @@ -1,11 +1,11 @@ (*- if content.nolyrics -*) +\ifchorded \begin{verse*} -\musicnote{\nolyrics (* for line in content.lines *) - (( render(line) )) + \musicnote {\nolyrics (( render(line) ))} (* endfor *) -} \end{verse*} +\fi (*- else *) \begin{(( content.type ))} (* for line in content.lines *) diff --git a/test/test_chordpro/nolyrics.tex b/test/test_chordpro/nolyrics.tex index 2f017724..343f4e63 100644 --- a/test/test_chordpro/nolyrics.tex +++ b/test/test_chordpro/nolyrics.tex @@ -12,19 +12,19 @@ \end{verse} +\ifchorded \begin{verse*} -\musicnote{\nolyrics - \[A B#] -} + \musicnote {\nolyrics \[A B#]} \end{verse*} +\fi +\ifchorded \begin{verse*} -\musicnote{\nolyrics - \[A] \[B] - \[C] -} + \musicnote {\nolyrics \[A] \[B]} + \musicnote {\nolyrics \[C]} \end{verse*} +\fi \begin{verse}