From 1ba8aaabf3cb87fbb82c90631a420ea95adda7d9 Mon Sep 17 00:00:00 2001 From: Oliverpool Date: Tue, 19 Jul 2016 17:17:44 +0200 Subject: [PATCH 1/7] replace & by \flt in nolyrics --- patacrep/data/templates/songs/chordpro/latex/content_verse | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patacrep/data/templates/songs/chordpro/latex/content_verse b/patacrep/data/templates/songs/chordpro/latex/content_verse index 72859732..7c5f06ef 100644 --- a/patacrep/data/templates/songs/chordpro/latex/content_verse +++ b/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 From 53a840e068af173f574a06846ef376e140641bd9 Mon Sep 17 00:00:00 2001 From: Oliverpool Date: Tue, 19 Jul 2016 17:20:23 +0200 Subject: [PATCH 2/7] add test --- test/test_song/nolyrics.csg | 2 +- test/test_song/nolyrics.csg.source | 2 +- test/test_song/nolyrics.tsg | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test_song/nolyrics.csg b/test/test_song/nolyrics.csg index 2ad06b03..99fb2c88 100644 --- a/test/test_song/nolyrics.csg +++ b/test/test_song/nolyrics.csg @@ -7,7 +7,7 @@ A chorus [A]with lyrics [A B#] -[A] [B] +[A] [B&] [C] diff --git a/test/test_song/nolyrics.csg.source b/test/test_song/nolyrics.csg.source index 881c1ab9..511e9e9a 100644 --- a/test/test_song/nolyrics.csg.source +++ b/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 diff --git a/test/test_song/nolyrics.tsg b/test/test_song/nolyrics.tsg index 3ce5d6b3..c1ff624a 100644 --- a/test/test_song/nolyrics.tsg +++ b/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 From caa48cacd9ab22bdcaa1c5c636505bd15bf859a1 Mon Sep 17 00:00:00 2001 From: Oliverpool Date: Tue, 19 Jul 2016 17:23:02 +0200 Subject: [PATCH 3/7] fix appveyor --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index a403001d..3ecb61ab 100644 --- a/.appveyor.yml +++ b/.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" From ee3c4c1038ed67203ba9c26f591c764f1f550910 Mon Sep 17 00:00:00 2001 From: Oliverpool Date: Tue, 19 Jul 2016 17:35:29 +0200 Subject: [PATCH 4/7] sorted already retrieves the keys --- patacrep/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patacrep/index.py b/patacrep/index.py index 75d55107..212511c3 100644 --- a/patacrep/index.py +++ b/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 From 615b464aa1b3a94b7aa9fd0d1127dc3f4bd55012 Mon Sep 17 00:00:00 2001 From: Oliverpool Date: Tue, 19 Jul 2016 17:36:10 +0200 Subject: [PATCH 5/7] (pylint) trailing newlines --- patacrep/latex/lexer.py | 1 - patacrep/songs/latex/__init__.py | 1 - 2 files changed, 2 deletions(-) diff --git a/patacrep/latex/lexer.py b/patacrep/latex/lexer.py index 0b5c2ce7..0d7438e9 100644 --- a/patacrep/latex/lexer.py +++ b/patacrep/latex/lexer.py @@ -147,4 +147,3 @@ class SongLexer(SimpleLexer): if token.lexer.open_braces == 0: token.type = 'SONG_RTITLE' return token - diff --git a/patacrep/songs/latex/__init__.py b/patacrep/songs/latex/__init__.py index 1054f7da..27100eba 100644 --- a/patacrep/songs/latex/__init__.py +++ b/patacrep/songs/latex/__init__.py @@ -57,4 +57,3 @@ SONG_RENDERERS = { 'sg': Latex2LatexSong, }, } - From cde8161b26eab67b1eb8b82acbe08e784f44f5e4 Mon Sep 17 00:00:00 2001 From: Oliverpool Date: Tue, 19 Jul 2016 17:45:11 +0200 Subject: [PATCH 6/7] (pylint) trailing newlines --- test/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/test/__init__.py b/test/__init__.py index d77a9c27..e518e2dc 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -31,4 +31,3 @@ def suite(): if __name__ == "__main__": unittest.TextTestRunner().run(suite()) - From 0cf7ab9a9710faf7c8e1cc7258284ede9a3efbb7 Mon Sep 17 00:00:00 2001 From: Oliverpool Date: Tue, 19 Jul 2016 21:32:07 +0200 Subject: [PATCH 7/7] update news --- NEWS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS.md b/NEWS.md index 06eb7aab..1bb8b80a 100644 --- a/NEWS.md +++ b/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)