jperon / lyluatex

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

\lilypond{} command broken? #223

Closed uliska closed 5 years ago

uliska commented 5 years ago

I tried to compile the manual after pulling the latest master (at 1b94b9d0b95d5357e04e5c01b0020a8248fdd1af). The compilation stopped with the following error:

(lyluatex)  Compiling score tmp-ly/c39a38c257f953808c7606e3e7c1f1b8 with LilyPond executable 'lilypond'.
./lyluatex.lua:366: attempt to perform arithmetic on local 'height' (a nil valu
e)
stack traceback:
    ./lyluatex.lua:366: in function 'includeinline'
    ./lyluatex.lua:1239: in function 'write_latex'
    ./lyluatex.lua:1155: in function 'process'
    [\directlua]:1: in main chunk.
\ly@compilescore ...directlua {ly.score:process()}

l.321 \lilypond{ c' d' e' }
                          Fragments specified with \cmd{lilypond} are by
?

The error can be reproduced with this MWE:

\documentclass{article}
\usepackage{lyluatex}
\begin{document}
\lilypond{c'}
\end{document}

I didn't notice anything with the lilypond environment, and I didn't do any substantial tests since I have just begun trying to incorporate lyluatex again in a project.

jperon commented 5 years ago

The problem was introduced by 5584d01 : I had to restore height calculation, but only on-demand to prevent #192.