\markup \score with independent \paper settings

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

\markup \score with independent \paper settings

Urs Liska-3

Is it possible to initialize a score created through \markup \score with a fresh set of (or specific) \paper settings that are independent from the surrounding document?

I'm using \markup \score to center some music in a measure. However, when I have a paper setting that justifies the last system the new score also has the full line-width. See the following example where the "red" score is "properly" centered over the middle measure, but of course ridiculously wide.

Any suggestion?
Thanks
Urs

\version "2.19.82"

\paper {
  ragged-right = ##f
  system-count = 1
}

{
  c'1
  \override TextScript.self-alignment-X = #CENTER
  c'1 ^\markup \score {
    \new Staff {
      c''1
    }
    \layout {
      \context {
        \Voice
         \override NoteHead.color = #red
      }
    }
  }
  c'1
}

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: \markup \score with independent \paper settings

Michael Käppler-2
Hi Urs,
like this?
I think it does what is specified; it aligns the center of the markup-score to the note you attached it to.
I'm not sure, however, if this is what you want to achieve.

\version "2.19.80"

\paper {
  ragged-right = ##f
  system-count = 1
}

{
  c'1
  \override TextScript.self-alignment-X = #CENTER
  c'1 ^\markup \score {
    \new Staff {
      c''1
    }
    \layout {
      indent = #0
      ragged-right = ##t
      \context {
        \Voice
         \override NoteHead.color = #red
      }
    }
  }
  c'1
}



Am 21.02.2019 um 19:07 schrieb Urs Liska:

Is it possible to initialize a score created through \markup \score with a fresh set of (or specific) \paper settings that are independent from the surrounding document?

I'm using \markup \score to center some music in a measure. However, when I have a paper setting that justifies the last system the new score also has the full line-width. See the following example where the "red" score is "properly" centered over the middle measure, but of course ridiculously wide.

Any suggestion?
Thanks
Urs

\version "2.19.82"

\paper {
  ragged-right = ##f
  system-count = 1
}

{
  c'1
  \override TextScript.self-alignment-X = #CENTER
  c'1 ^\markup \score {
    \new Staff {
      c''1
    }
    \layout {
      \context {
        \Voice
         \override NoteHead.color = #red
      }
    }
  }
  c'1
}

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: \markup \score with independent \paper settings

Urs Liska-3

Hi Michael,

Am 21.02.19 um 19:32 schrieb Michael Käppler:
Hi Urs,
like this?
I think it does what is specified; it aligns the center of the markup-score to the note you attached it to.
I'm not sure, however, if this is what you want to achieve.

...


Thanks, this does exactly what I need!

I had no clue I can simply throw paper variables in a layout block too ...

Best
Urs





Am 21.02.2019 um 19:07 schrieb Urs Liska:

Is it possible to initialize a score created through \markup \score with a fresh set of (or specific) \paper settings that are independent from the surrounding document?

I'm using \markup \score to center some music in a measure. However, when I have a paper setting that justifies the last system the new score also has the full line-width. See the following example where the "red" score is "properly" centered over the middle measure, but of course ridiculously wide.

Any suggestion?
Thanks
Urs

\version "2.19.82"

\paper {
  ragged-right = ##f
  system-count = 1
}

{
  c'1
  \override TextScript.self-alignment-X = #CENTER
  c'1 ^\markup \score {
    \new Staff {
      c''1
    }
    \layout {
      \context {
        \Voice
         \override NoteHead.color = #red
      }
    }
  }
  c'1
}

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: \markup \score with independent \paper settings

Lukas-Fabian Moser

I had no clue I can simply throw paper variables in a layout block too ...

You can't in general. http://lilypond.org/doc/v2.19/Documentation/notation/the-layout-block.html says:

The \paper variables that can appear in a \layout block, with default values taken from the \paper block are:

This kind of makes sense, considering that

i) system-count, indent, line-width etc. can obviously differ from \score to \score,

ii) every \score can have its own \layout,

whereas

iii) things like margins, footers etc. (and also ragged-bottom) are, so to speak, properties of the "paper", not of single scores.

But this logic it's a bit inconvenient that fonts definitions, staff size etc. are in the \paper block, because they might reasonably be changed on a per-score basis. (There is layout-set-staff-size, but it has some well-known bugs.)

What causes me trouble me most often is the fact that system-system-spacing seems to work only at \paper level. Why isn't this a \layout property?

Lukas


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user