jperon / lyluatex

Alternative à lilypond-book pour lualatex
MIT License
58 stars 11 forks source link

lyluatex squeezes staves too aggressively #263

Closed lemzwerg closed 5 years ago

lemzwerg commented 5 years ago

[lyluatex 1bb88622c451ad663be8fbed50114dba6c9f543f] [lilypond 49f41bf1c64ae1e2490571e73a85cbc4b2a9fb27]

This example

\documentclass{article}

\usepackage[language=deutsch,
            staffsize=16,
            line-width=0.8\linewidth,
            fragment=false,
           ]{lyluatex}

\begin{document}

\begin{lilypond}
  \new PianoStaff <<
    \new Staff = "rechts" \relative c' {
      \clef "treble"
      \key g \minor
      \override Score.MetronomeMark.font-size = #2

      \tempo "1. Allegro"
      << { \oneVoice <b d b'>2^( <c fis>4 <d g> } \\
         { s1 } >> |
      << { f!8.[ es16] d4) } \\
         { c4 <a c> } >> r2 |
    }

    \new Dynamics {
      s1\p |
    }

    \new Staff = "links" \relative c' {
      \clef "bass"
      \key g \minor

      <g, d'>2_( <a d>4 <b d> |
      <c g'>4 <fis, d'>) r2 |
    }
  >>
\end{lilypond}

\end{document}

processed with lyluatex

lilypond-lyluatex

and with plain LilyPond

lilypond-direct

shows that the former squeezes the systems too aggressively. I suggest to add at least some vertical padding between staves of a system.

uliska commented 5 years ago

For things like these it's good to use the debug option to see the generated LilyPond code.

I can confirm the behaviour, but I think this should be refered to bug-lilypond instead because I can't see anything wrong in what lyluatex does.

This is the generated .ly file stripped off of anything that doesn't contribute to the issue:

\version "2.19.82"

#(set-global-staff-size 16)

\paper{
  indent = 0\pt
}

\new PianoStaff <<
  \new Staff = "rechts" \relative c' {
    \clef "treble"
    \key g \minor
    \override Score.MetronomeMark.font-size = #2

    \tempo "1. Allegro"
    << { \oneVoice <b d b'>2^( <c fis>4 <d g> } \\
       { s1 } >> |
    << { f!8.[ es16] d4) } \\
       { c4 <a c> } >> r2 |
  }

  \new Dynamics {
    s1\p |
  }

  \new Staff = "links" \relative c' {
    \clef "bass"
    \key g \minor

    <g, d'>2_( <a d>4 <b d> |
    <c g'>4 <fis, d'>) r2 |
  }
>>

Compiled with LilyPond this shows the "condensed" spacing. But if you comment out one out of the set-gobal-staff-size or the indent everything looks fine. If I'm not mistaken this only appears for staffsizes below 19. So it seems this issue is an "engraving decision" by LilyPond depending on staff-size and indent (which I think shouldn't happen).

I suggest you investigate some more if that also depends on the actual example or if this is something specific and then ask on bug-lilypond.

Feel free to re-open if you disagree with anything or if further research turns up new evidence.

lemzwerg commented 5 years ago

Thanks for the check. Reported to lilypond as

https://sourceforge.net/p/testlilyissues/issues/5540/