3

I'm trying to place the opus to the left of a Staff (which is normally the place of the instrument name), like this:

enter image description here

Is there a proper way to place opus in replacement of instrumentName? Something like what we do in \paper{ scoreTitleMarkup = \markup ... }.

The only way I know for now is to set a FAKE instrument name, which seems to be a bad way of layout hacking:

\version "2.24.3"

melody = \relative c'{  c4 d e f   }

\score {
  \new Staff \with{
    instrumentName = "No.1" % IT SHOULD BE OPUS INSTEAD!
  }
  \melody
}

\score {
  \new Staff \with{
    instrumentName = "No.2" % IT SHOULD BE OPUS INSTEAD!
  }
  \melody
}

I tried with the \context setting but it didn't work:

\version "2.24.3"

\layout {
  \context {
    \Staff \with{
      instrumentName = \markup \fromproperty #'header:opus
      % NOT WORKING!
    }
  }
}

melody = \relative c'{  c4 d e f   }

\score {
  \header {
    opus = "No.xxx"
  }
  \new Staff {
    \melody
  }
}
3
  • 1
    I've always used the first code block when I wanted the opus number in the instrument name. Even if you could get the second code block working, how would you stop the printing of the opus in its regular place?
    – ksnortum
    Commented May 20 at 20:37
  • The second block was mimicking \paper like this: \paper { scoreTitleMarkup = \markup { \right-column { \fill-line{ \fromproperty #'header:title } \line{ \fromproperty #'header:composer } \line{ \fromproperty #'header:poet } \line{ \fromproperty #'header:arranger } } } In this way I can relocate Poet to the right column. I tried to do the same for Opus, but it didn't work obviously.
    – Transmixer
    Commented Jun 7 at 0:46
  • But how are you keeping the actual header values from printing?
    – ksnortum
    Commented Jun 7 at 12:39

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.