I guess that you don't want any new type of contexts, you just want
to redefine the existing ChordNames context type. Then, simply do
\layout {
\context
{
\ChordNames
\override BarLine #'bar-size = #4
voltaOnThisStaff = ##t
\consists Bar_engraver
\consists "Volta_engraver"
\consists "Percent_repeat_engraver"
}
}
\chordmode{ \repeat volta 2 {
\partial 8 s8 | f2:maj f:7 \repeat "percent" 2 {bes1:7}
c:maj c:maj c:maj c:maj c:maj c:maj c:maj
} \alternative {
es e }
}
If you want to pursue your idea to define a new context type and
include it in the context hierarchy, then you would need to do
something like the following. Note that you also have to explicitly
instantiate that context in the score:
\layout {
\context
{
\ChordNames
\name MyChordNames
\override BarLine #'bar-size = #4
voltaOnThisStaff = ##t
\consists Bar_engraver
\consists "Volta_engraver"
\consists "Percent_repeat_engraver"
\alias ChordNames
}
\context
{
\Score
\accepts "MyChordNames"
}
}
\score{
\new MyChordNames \chordmode{ \repeat volta 2 {
\partial 8 s8 | f2:maj f:7 \repeat "percent" 2 {bes1:7}
c:maj c:maj c:maj c:maj c:maj c:maj c:maj
} \alternative {
es e }
}
}
One of the best ways to learn these things is actually to look at the
definitions of the default context types, see the file ly/engraver-init.ly.
/Mats
joeyc (sent by Nabble.com) wrote:
Version 2.6.3
I tried section 9.1.5, and I have tried about 30 variations of
something similar to what they have in that section with no luck...
Here is one unsuccessful try... it must be that I am really missing
some main concept of Lilypond?
\layout {
\context
{
\name MyChordNames
\override BarLine #'bar-size = #4
voltaOnThisStaff = ##t
\consists Bar_engraver
\consists "Volta_engraver"
\consists "Percent_repeat_engraver"
\alias ChordNames
}
\context
{
\Staff
\accepts "MyChordNames"
}
}
\chordmode{ \repeat volta 2 {
\partial 8 s8 | f2:maj f:7 \repeat "percent" 2 {bes1:7}
c:maj c:maj c:maj c:maj c:maj c:maj c:maj
} \alternative {
es e }
}
------------------------------------------------------------------------
Sent from the Gnu - Lilypond - User
<http://www.nabble.com/Trying-to-do-a-template-t615301.html#a1669198>
forum at Nabble.com.
------------------------------------------------------------------------
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user
--
=============================================
Mats Bengtsson
Signal Processing
Signals, Sensors and Systems
Royal Institute of Technology
SE-100 44 STOCKHOLM
Sweden
Phone: (+46) 8 790 8463
Fax: (+46) 8 790 7260
Email: [EMAIL PROTECTED]
WWW: http://www.s3.kth.se/~mabe
=============================================
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user