[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
\bookpart variables (feature request)
From: |
Dan Eble |
Subject: |
\bookpart variables (feature request) |
Date: |
Mon, 8 Jan 2018 20:50:23 -0500 |
%% This file is processed without error.
%% Please see my feature request below.
\version "2.19.80"
INSTRUMENT = "Drum Sander"
\bookpart {
%% Instead of defining INSTRUMENT above, I would like to define it
%% here, which is not currently allowed, ...
%{
INSTRUMENT = "Drum Sander"
%}
\header { instrument = \INSTRUMENT }
\score { c' }
}
\bookpart {
%% ... and have LilyPond error on this next line because INSTRUMENT
%% is not defined in this scope.
\header { instrument = \INSTRUMENT }
\score { e' }
}
%% This is my intended use. I understand I can define variables at
%% the top level, but I'm concerned about having to take care that
%% none will carry over into the next bookpart.
%{
\bookpart {
%% ... set several variables ...
%% \include "part-template.ly"
}
\bookpart {
%% ... set several variables ...
%% \include "part-template.ly"
}
%% etc.
%}
%% This is my current work-around: define variables in the bookpart
%% header and read them in a roundabout way in the template. I'll
%% spare you the details.
%{
\bookpart {
\header {
%% ... set several variables ...
}
\include "part-template.ly"
}
%}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- \bookpart variables (feature request),
Dan Eble <=