Very inconsistent vertical spacing from lilypond book and LaTeX

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

Very inconsistent vertical spacing from lilypond book and LaTeX

Robert Hickman
Hi,

I'm helping my partner create a book of interval exercises, and I'm
getting very inconsistent vertical spacing coming from lilypond-book,
here is an example:

https://files.robehickman.com/problem.pdf

Weird thing is that this is very inconsistent between pages, and I
have verified there is no excess space in the music images. LaTeX
seems to be stretching white space erratically.

Reply | Threaded
Open this post in threaded view
|

Re: Very inconsistent vertical spacing from lilypond book and LaTeX

Valentin Petzel
Most likely the scores are for some obscure reason cropped to different
heights. For a quick workaround, you can try putting the images in a parbox
with a specified height.

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Very inconsistent vertical spacing from lilypond book and LaTeX

David Wright
In reply to this post by Robert Hickman
On Thu 21 May 2020 at 18:40:53 (+0100), Robert Hickman wrote:

>
> I'm helping my partner create a book of interval exercises, and I'm
> getting very inconsistent vertical spacing coming from lilypond-book,
> here is an example:
>
> https://files.robehickman.com/problem.pdf
>
> Weird thing is that this is very inconsistent between pages, and I
> have verified there is no excess space in the music images. LaTeX
> seems to be stretching white space erratically.

No idea what's in your .tex file. Perhaps the larger spaces are where
LaTeX thinks a new paragraph starts. The mere presence or absence of
blank lines between the figures can affect/control that.

Cheers,
David.

Reply | Threaded
Open this post in threaded view
|

Re: Very inconsistent vertical spacing from lilypond book and LaTeX

Robert Hickman
Hi David,

The .tex file contains the following (a snippet of), The idea about it
being where a new paragraph or line starts seems to make sense as the
added space seems to be about 1em.

\vspace{-0em}\Ssubsection{Scale}\vspace{-0em}
{%
\parindent 0pt
\noindent
\ifx\preLilyPondExample \undefined
\else
  \expandafter\preLilyPondExample
\fi
\def\lilypondbook{}%
\input{ce/lily-6d98c8ee-systems.tex}
\ifx\postLilyPondExample \undefined
\else
  \expandafter\postLilyPondExample
\fi
}

\vspace{-0.8em}\Ssubsection{Thirds}\vspace{-0em}
{%
\parindent 0pt
\noindent
\ifx\preLilyPondExample \undefined
\else
  \expandafter\preLilyPondExample
\fi
\def\lilypondbook{}%
\input{ec/lily-01f558b3-systems.tex}
\ifx\postLilyPondExample \undefined
\else
  \expandafter\postLilyPondExample
\fi
}

\vspace{-0.8em}\Ssubsection{Fourths}\vspace{-0em}
{%
\parindent 0pt
\noindent
\ifx\preLilyPondExample \undefined
\else
  \expandafter\preLilyPondExample
\fi
\def\lilypondbook{}%
\input{75/lily-95458ceb-systems.tex}
\ifx\postLilyPondExample \undefined
\else
  \expandafter\postLilyPondExample
\fi
}

\vspace{-0.8em}\Ssubsection{Fifths}\vspace{-0em}
{%
\parindent 0pt
\noindent
\ifx\preLilyPondExample \undefined
\else
  \expandafter\preLilyPondExample
\fi
\def\lilypondbook{}%
\input{2f/lily-cee1d442-systems.tex}
\ifx\postLilyPondExample \undefined
\else
  \expandafter\postLilyPondExample
\fi
}

\vspace{-0.8em}\Ssubsection{Sixths}\vspace{-0em}
{%
\parindent 0pt
\noindent
\ifx\preLilyPondExample \undefined
\else
  \expandafter\preLilyPondExample
\fi
\def\lilypondbook{}%
\input{05/lily-bdd1bc6c-systems.tex}
\ifx\postLilyPondExample \undefined
\else
  \expandafter\postLilyPondExample
\fi
}

On Thu, 21 May 2020 at 19:56, David Wright <[hidden email]> wrote:

