Dear Werner,

Thank you so much for your guidance on reducing the complexity of my
LilyPond score step by step to identify the issue. Your suggestion indeed
helped me pinpoint the problem. The issue stemmed from my attempt to embed
the score as a figure-like object within the LaTeX document. My goal was to
number each score and later include these numbers in the table of contents
for easy reference.


···latex

\begin{figure}[h]

\lilypondfile[papersize=letter,paper-height=150mm,noragged-right,staffsize=18]{
repeated_notes.ly} % paper-height=150pt,
    \caption{Repeated Notes}
    \label{sng:repeated_notes}
\end{figure}

···


However, treating the score as a figure resulted in it being rendered as a
single, non-breakable image, preventing it from spanning multiple pages.
Once I removed this figure-like embedding, the score could successfully
break across pages as intended.

Now, my challenge is how to retain the numbering and indexing of these
scores in the document without treating them as figures. I want to be able
to cross-reference the scores within the text and have them appear in the
table of contents under their respective section.

Could you suggest any approaches or workarounds that would allow me to
achieve these goals? I am looking for a solution that provides the
flexibility of indexing and cross-referencing without compromising the
ability to break scores across pages.

Thank you again for your invaluable advice. I look forward to any further
suggestions you might have.

Best regards,

Peter

On Sun, Aug 11, 2024 at 10:20 PM Werner LEMBERG <w...@gnu.org> wrote:

> [Please always use 'Reply to all' so that the mailing list stays in
>  the thread.]
>
> > It did happen in my case. The issue occurred while embedding a
> > lengthy LilyPond score within a LaTeX document. Despite expecting
> > the score to be broken into systems and spaced by LaTeX, it was
> > rendered as a single tall image.
>
> Again: I need an example to answer your question.  The usual process
> is to reduce your lengthy score step by step until you arrive at a
> minimal working example (MWE) that can no longer be shortened, and
> which still triggers the problem.
>
> BTW, in many cases this reduction process already helps in finding a
> solution.
>
> > Could you please guide me on whether there is any official
> > documentation or snippets available that address this scenario?
>
> Besides the documentation at
>
>   https://lilypond.org/doc/v2.24/Documentation/usage/lilypond_002dbook
>
> we have a suite of regression tests that cover LaTeX, to be found in
> the LilyPond source code bundle at
>
>   input/regression/lilypond-book/*.lytex
>
> Maybe this gives you more hints.
>

Reply via email to