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: Urs Liska
Subject: Re: Defining a variable for path names
Date: Tue, 18 Nov 2014 10:44:18 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

Hi Ingbol (?),

Am 18.11.2014 06:34, schrieb ingbolbograr:
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) 

Do *not* store such a configuration inside the LilyPond installation because it would be trashed when you uninstall or update LilyPond.
Use a location in your documents folder instead.

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?

It's actually quite easy.

Write
\include "C:/songs/lilypond_header_file_1.ly"
%\include "C:/music/lilypond_header_file_2.ly"
in a file "lilypond_header.ily"
and save that in a central place where you want to maintain this choice (e.g. the toplevel directory where you store all your LilyPond projects).

In any actual music file simply write

\include "C:/path/to/lilypond_header.ily"

This way all your scores refer to that central configuration file, and you can edit this file to make all scores use one or the other header file.

HTH
Urs

Thanks.



--
View this message in context: http://lilypond.1069038.n5.nabble.com/Defining-a-variable-for-path-names-tp168784.html
Sent from the User mailing list archive at Nabble.com.

_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user


reply via email to

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