On Mon, 2015-11-16 at 09:24 +0100, David Kastrup wrote:

> Graham King <graham.k...@tremagi.org.uk> writes:
> 
> > This took a little while to nail down, but it seems that ScholarLy's
> > annotation engine fails silently when \RemoveEmptyStaffContext is
> > active.  Almost-minimal example attached.
> 
> >   \layout {
> > %{ %Toggle this block comment to reveal problem:
> >     \context {
> >       \RemoveEmptyStaffContext
> >     }
> > %}     
> 
> What is that supposed to be?  I am not even sure what this does.  Maybe
> we should check that case and flag an error: there is no context
> specified to which this is supposed to apply.  You probably want
> something like a
> 
> \Staff
> 
> before the \RemoveEmptyStaffContext.
> 

thanks David, you've solved my problem (and probably saved Urs some work
too).  Somehow I had missed that there is a new, better, way to remove
empty staves.  With the new syntax the problem with ScholarLy goes away.
Thanks also to  Trevor Ba?a for his blog post at
http://lilypondbitsandpieces.blogspot.co.uk/2011/08/lilypond-remove-empty-staves.html
 .

Fixed example attached.

-- Graham
\version "2.19.21"

\include "openlilylib"
\useLibrary ScholarLY
\useModule scholarly.annotate

#(display "Scholarly loaded\n")

\setOption scholarly.annotate.export-targets #'("plaintext" "latex")

\score {
  \context ChoirStaff <<
    \context Staff = staffI <<
      \set Staff.instrumentName = "S"
      \set Staff.shortInstrumentName = "S"
      \relative c'' {
        \time 2/4
        g4 g g g g
        \musicalIssue \with {
          message = "last note, A. bar 3"
          context = "Some staff"
        }
        NoteHead
        g
        \break
        R2*3
        \break
        g4 g g g g g
      }
    >>
    \context Staff = staffII <<
      \set Staff.instrumentName = "A"
      \set Staff.shortInstrumentName = "A"
      \relative c'' {
        \time 2/4
        \repeat unfold 18 c4
      }
    >>
  >>

  \layout {
    \context {
      \Staff \RemoveEmptyStaves
    }
  }
}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to