diff --git a/patacrep/content/sorted.py b/patacrep/content/sorted.py index 9f9fded9..c14cc732 100755 --- a/patacrep/content/sorted.py +++ b/patacrep/content/sorted.py @@ -4,7 +4,6 @@ This plugin provides keyword 'sorted', used to include a sorted list of songs to a songbook. """ -import locale import logging import unidecode @@ -23,9 +22,9 @@ def normalize_string(string): Normalized means: - no surrounding spaces; - lower case; - - passed through locale.strxfrm(). + - passed through unidecode.unidecode(). """ - return locale.strxfrm(unidecode.unidecode(string.lower().strip())) + return unidecode.unidecode(string.lower().strip()) def normalize_field(field): """Return a normalized field, it being a string or a list of strings.""" diff --git a/patacrep/content/tex.py b/patacrep/content/tex.py index f32880cf..2f20f70b 100755 --- a/patacrep/content/tex.py +++ b/patacrep/content/tex.py @@ -16,10 +16,10 @@ class LaTeX(ContentItem): self.filename = filename def render(self, context): - return r'\input{{{}}}'.format(files.relpath( + return r'\input{{{}}}'.format(files.path2posix(files.relpath( self.filename, os.path.dirname(context['filename']), - )) + ))) #pylint: disable=unused-argument def parse(keyword, argument, contentlist, config): diff --git a/test/test_songbook/content.tex.control b/test/test_songbook/content.tex.control index 9dfa5b64..02606184 100644 --- a/test/test_songbook/content.tex.control +++ b/test/test_songbook/content.tex.control @@ -91,11 +91,6 @@ guitar, \section{Test of section} \begin{songs}{titleidx,authidx} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% songs/./song.tsg - -\import{@TEST_FOLDER@/content_datadir/songs/}{song.tsg} - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% songs/./song.csg @@ -115,6 +110,11 @@ guitar, \endsong +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% songs/./song.tsg + +\import{@TEST_FOLDER@/content_datadir/songs/}{song.tsg} + \end{songs} \songsection{Test of song section}