diff --git a/songbook.py b/songbook.py index dfd5d39e..0171e33a 100755 --- a/songbook.py +++ b/songbook.py @@ -156,11 +156,14 @@ def makeTexFile(sb, library, output): content = [ line for line in f if not commentPattern.match(line) ] for index, line in enumerate(content): - if re.compile("getcachedirectory").search(line): - line = line.replace("\\getcachedirectory", cachePath + "/") + if re.compile("getCacheDirectory").search(line): + line = line.replace("\\getCacheDirectory", cachePath + "/") content[index] = line - if re.compile("getlibraryimgdirectory").search(line): - line = line.replace("\\getlibraryimgdirectory", library + "img/") + if re.compile("getLibraryImgDirectory").search(line): + line = line.replace("\\getLibraryImgDirectory", library + "img/") + content[index] = line + if re.compile("getLibraryLilypondDirectory").search(line): + line = line.replace("\\getLibraryLilypondDirectory", library + "lilypond/") content[index] = line f.close() diff --git a/templates/ancient.tmpl b/templates/ancient.tmpl index e75bfc64..12742bfc 100644 --- a/templates/ancient.tmpl +++ b/templates/ancient.tmpl @@ -68,7 +68,7 @@ \newindex{titleidx}{\getname_title} \newauthorindex{authidx}{\getname_auth} -\graphicspath{ {img/}, {\getlibraryimgdirectory}, {\getcachedirectory} } +\graphicspath{ {img/}, {\getLibraryImgDirectory}, {\getLibraryLilypondDirectory}, {\getCacheDirectory} } \definecolor{SongNumberBgColor}{HTML}{\getsongnumberbgcolor} \definecolor{NoteBgColor}{HTML}{\getnotebgcolor} diff --git a/templates/minimal.tmpl b/templates/minimal.tmpl index 25679856..3ac88293 100644 --- a/templates/minimal.tmpl +++ b/templates/minimal.tmpl @@ -41,7 +41,7 @@ \usepackage[italian,portuguese,spanish,english,french]{babel} \lang{\getlang} -\graphicspath{ {img/}, {\getlibraryimgdirectory}, {\getcachedirectory} } +\graphicspath{ {img/}, {\getLibraryImgDirectory}, {\getLibraryLilypondDirectory}, {\getCacheDirectory} } \nosongnumbers \pagestyle{empty} diff --git a/tex/crepbook.cls b/tex/crepbook.cls index d69df6c5..b61d24ac 100644 --- a/tex/crepbook.cls +++ b/tex/crepbook.cls @@ -310,7 +310,7 @@ \newcommand{\lilypond}[1]{% \iflilypond% - \IfFileExists{./lilypond/#1.pdf}{\includegraphics{./lilypond/#1}}{}% + \includegraphics{#1}% \fi% }