Browse Source

Merge pull request #110 from patacrep/nolyrics

Improve "nolyrics" section support
pull/113/head
Louis 9 years ago
parent
commit
f93f7b904a
  1. 13
      patacrep/data/examples/example-test.sb
  2. 0
      patacrep/data/examples/songs/tests/chords.sgc
  3. 0
      patacrep/data/examples/songs/tests/errors.sgc
  4. 11
      patacrep/data/examples/songs/tests/nolyrics.sgc
  5. 6
      patacrep/songs/chordpro/data/latex/content_verse
  6. 14
      test/test_chordpro/nolyrics.tex

13
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"]
}

0
patacrep/data/examples/songs/chords.sgc → patacrep/data/examples/songs/tests/chords.sgc

0
patacrep/data/examples/songs/errors.sgc → patacrep/data/examples/songs/tests/errors.sgc

11
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

6
patacrep/songs/chordpro/data/latex/content_verse

@ -1,11 +1,11 @@
(*- if content.nolyrics -*) (*- if content.nolyrics -*)
\ifchorded
\begin{verse*} \begin{verse*}
\musicnote{\nolyrics
(* for line in content.lines *) (* for line in content.lines *)
(( render(line) )) \musicnote {\nolyrics (( render(line) ))}
(* endfor *) (* endfor *)
}
\end{verse*} \end{verse*}
\fi
(*- else *) (*- else *)
\begin{(( content.type ))} \begin{(( content.type ))}
(* for line in content.lines *) (* for line in content.lines *)

14
test/test_chordpro/nolyrics.tex

@ -12,19 +12,19 @@
\end{verse} \end{verse}
\ifchorded
\begin{verse*} \begin{verse*}
\musicnote{\nolyrics \musicnote {\nolyrics \[A B#]}
\[A B#]
}
\end{verse*} \end{verse*}
\fi
\ifchorded
\begin{verse*} \begin{verse*}
\musicnote{\nolyrics \musicnote {\nolyrics \[A] \[B]}
\[A] \[B] \musicnote {\nolyrics \[C]}
\[C]
}
\end{verse*} \end{verse*}
\fi
\begin{verse} \begin{verse}

Loading…
Cancel
Save