Browse Source

support the songs library's image path for pictures

remotes/origin/HEAD
Romain Goffe 12 years ago
parent
commit
2a80f222cd
  1. 5
      songbook.py
  2. 2
      templates/ancient.tmpl
  3. 2
      templates/minimal.tmpl
  4. 2
      templates/patacrep.tmpl

5
songbook.py

@ -159,6 +159,9 @@ def makeTexFile(sb, library, output):
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/")
content[index] = line
f.close()
out.write(''.join(content))
@ -198,7 +201,7 @@ def makeDepend(sb, library, output):
# write .d file
out = open(output, 'w')
out.write('{0} {1} : {2}\n'.format(output, name+".tex", ' '.join(deps)))
out.write('{0} : {1}\n'.format(name+".pdf", ' '.join(map(lambda x: x+".sbx",idx)+map(lambda x: "lilypond/"+x+".pdf", lilypond))))
out.write('{0} : {1}\n'.format(name+".pdf", ' '.join(map(lambda x: x+".sbx",idx)+map(lambda x: library+"lilypond/"+x+".pdf", lilypond))))
out.write('\t$(LATEX) {0}\n'.format(name+".tex"))
out.write('{0} : {1}\n'.format(' '.join(map(lambda x: x+".sxd",idx)), name+".aux"))
out.close()

2
templates/ancient.tmpl

@ -68,7 +68,7 @@
\newindex{titleidx}{\getname_title}
\newauthorindex{authidx}{\getname_auth}
\graphicspath{ {img/}, {\getcachedirectory} }
\graphicspath{ {img/}, {\getlibraryimgdirectory}, {\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/}, {\getcachedirectory} }
\graphicspath{ {img/}, {\getlibraryimgdirectory}, {\getcachedirectory} }
\nosongnumbers
\pagestyle{empty}

2
templates/patacrep.tmpl

@ -68,7 +68,7 @@
\newindex{titleidx}{\getname_title}
\newauthorindex{authidx}{\getname_auth}
\graphicspath{ {img/}, {\getcachedirectory} }
\graphicspath{ {img/}, {\getlibraryimgdirectory}, {\getcachedirectory} }
\definecolor{SongNumberBgColor}{HTML}{\getsongnumberbgcolor}
\definecolor{NoteBgColor}{HTML}{\getnotebgcolor}

Loading…
Cancel
Save