%% Generated by lilypond-book
%% Options: [exampleindent=10.16\mm,indent=0\mm,line-width=160\mm]
\include "lilypond-book-preamble.ly"


% ****************************************************************
% Start cut-&-pastable-section
% ****************************************************************



\paper {
  indent = 0\mm
  line-width = 160\mm
  % offset the left padding, also add 1mm as lilypond creates cropped
  % images with a little space on the right
  line-width = #(- line-width (* mm  3.000000) (* mm 1))
}

\layout {
  
}





% ****************************************************************
% ly snippet:
% ****************************************************************
\sourcefilename "snippets/using-marklines-in-a-frenched-score.ly"
\sourcefileline 0
%% DO NOT EDIT this file manually; it is automatically
%% generated from Documentation/snippets/new
%% Make any changes in Documentation/snippets/new/
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
%% Note: this file works from version 2.19.48
\version "2.19.48"
\header {
%% Translation of GIT committish: f11513f36c131dab18338d6a3a729e24a927150d
  texidocja = "
空の譜が省略された楽譜 (Frenched score) で
@code{MarkLine} コンテキスト
(@uref{http://lsr.di.unimi.it/LSR/Item?id=1010, LSR1010})
を使用すると、2 つの @code{MarkLine} に挟まれた全ての譜が省略された場合に@c
問題が生じます。@c
@code{StaffGroup} 内で @code{Keep_alive_together_engraver} を使用し、@c
グループ内の譜のどれかが残っている場合にのみ @code{MarkLine} を@c
残しておくようにします。
"
  doctitleja = "空の譜が省略された楽譜で MarkLine を使用する"

%% Translation of GIT committish: 5a886a7c8348e53e52ce65f4d8e9e197db3d5103
  texidocfr = "
Le recours à des contextes @code{MarkLine} (tel qu'indiqué dans le
@uref{http://lsr.di.unimi.it/LSR/Item?id=1010, LSR1010}) dans une
partition « à la française » peut s'avérer problématique lorsque toutes
les portées entre deux contextes @code{Markline} sont absentes d'un
système. La présence du @code{Keep_alive_together_engraver} au sein de
chacun des @code{StaffGroup} permet de maintenir actif le
@code{MarkLine} uniquement lorsque les autres portées du regroupement
sont elles-mêmes actives.

"
  doctitlefr = "Utilisation de lignes de repères dans une partition « à la française »"

  lsrtags = "contexts-and-engravers, staff-notation"
  texidoc = "
Using @code{MarkLine} contexts (such as in
@uref{http://lsr.di.unimi.it/LSR/Item?id=1010, LSR1010}) in a
Frenched score can be problematic if all the staves between two
@code{MarkLine}s are removed in one system. The
@code{Keep_alive_together_engraver} can be used within each
@code{StaffGroup} to keep the @code{MarkLine} alive only as long
as the other staves in the group stay alive.
"
  doctitle = "Using marklines in a Frenched score"
} % begin verbatim

bars = {
  \tempo "Allegro" 4=120
  s1*2
  \repeat unfold 5 { \mark \default s1*2 }
  \bar "||"
  \tempo "Adagio" 4=40
  s1*2
  \repeat unfold 8 { \mark \default s1*2 }
  \bar "|."
}
winds = \repeat unfold 120 { c''4 }
trumpet = { \repeat unfold 8 g'2 R1*16 \repeat unfold 4 g'2 R1*8 }
trombone = { \repeat unfold 4 c'1 R1*8 d'1 R1*17 }
strings = \repeat unfold 240 { c''8 }

#(set-global-staff-size 16)
\paper {
  systems-per-page = 5
  ragged-last-bottom = ##f
}

\layout {
  indent = 15\mm
  short-indent = 5\mm
  \context {
    \name MarkLine
    \type Engraver_group
    \consists Output_property_engraver
    \consists Axis_group_engraver
    \consists Mark_engraver
    \consists Metronome_mark_engraver
    \override VerticalAxisGroup.remove-empty = ##t
    \override VerticalAxisGroup.remove-layer = #'any
    \override VerticalAxisGroup.staff-affinity = #DOWN
    \override VerticalAxisGroup.nonstaff-relatedstaff-spacing.basic-distance = 1
    keepAliveInterfaces = #'()
  }
  \context {
    \Staff
    \override VerticalAxisGroup.remove-empty = ##t
    \override VerticalAxisGroup.remove-layer = ##f
  }
  \context {
    \StaffGroup
    \accepts MarkLine
    \consists Keep_alive_together_engraver
  }
  \context {
    \Score
    \remove Mark_engraver
    \remove Metronome_mark_engraver
  }
}

\score {
  <<
    \new StaffGroup = "winds" \with {
      instrumentName = "Winds"
      shortInstrumentName = "Winds"
    } <<
      \new MarkLine \bars
      \new Staff \winds
    >>
    \new StaffGroup = "brass" <<
      \new MarkLine \bars
      \new Staff = "trumpet" \with {
        instrumentName = "Trumpet"
        shortInstrumentName = "Tpt"
      } \trumpet
      \new Staff = "trombone" \with {
        instrumentName = "Trombone"
        shortInstrumentName = "Tbn"
      } \trombone
    >>
    \new StaffGroup = "strings" \with {
      instrumentName = "Strings"
      shortInstrumentName = "Strings"
    } <<
      \new MarkLine \bars
      \new Staff = "strings" { \strings }
    >>
  >>
}



% ****************************************************************
% end ly snippet
% ****************************************************************
