Browse Source

fix out-of-tree lilypond inclusion

remotes/origin/HEAD
Romain Goffe 12 years ago
parent
commit
4547d6e8f2
  1. 11
      songbook.py
  2. 2
      templates/ancient.tmpl
  3. 2
      templates/minimal.tmpl
  4. 2
      tex/crepbook.cls

11
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()

2
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}

2
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}

2
tex/crepbook.cls

@ -310,7 +310,7 @@
\newcommand{\lilypond}[1]{%
\iflilypond%
\IfFileExists{./lilypond/#1.pdf}{\includegraphics{./lilypond/#1}}{}%
\includegraphics{#1}%
\fi%
}

Loading…
Cancel
Save