lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Defining a variable for path names


From: Brian Barker
Subject: Re: Defining a variable for path names
Date: Tue, 18 Nov 2014 09:39:10 +0000

At 22:34 17/11/2014 -0700, Ingbol Bograr wrote:
I have two different versions of each of my lilypond files, each with a different header. At the top of each file, I have this:

\include "C:/songs/lilypond_header_file_1.ly"
%\include "C:/music/lilypond_header_file_2.ly"

I'd like to be able to use a global variable that is set in only one place (maybe somewhere in C:\Program Files (x86)\LilyPond\usr\share\lilypond\current\ly) to determine which header file to use. That way, at the top of each file I could write something like
\include "$header_file"
and I would know that whenever I compile a given file, it would use the header file that I specified.

How do I do this?

One simple workaround would be to maintain three files and to copy the relevant actual file - file_1 or file_2 - to another file called header_file. You could create a script or scripts to do this and possibly associate them with icons, which would make performing the chosen copy action either a simple command or the clicking of the appropriate icon. Lilypond would always use header_file, but its contents would depend on which of file_1 or file_2 was most recently copied to it.

I trust this helps.

Brian Barker




reply via email to

[Prev in Thread] Current Thread [Next in Thread]