>
> On Thu 21 May 2020 at 18:40:53 (+0100), Robert Hickman wrote:
> >
> > I'm helping my partner create a book of interval exercises, and I'm
> > getting very inconsistent vertical spacing coming from lilypond-book,
> > here is an example:
> >
> > https://files.robehickman.com/problem.pdf
> >
> > Weird thing is that this is very inconsistent between pages, and I
> > have verified there is no excess space in the music images. LaTeX
> > seems to be stretching white space erratically.
>
> No idea what's in your .tex file. Perhaps the larger spaces are where
> LaTeX thinks a new paragraph starts. The mere presence or absence of
> blank lines between the figures can affect/control that.
>
> Cheers,
> David.
>

Reply | Threaded
Open this post in threaded view
|

Re: Very inconsistent vertical spacing from lilypond book and LaTeX

David Wright
On Thu 21 May 2020 at 21:02:25 (+0100), Robert Hickman wrote:

> On Thu, 21 May 2020 at 19:56, David Wright <[hidden email]> wrote:
> > On Thu 21 May 2020 at 18:40:53 (+0100), Robert Hickman wrote:
> > >
> > > I'm helping my partner create a book of interval exercises, and I'm
> > > getting very inconsistent vertical spacing coming from lilypond-book,
> > > here is an example:
> > >
> > > https://files.robehickman.com/problem.pdf
> > >
> > > Weird thing is that this is very inconsistent between pages, and I
> > > have verified there is no excess space in the music images. LaTeX
> > > seems to be stretching white space erratically.
> >
> > No idea what's in your .tex file. Perhaps the larger spaces are where
> > LaTeX thinks a new paragraph starts. The mere presence or absence of
> > blank lines between the figures can affect/control that.
>
> The .tex file contains the following (a snippet of), The idea about it
> being where a new paragraph or line starts seems to make sense as the
> added space seems to be about 1em.

To check this out, you could increase \parskip substantially and see
if the result is consistent with that.

If it is, then the alternatives would appear to be either to scour the
individual \input files for differences in paragraph control, like
blank lines, or to capitulate and add blank lines to this file, making
every score into a new paragraph. (Multiple blank lines only cause a
single \parskip.)

If the problem lies in lilypondbook, I'm afraid I'm out of my depth.

> \vspace{-0em}\Ssubsection{Scale}\vspace{-0em}
> {%
> \parindent 0pt
> \noindent
> \ifx\preLilyPondExample \undefined
> \else
>   \expandafter\preLilyPondExample
> \fi
> \def\lilypondbook{}%
> \input{ce/lily-6d98c8ee-systems.tex}
> \ifx\postLilyPondExample \undefined
> \else
>   \expandafter\postLilyPondExample
> \fi
> }
>
> \vspace{-0.8em}\Ssubsection{Thirds}\vspace{-0em}
> {%
> \parindent 0pt
> \noindent
> \ifx\preLilyPondExample \undefined
> \else
>   \expandafter\preLilyPondExample
> \fi
> \def\lilypondbook{}%
> \input{ec/lily-01f558b3-systems.tex}
> \ifx\postLilyPondExample \undefined
> \else
>   \expandafter\postLilyPondExample
> \fi
> }
>
> \vspace{-0.8em}\Ssubsection{Fourths}\vspace{-0em}
> {%
> \parindent 0pt
> \noindent
> \ifx\preLilyPondExample \undefined
> \else
>   \expandafter\preLilyPondExample
> \fi
> \def\lilypondbook{}%
> \input{75/lily-95458ceb-systems.tex}
> \ifx\postLilyPondExample \undefined
> \else
>   \expandafter\postLilyPondExample
> \fi
> }
>
> \vspace{-0.8em}\Ssubsection{Fifths}\vspace{-0em}
> {%
> \parindent 0pt
> \noindent
> \ifx\preLilyPondExample \undefined
> \else
>   \expandafter\preLilyPondExample
> \fi
> \def\lilypondbook{}%
> \input{2f/lily-cee1d442-systems.tex}
> \ifx\postLilyPondExample \undefined
> \else
>   \expandafter\postLilyPondExample
> \fi
> }
>
> \vspace{-0.8em}\Ssubsection{Sixths}\vspace{-0em}
> {%
> \parindent 0pt
> \noindent
> \ifx\preLilyPondExample \undefined
> \else
>   \expandafter\preLilyPondExample
> \fi
> \def\lilypondbook{}%
> \input{05/lily-bdd1bc6c-systems.tex}
> \ifx\postLilyPondExample \undefined
> \else
>   \expandafter\postLilyPondExample
> \fi
> }

Cheers,
David.