jperon / lyluatex

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

TexLive can't find Lilypond anymore #308

Open Brayanokles opened 1 year ago

Brayanokles commented 1 year ago

Hello,

I have installed a new version of Lilypond. Ever since, TexLive doesn't see Lilypond anymore.

Here is my test script:

\documentclass[a4paper, 11pt]{article}

\usepackage{lyluatex} 

\begin{document}
    This is a MWE.

    \lilypond{ c' d' e' } 

\end{document}

The result:

(c:/texlive/2020/texmf-dist/tex/latex/graphics/lscape.sty))'"lilypond"' is not recognized as an internal or external command,
operable program or batch file.
c:/texlive/2020/texm
f-dist/tex/latex/base/ltluatex.lua:109: 
Module lyluatex Error: LilyPond could not be started.
(lyluatex)             Please check that LuaLaTeX is started with the
(lyluatex)             --shell-escape option, and that 'program'
(lyluatex)             points to a valid LilyPond executable.
(lyluatex)             on input line 8

stack traceback:
    [C]: in function 'error'
    c:/texlive/2020/texmf-dist/tex/latex/base/ltluatex.lua:109: in function <c:/te
xlive/2020/texmf-dist/tex/latex/base/ltluatex.lua:108>
    (...tail calls...)
    c:/texlive/2020/texmf-dist/scripts/lyluatex/lyluatex.lua:1081: in method 'proc
ess'
    [\directlua]:1: in main chunk.
\ly@compilescore ...directlua {ly.score:process()}

l.8     \lilypond{ c' d' e' }

? 

How can I fix this?

jperon commented 1 year ago

You should ensure that lilypond is in your PATH environment variable. In any case, manually adding the path of lilypond should solve the problem:

\usepackage[program=/path/to/lilypond]{lyluatex}
Brayanokles commented 1 year ago

Path = C:\Program Files (x86)\Lilypond\lilypond-2.24.0\bin ??

jperon commented 1 year ago

The executable should be included:

\usepackage[program={C:/Program Files (x86)/LilyPond/usr/bin/lilypond-windows.exe}]{lyluatex}

Given there are spaces and you’re and Windows, perhaps you should replace / by \, and perhaps add quotes around the path… not sure, but I’d be interested if you could tell me what eventually works (for future reference).

Brayanokles commented 1 year ago

in bin, there is no lilypond-windows.exe file. Where can I find it?

jperon commented 1 year ago

Perhaps it is lilypond.exe. I made a copy - paste from an old issue, so the names might have changed.