Browse Source

Merge pull request #236 from patacrep/nolyrics_flt_fix

Fix '&' in nolyrics env
pull/239/head
oliverpool 8 years ago
committed by GitHub
parent
commit
bc03bdc33b
  1. 2
      .appveyor.yml
  2. 1
      NEWS.md
  3. 2
      patacrep/data/templates/songs/chordpro/latex/content_verse
  4. 2
      patacrep/index.py
  5. 1
      patacrep/latex/lexer.py
  6. 1
      patacrep/songs/latex/__init__.py
  7. 1
      test/__init__.py
  8. 2
      test/test_song/nolyrics.csg
  9. 2
      test/test_song/nolyrics.csg.source
  10. 2
      test/test_song/nolyrics.tsg

2
.appveyor.yml

@ -23,7 +23,7 @@ install:
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
# Download miktex portable (if not cached)
- ps: "If (!(Test-Path miktex-portable.exe)){wget http://mirrors.ctan.org/systems/win32/miktex/setup/miktex-portable-2.9.5857.exe -OutFile ./miktex-portable.exe}"
- ps: "If (!(Test-Path miktex-portable.exe)){wget http://mirrors.ctan.org/systems/win32/miktex/setup/miktex-portable.exe -OutFile ./miktex-portable.exe}"
# Unzip miktex portable
- "7z x miktex-portable.exe * -aot -omiktex > nul"

1
NEWS.md

@ -4,6 +4,7 @@
* Chordpro files
* The capo directive is now considered [#224](https://github.com/patacrep/patacrep/pull/224)
* The files don't need to end with a trailing line [#223](https://github.com/patacrep/patacrep/pull/223)
* The '&' character is correctly escaped in nolyrics environment [#236](https://github.com/patacrep/patacrep/pull/236)
* Content files
* The `tex` keyword correctly includes all files of the list [#228](https://github.com/patacrep/patacrep/pull/228)
* Fix the import when the content folder is zipped [#235](https://github.com/patacrep/patacrep/pull/235)

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

@ -6,7 +6,7 @@
\ifchorded
\begin{verse*}
(* for line in content.lines *)
\musicnote {\nolyrics (( render(line)|replace("#", "{\shrp}") ))}
\musicnote {\nolyrics (( render(line)|replace("#", "{\\shrp}")|replace("&", "{\\flt}") ))}
(* endfor *)
\end{verse*}
\fi

2
patacrep/index.py

@ -194,6 +194,6 @@ class Index:
def entries_to_str(self):
"""Return the LaTeX code corresponding to the index."""
string = ""
for letter in sorted(self.data.keys()):
for letter in sorted(self.data):
string += self.idxblock_to_str(letter, self.data[letter]) + EOL
return string

1
patacrep/latex/lexer.py

@ -147,4 +147,3 @@ class SongLexer(SimpleLexer):
if token.lexer.open_braces == 0:
token.type = 'SONG_RTITLE'
return token

1
patacrep/songs/latex/__init__.py

@ -57,4 +57,3 @@ SONG_RENDERERS = {
'sg': Latex2LatexSong,
},
}

1
test/__init__.py

@ -31,4 +31,3 @@ def suite():
if __name__ == "__main__":
unittest.TextTestRunner().run(suite())

2
test/test_song/nolyrics.csg

@ -7,7 +7,7 @@ A chorus [A]with lyrics
[A B#]
[A] [B]
[A] [B&]
[C]

2
test/test_song/nolyrics.csg.source

@ -3,7 +3,7 @@ A chorus [A]with lyrics
[A B#]
[A] [B]
[A] [B&]
[C]
A chorus [C]with lyrics

2
test/test_song/nolyrics.tsg

@ -21,7 +21,7 @@
\ifchorded
\begin{verse*}
\musicnote {\nolyrics \[A] \[B]}
\musicnote {\nolyrics \[A] \[B{\flt}]}
\musicnote {\nolyrics \[C]}
\end{verse*}
\fi

Loading…
Cancel
Save