On Sun 03 May 2026 at 23:10:33 (-0400), Yoshiaki Onishi wrote:
> I use TeXShop to prepare documents on LaTeX and I often combine LilyPond and
> LaTeX together, as well.
>
> Of the code David provided, I was able to make it work with a slight tweak,
> i.e. to add the location of the LilyPond in the \usepackage{lyluatex} as
> follows:
>
> \usepackage[program=/opt/homebrew/bin/lilypond]{lyluatex}
>
> That is, to add square brackets in which the pathname to LilyPond is preceded
> by “program=“
>
> I don’t know if TeXShop and TeXLive behave fundamentally differently, but it
> might be worth a try.
Which version of lilypond do you have in /opt/homebrew/bin/lilypond ?
Running lualatex --shell-escape lytest.ly on Debian, with
downloaded lilypond versions specified as shown in [program=…] here:
\documentclass{article}
\usepackage[program=/home/auser/lilypond.2.18.2.1/bin/lilypond]{lyluatex}
\begin{document}
Hi!
\begin{lilypond}
{c' c'}
\end{lilypond}
\end{document}
or with Debian installed versions (omitting [program=…]), ie versions
2.22.0-10 (Debian bullseye), 2.24.1-2 (bookworm), and 2.24.4-5
(trixie), I get successful output in all versions up to 2.24.1-2.
However, versions 2.24.4 and 2.26.0 result in the process stalling
at the point where one sees, or would expect to see:
(lyluatex) Compiling score tmp-ly/123…456 with LilyPond executable
'/home/auser/lilypond.2.24.4/bin/lilypond'.
The failing lualatex process runs one core at 100% and has to be killed.
I don't think that the problem is caused by increasing hardening of
the OS because the oldest OS (bullseye), which one would suppose to
be the least hardened, still fails with downloaded 2.24.4 and 2.26.0,
yet the newest (trixie), most hardened, succeeds with downloaded
2.18.2; but I am guessing here.
A failing run leaves behind four files: ./lytest.aux, ./lytest.log
(both these look as expected), $TMP/lilypond-tmp-987…, and
./tmp-ly/123…456.pdf. The last two are a PostScript full-page
rendition of the lilypond score and the equivalent PDF file
generated from it. As the PDF's version is 1.4, I don't think
https://github.com/jperon/lyluatex/issues/301 applies.
So for the time being, I shall continue to produce mixed text
and scores using independent LP runs to produce cropped PDFs
of individual score fragments, followed by a pdflatex run to
set the text, placing the PDFs with \includegraphics.
(An aside to Ivan Kuznetsov: PDFs avoid the loss of resolution
caused by PNGs being rasterised.)
Cheers,
David.