the Notation Reference for help. A search for @qq{merge} in the
Notation Reference index quickly leads us to the commands for merging
differently headed and differently dotted notes in
-@ruser{Collision resolution}. In our example we need to merge both
+@ruser{Collision resolution}. In our example we need to merge both
types of note for the duration of the polyphonic section in bar 3,
so using the information we find in the Notation Reference we add
margins.
To be effective under all circumstances these checks must be enabled
-by placing the overrides in a Score @code{\with} block, rather than
-in-line in music, as follows:
+by placing the overrides using @code{\context} within a @code{\layout}
+block, rather than in-line in music, as follows:
@example
-\new Score \with @{
- % Makes sure text scripts and lyrics are within the paper margins
- \override PaperColumn #'keep-inside-line = ##t
- \override NonMusicalPaperColumn #'keep-inside-line = ##t
-@} @{
- ..
+\score @{
+ @{ @dots{}notes@dots{} @}
+ \layout @{
+ \context @{
+ \Score
+ % Makes sure text scripts and lyrics are within the paper margins
+ \override PaperColumn #'keep-inside-line = ##t
+ \override NonMusicalPaperColumn #'keep-inside-line = ##t
+ @}
+ @}
@}
@end example
A Score context is instantiated implicitly when a
@code{\score @{@dots{}@}} or @code{\layout @{@dots{}@}} block is
-processed, or explicitly when a @code{\new Score} command is
-executed.
+processed.
@node Top-level contexts - staff containers
@unnumberedsubsubsec Top-level contexts - staff containers
@node Creating contexts
@subsection Creating contexts
-@c TODO \new Score and \score
@c TODO more complete descriptions rather than learning style
For scores with only one voice and one staff, contexts are
@end example
MIDI output is created only when a @code{\midi} block is included
-within a score block defined with a @code{\score} command. If it
-is placed within an explicitly instantiated score context (i.e.
-within a @code{\new Score} block) the file will fail. To solve
-this, enclose the @code{\new Score} and the @code{\midi} commands
-in a @code{\score} block.
+within a score block defined with a @code{\score} command.
@example
\score @{
- \new Score @{ @dots{}notes@dots{} @}
+ @{ @dots{}notes@dots{} @}
\midi @{ @}
@}
@end example