Thank you to Koji Yokota about some suggestions.My issue was I was trying to 
get Lyx to auto detect everything and it does not see to want to do that, at 
least in my case, with 2.26.0.
To setup everything, extract lilypond 2.26.0 someplace. Note the path.
In lyx preferences, file handling, converters find the current entries for 
lilypond-book or add them if missing. The defaults are below. In each case, I 
used the bundled with lilypad python, not the system version. Each time you 
make changes on a converter, be sure to hit "modify" button to save it, and 
then OK when done. This means I replaced "lilypond-book" in each of the default 
converters to something like this:
C:\\path\\lilypond-2.26.0\\bin\\python.exe  
C:\\path\\lilypond-2.26.0\\bin\\lilypond-book.py
Note I had to use two backslashes.
An example would convert:lilypond-book --latex-program=dvilualatex 
--lily-output-dir=ly-eps $$i
into this: C:\\path\\lilypond-2.26.0\\bin\\python.exe  
C:\\path\\lilypond-2.26.0\\bin\\lilypond-book.py --latex-program=dvilualatex 
--lily-output-dir=ly-eps $$i

Last, I edited the path in the lyx settings to also have  
C:\path\lilypond-2.26.0\bin\
This gave me all the things I needed. The example file with Lyx shows previews 
and will render to PDF correctly. My own documents work now as well.
Default converters:lilypond book latex =>dviluatex
lilypond-book --latex-program=dvilualatex --lily-output-dir=ly-eps $$i

lilypond book latex =>luatex
lilypond-book --pdf --latex-program=lualatex --lily-output-dir=ly-pdf $$i

lilypond book latex =>pdf latex
lilypond-book --pdf --latex-program=pdflatex --lily-output-dir=ly-pdf $$i

lilypond book latex =>plain
lilypond-book --lily-output-dir=ly-eps $$i

lilypond book latex =>xetex
lilypond-book --pdf --latex-program=xelatex --lily-output-dir=ly-pdf $$i

lilypondsbook platex -> latex playtex
lilypond-book --pdf --latex-program=platex --lily-output-dir=ly-pdf $$i
Thank you for your  help and hope this post helps others.

    On Monday, August 3, 2026 at 03:33:36 AM CDT, Koji Yokota 
<[email protected]> wrote:  
 
 Hi Matt,


To get the error to stop on opening the sample I added a converter for 
lilypond-book(latex)->Latex(plain) and giving it a path like this:$${python}  
C:\path\lilypond-2.26.0\bin\lilypond-book.py  $$iorC:\pathtopython\python.exe  
C:\path\lilypond-2.26.0\bin\lilypond-book.py  $$i

This looks like a symptom that LyX could not find lilypond. If LyX’s 
configuration works via Tool->Reconfigure, this need not be set manually.

Once I found 2.20.0-1 on the Lilypond site and installed, put in the path, 
reconfig I did not have any errors going into the sample LilyPond guide, but 
still had errors on rendering.

I’m not sure if this helps, but there seem cases that conversion to get pdf 
from lilypond via dvipdf or its variants fails. Using other paths, e.g. 
pdflatex or lualatex, may solve the problem.
To use LuaTeX, check Document -> Settings -> Font -> Use non-TeX fonts and 
choose Document -> View PDF (LuaTeX) when output PDF.
Looking into errors more precisely, running Japanese example file 
LilyPond_Book.lyx via dvipdf gets the following error raised by dvipdf:

>(Image:./5e/lily-71e9560f-1.eps[PS]Error: /invalidfileaccess in --file—Last OS 
>error: Permission deniedCurrent file position is 409GPL Ghostscript 10.07.1: 
>Unrecoverable error, exit code 1

Ghostscript complains because the following command fails because the file name 
is single quoted.

rungs -v -dSAFER -dNOPAUSE -dBATCH -dEPSCrop -sPAPERSIZE=a0 -sDEVICE=pdfwrite 
-dCompatibilityLevel=1.7 -dAutoFilterGrayImages=false 
-dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false 
-dColorImageFilter=/FlateEncode -dAutoRotatePages=/None 
-sOutputFile='/var/folders/68/mx20w3b146vgt6yfjqlh5gxm0000gn/T/dvipdfm-x.f14af449408d798d54229786a68c3552'
 -- './5e/lily-71e9560f-1.eps’

I cannot confirm this phenomenon with the English example file, so it may be 
related to the use of UTF chars.
Koji


  
-- 
lyx-users mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-users

Reply via email to