Re: LyX and LilyPond
Matthew Isam via lyx-users <[email protected]> Mon, 3 Aug 2026 14:36:00 +0000 (UTC)
| Newsgroups | gmane.editors.lyx.general |
|---|---|
| Message-ID | <[email protected]> |
--===============6522380085583831383==
Content-Type: multipart/alternative;
boundary="----=_Part_3169766_443413036.1785767760163"
------=_Part_3169766_443413036.1785767760163
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Thank you to=C2=A0Koji Yokota about some suggestions.My issue was I was tr=
ying 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 th=
e default converters to something like this:
C:\\path\\lilypond-2.26.0\\bin\\python.exe=C2=A0 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=3Ddvilualatex --lily=
-output-dir=3Dly-eps $$i
into this: C:\\path\\lilypond-2.26.0\\bin\\python.exe=C2=A0 C:\\path\\lilyp=
ond-2.26.0\\bin\\lilypond-book.py=C2=A0--latex-program=3Ddvilualatex --lily=
-output-dir=3Dly-eps $$i
Last, I edited the path in the lyx settings to also have=C2=A0 C:\path\lily=
pond-2.26.0\bin\
This gave me all the things I needed. The example file with Lyx shows previ=
ews and will render to PDF correctly. My own documents work now as well.
Default converters:lilypond book latex =3D>dviluatex
lilypond-book --latex-program=3Ddvilualatex --lily-output-dir=3Dly-eps $$i
lilypond book latex =3D>luatex
lilypond-book --pdf --latex-program=3Dlualatex --lily-output-dir=3Dly-pdf $=
$i
lilypond book latex =3D>pdf latex
lilypond-book --pdf --latex-program=3Dpdflatex --lily-output-dir=3Dly-pdf $=
$i
lilypond book latex =3D>plain
lilypond-book --lily-output-dir=3Dly-eps $$i
lilypond book latex =3D>xetex
lilypond-book --pdf --latex-program=3Dxelatex --lily-output-dir=3Dly-pdf $$=
i
lilypondsbook platex -> latex playtex
lilypond-book --pdf --latex-program=3Dplatex --lily-output-dir=3Dly-pdf $$i
Thank you for your=C2=A0 help and hope this post helps others.
On Monday, August 3, 2026 at 03:33:36 AM CDT, Koji Yokota <yokota6@gmai=
l.com> wrote: =20
=20
Hi Matt,
To get the error to stop on opening the sample I added a converter for lily=
pond-book(latex)->Latex(plain) and giving it a path like this:$${python}=C2=
=A0 C:\path\lilypond-2.26.0\bin\lilypond-book.py=C2=A0 $$iorC:\pathtopython=
\python.exe=C2=A0 C:\path\lilypond-2.26.0\bin\lilypond-book.py=C2=A0 $$i
This looks like a symptom that LyX could not find lilypond. If LyX=E2=80=99=
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, bu=
t still had errors on rendering.
I=E2=80=99m 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=E2=
=80=94Last OS error: Permission deniedCurrent file position is 409GPL Ghost=
script 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=3Da0 -sDEVICE=3Dpd=
fwrite -dCompatibilityLevel=3D1.7 -dAutoFilterGrayImages=3Dfalse -dGrayImag=
eFilter=3D/FlateEncode -dAutoFilterColorImages=3Dfalse -dColorImageFilter=
=3D/FlateEncode -dAutoRotatePages=3D/None -sOutputFile=3D'/var/folders/68/m=
x20w3b146vgt6yfjqlh5gxm0000gn/T/dvipdfm-x.f14af449408d798d54229786a68c3552'=
-- './5e/lily-71e9560f-1.eps=E2=80=99
I cannot confirm this phenomenon with the English example file, so it may b=
e related to the use of UTF chars.
Koji
=20
------=_Part_3169766_443413036.1785767760163
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<html><head></head><body><div class=3D"ydpd5d78473yahoo-style-wrap" style=
=3D"font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px=
;"><div></div>
<div dir=3D"ltr" data-setdir=3D"false"><div><div dir=3D"ltr" data-s=
etdir=3D"false">Thank you to <span>Koji Yokota about some suggestions.=
</span></div><div dir=3D"ltr" data-setdir=3D"false"><span>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.</span></div>=
<div dir=3D"ltr" data-setdir=3D"false"><span><br></span></div><div dir=3D"l=
tr" data-setdir=3D"false"><span>To setup everything, extract lilypond 2.26.=
0 someplace. Note the path.</span></div><div dir=3D"ltr" data-setdir=3D"fal=
se"><span><br></span></div><div dir=3D"ltr" data-setdir=3D"false"><span>In
lyx preferences, file handling, converters find the current entries for
lilypond-book or add them if missing. The defaults are below. In each=20
case, I used the bundled with lilypad python, not the system version.=20
Each time you make changes on a converter, be sure to hit "modify"=20
button to save it, and then OK when done. This means I replaced=20
"lilypond-book" in each of the default converters to something like=20
this:</span></div><div dir=3D"ltr" data-setdir=3D"false"><span><br></span><=
/div><div dir=3D"ltr" data-setdir=3D"false"><span><span>C:\\path\\lilypond-=
2.26.0\\bin\\python.exe C:\\path\\lilypond-2.26.0\\bin\\lilypond-book=
.py</span></span></div><div dir=3D"ltr" data-setdir=3D"false"><span><span><=
br></span></span></div><div dir=3D"ltr" data-setdir=3D"false"><span><span>N=
ote I had to use two backslashes.</span></span></div><div dir=3D"ltr" data-=
setdir=3D"false"><span><span><br></span></span></div><div dir=3D"ltr" data-=
setdir=3D"false"><span><span>An example would convert:</span></span></div><=
div dir=3D"ltr" data-setdir=3D"false"><span><span><span>lilypond-book --lat=
ex-program=3Ddvilualatex --lily-output-dir=3Dly-eps $$i</span></span></span=
></div><div dir=3D"ltr" data-setdir=3D"false"><span><span><span><br></span>=
</span></span></div><div dir=3D"ltr" data-setdir=3D"false"><span><span><spa=
n>into this:</span></span></span></div><div dir=3D"ltr" data-setdir=3D"fals=
e"><span><span><span><span> <span><span><span>C:\\path\\lilypond-2.26.0\\bi=
n\\python.exe C:\\path\\lilypond-2.26.0\\bin\\lilypond-book.py</span>=
</span></span> --latex-program=3Ddvilualatex --lily-output-dir=3Dly-ep=
s $$i</span><br></span></span></span></div><div dir=3D"ltr" data-setdir=3D"=
false"><span><span><br></span></span></div><div dir=3D"ltr" data-setdir=3D"=
false"><span>Last, I edited the path in the lyx settings to also have =
<span><span><span><span><span> <span><span><span>C:\path\lilypond-2.26.0\bi=
n\</span></span></span></span></span></span></span></span></span></div><div=
dir=3D"ltr" data-setdir=3D"false"><span><br></span></div><div dir=3D"ltr" =
data-setdir=3D"false"><span>This
gave me all the things I needed. The example file with Lyx shows=20
previews and will render to PDF correctly. My own documents work now as=20
well.</span></div><div dir=3D"ltr" data-setdir=3D"false"><span><br></span><=
/div><div dir=3D"ltr" data-setdir=3D"false"><span>Default converters:</span=
></div><div dir=3D"ltr" data-setdir=3D"false"><div>lilypond book latex =3D&=
gt;dviluatex<br>lilypond-book --latex-program=3Ddvilualatex --lily-output-d=
ir=3Dly-eps $$i<br><br>lilypond book latex =3D>luatex<br>lilypond-book -=
-pdf --latex-program=3Dlualatex --lily-output-dir=3Dly-pdf $$i<br><br>lilyp=
ond book latex =3D>pdf latex<br>lilypond-book --pdf --latex-program=3Dpd=
flatex --lily-output-dir=3Dly-pdf $$i<br><br>lilypond book latex =3D>pla=
in<br>lilypond-book --lily-output-dir=3Dly-eps $$i<br><br>lilypond book lat=
ex =3D>xetex<br>lilypond-book --pdf --latex-program=3Dxelatex --lily-out=
put-dir=3Dly-pdf $$i<br><br>lilypondsbook platex -> latex playtex<br>lil=
ypond-book --pdf --latex-program=3Dplatex --lily-output-dir=3Dly-pdf $$i</d=
iv></div><div dir=3D"ltr" data-setdir=3D"false"><span><br></span></div><div=
dir=3D"ltr" data-setdir=3D"false"><span>Thank you for your help and =
hope this post helps others.</span></div></div><br></div><div><br></div>
=20
</div><div id=3D"ydp3c56e4bbyahoo_quoted_6146724314" class=3D"ydp3c=
56e4bbyahoo_quoted">
<div style=3D"font-family: Helvetica Neue, Helvetica, Arial, sa=
ns-serif; font-size: 13px; color: rgb(38, 40, 42); --darkreader-inline-colo=
r: var(--darkreader-text-26282a, #cfcbc4);" data-darkreader-inline-color=3D=
"">
=20
<div>
On Monday, August 3, 2026 at 03:33:36 AM CDT, Koji =
Yokota <[email protected]> wrote:
</div>
<div><br></div>
<div><br></div>
=20
=20
<div><div id=3D"ydp3c56e4bbyiv8710738631"><div>Hi Matt,<br =
id=3D"ydp3c56e4bbyiv8710738631lineBreakAtBeginningOfMessage">
<div><br></div><div><blockquote type=3D"cite"><div><span style=3D"font-fami=
ly:Helvetica, Arial, sans-serif;font-size:16px;">To get the error to stop o=
n opening the sample I added a converter for lilypond-book(latex)->Latex=
(plain) and giving it a path like this:</span><div><span style=3D"font-fami=
ly:Helvetica, Arial, sans-serif;font-size:16px;">$${python} C:\path\l=
ilypond-2.26.0\bin\lilypond-book.py $$i</span></div><div><span style=
=3D"font-family:Helvetica, Arial, sans-serif;font-size:16px;">or</span></di=
v><div dir=3D"ltr" style=3D"font-size:16px;font-family:Helvetica, Arial, sa=
ns-serif;">C:\pathtopython\python.exe C:\path\lilypond-2.26.0\bin\lil=
ypond-book.py $$i</div></div></blockquote><div><div><br></div></div><=
div>This looks like a symptom that LyX could not find lilypond. If LyX=E2=
=80=99s configuration works via Tool->Reconfigure, this need not be set =
manually.</div><div><br></div><blockquote type=3D"cite"><div><span style=3D=
"font-family:Helvetica, Arial, sans-serif;font-size:16px;">Once I found 2.2=
0.0-1 on the Lilypond site and installed, put in the path, reconfig I did n=
ot have any errors going into the sample LilyPond guide, but still had erro=
rs on rendering.</span></div></blockquote><br></div><div>I=E2=80=99m not su=
re if this helps, but there seem cases that conversion to get pdf from lily=
pond via dvipdf or its variants fails. Using other paths, e.g. pdflatex or =
lualatex, may solve the problem.</div><div><br></div><div>To use LuaTeX, ch=
eck Document -> Settings -> Font -> Use non-TeX fonts and choose D=
ocument -> View PDF (LuaTeX) when output PDF.</div><div><br></div><div>L=
ooking into errors more precisely, running Japanese example file LilyPond_B=
ook.lyx via dvipdf gets the following error raised by dvipdf:</div><div><br=
></div><div></div><blockquote type=3D"cite"><div>>(Image:./5e/lily-71e95=
60f-1.eps[PS]Error: /invalidfileaccess in --file=E2=80=94</div><div>Last OS=
error: Permission denied</div><div>Current file position is 409</div><div>=
<div>GPL Ghostscript 10.07.1: Unrecoverable error, exit code 1</div></div><=
/blockquote><div><br></div>Ghostscript complains because the following comm=
and fails because the file name is single quoted.<div><br></div><div><block=
quote type=3D"cite">rungs -v -dSAFER -dNOPAUSE -dBATCH -dEPSCrop -sPAPERSIZ=
E=3Da0 -sDEVICE=3Dpdfwrite -dCompatibilityLevel=3D1.7 -dAutoFilterGrayImage=
s=3Dfalse -dGrayImageFilter=3D/FlateEncode -dAutoFilterColorImages=3Dfalse =
-dColorImageFilter=3D/FlateEncode -dAutoRotatePages=3D/None -sOutputFile=3D=
'/var/folders/68/mx20w3b146vgt6yfjqlh5gxm0000gn/T/dvipdfm-x.f14af449408d798=
d54229786a68c3552' -- './5e/lily-71e9560f-1.eps=E2=80=99</blockquote><br></=
div><div>I cannot confirm this phenomenon with the English example file, so=
it may be related to the use of UTF chars.</div><div><br></div><div>Koji</=
div><div><br></div><div><br><div></div><div><br></div></div></div></div></d=
iv>
</div>
</div></body></html>
------=_Part_3169766_443413036.1785767760163--
--===============6522380085583831383==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--
lyx-users mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-users
--===============6522380085583831383==--