From dc70ad09f7b243c324e8389483f482d031f27730 Mon Sep 17 00:00:00 2001 From: Romain Goffe Date: Tue, 29 Jan 2013 22:47:24 +0100 Subject: [PATCH] override the lilypond macro in templates This is needed since we must check if the pdf file has been produced within the library directory for the makefile to run the lilypond command --- templates/ancient.tmpl | 6 ++++++ templates/minimal.tmpl | 6 ++++++ templates/patacrep.tmpl | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/templates/ancient.tmpl b/templates/ancient.tmpl index 12742bfc..bc5ea22b 100644 --- a/templates/ancient.tmpl +++ b/templates/ancient.tmpl @@ -70,6 +70,12 @@ \graphicspath{ {img/}, {\getLibraryImgDirectory}, {\getLibraryLilypondDirectory}, {\getCacheDirectory} } +\renewcommand{\lilypond}[1]{% + \iflilypond% + \IfFileExists{\getLibraryLilypondDirectory/#1.pdf}{\includegraphics{#1}}{}% + \fi% +} + \definecolor{SongNumberBgColor}{HTML}{\getsongnumberbgcolor} \definecolor{NoteBgColor}{HTML}{\getnotebgcolor} \definecolor{IndexBgColor}{HTML}{\getindexbgcolor} diff --git a/templates/minimal.tmpl b/templates/minimal.tmpl index 3ac88293..3bdcd58a 100644 --- a/templates/minimal.tmpl +++ b/templates/minimal.tmpl @@ -43,6 +43,12 @@ \lang{\getlang} \graphicspath{ {img/}, {\getLibraryImgDirectory}, {\getLibraryLilypondDirectory}, {\getCacheDirectory} } +\renewcommand{\lilypond}[1]{% + \iflilypond% + \IfFileExists{\getLibraryLilypondDirectory/#1.pdf}{\includegraphics{#1}}{}% + \fi% +} + \nosongnumbers \pagestyle{empty} diff --git a/templates/patacrep.tmpl b/templates/patacrep.tmpl index 8a820ff9..6aace041 100644 --- a/templates/patacrep.tmpl +++ b/templates/patacrep.tmpl @@ -70,6 +70,12 @@ \graphicspath{ {img/}, {\getLibraryImgDirectory}, {\getLibraryLilypondDirectory}, {\getCacheDirectory} } +\renewcommand{\lilypond}[1]{% + \iflilypond% + \IfFileExists{\getLibraryLilypondDirectory/#1.pdf}{\includegraphics{#1}}{}% + \fi% +} + \definecolor{SongNumberBgColor}{HTML}{\getsongnumberbgcolor} \definecolor{NoteBgColor}{HTML}{\getnotebgcolor} \definecolor{IndexBgColor}{HTML}{\getindexbgcolor}