Browse Source

Do no espace ~ and ^

pull/239/head
Oliverpool 8 years ago
parent
commit
c7268a1474
  1. 2
      patacrep/data/templates/songs/chordpro/latex/content_word
  2. 4
      patacrep/songs/chordpro/__init__.py
  3. 11
      test/test_book/special.tex.control
  4. 2
      test/test_book/special_datadir/songs/special.csg
  5. 4
      test/test_song/special.tsg

2
patacrep/data/templates/songs/chordpro/latex/content_word

@ -1 +1 @@
(( content.value|escape_specials('{}&#_^%~$\\') ))
(( content.value|escape_specials('{}&#_%$\\') ))

4
patacrep/songs/chordpro/__init__.py

@ -132,8 +132,8 @@ class Chordpro2LatexSong(ChordproSong):
'{': r'\{',
'}': r'\}',
'\\': r'\textbackslash{}',
'^': r'\textasciicircum{}',
'~': r'\textasciitilde{}',
'^': r'\textasciicircum{}', # Has special meaning in songs package (repeat chord)
'~': r'\textasciitilde{}', # Used for non-breaking space in LaTeX
'#': r'\#',
'&': r'\&',
'$': r'\$',

11
test/test_book/special.tex.control

@ -144,13 +144,20 @@ guitar,
\ifchorded
\begin{verse*}
\musicnote {\nolyrics \[A]}
\end{verse*}
\fi
\begin{verse}
\& \$ \% \# \_ \} \{ \textasciitilde{} \textasciicircum{} \textbackslash{}
\& \$ \% \# \_ \} \{ ~ ^ \textbackslash{}
\end{verse}
\begin{chorus}
\& \$ \% \# \_ \} \{ \textasciitilde{} \textasciicircum{} \textbackslash{}
\& \$ \% \# \_ \} \{ ~ ^ \textbackslash{}
\end{chorus}
\endsong

2
test/test_book/special_datadir/songs/special.csg

@ -3,6 +3,8 @@
{album: & $ % # _ \} \{ ~ ^ \\}
{url: http://&$%#_~^}
[A]
& $ % \# _ \} \{ ~ ^ \\
{start_of_chorus}

4
test/test_song/special.tsg

@ -11,12 +11,12 @@
\begin{verse}
\& \$ \% \# \_ \} \{ \textasciitilde{} \textasciicircum{} \textbackslash{}
\& \$ \% \# \_ \} \{ ~ ^ \textbackslash{}
\end{verse}
\begin{chorus}
\& \$ \% \# \_ \} \{ \textasciitilde{} \textasciicircum{} \textbackslash{}
\& \$ \% \# \_ \} \{ ~ ^ \textbackslash{}
\end{chorus}
\endsong

Loading…
Cancel
Save