On Thu, Aug 27, 2026 at 2:13 PM Stu McKenzie <[email protected]>
wrote:
>
> Tina Petzel replied to my post yesterday.
> The reply solution works perfectly thanks to Tina.
> I would like to include the scheme definition in Tina's code that defines
> the override definition.
> I've tried multiple times to do this without success.
> Could someone with better knowledge of LilyPond detail how to include the
> scheme code in an external include file (e.g. an '.ily' file)?
> An example of how to do this would be really useful, and I can include
> other definitions in that file too.
> Otherwise, could someone tell me where the documentation is on how to do
> that.
> The LilyPond version for the code was \version "2.26.0".
>
I didn't have any problems using an include like this:
%%%
\version "2.26.0"
musicOne = {
\include "barLineColorRed.ily"
R1
R1
% \section barline in red
\section
R1
R1
% fine barline in red
\fine
}
\score {
\musicOne
}
%%%
%%% barLineColorRed.ily %%%
\override Staff.BarLine.color =
#(lambda (grob)
(let ((glyph (ly:grob-property grob 'glyph)))
(cond ((member glyph '("||" "|.")) red)
(else #f))))
%%%
Tell us what you've tried and what happened.
--
Knute Snortum