jperon / lyluatex

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

\repeat causes LaTeX error unless \begin{lilypond} ends with [] (square brackets) #194

Closed fedelibre closed 5 years ago

fedelibre commented 6 years ago

If you try compiling the following example:

$ cat minimal.tex 
\documentclass{article}
\usepackage{lyluatex}
\begin{document}

\begin{lilypond}
  \repeat volta 2 { c4 d e f }
\end{lilypond}

\end{document}

You'll get this error:

$ lualatex --shell-escape minimal.tex 
This is LuaTeX, Version 1.0.4 (TeX Live 2017) 
 system commands enabled.
(./minimal.tex
LaTeX2e <2017-04-15>
(using cache: /home/fede/.local/texlive/2017/texmf-var/luatex-cache/generic)
luaotfload | main : initialization completed in 0.125 seconds
Babel <3.18> and hyphenation patterns for 1 language(s) loaded.
(/home/fede/.local/texlive/2017/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/home/fede/.local/texlive/2017/texmf-dist/tex/latex/base/size10.clo(load luc: 
/home/fede/.local/texlive/2017/texmf-var/luatex-cache/generic/fonts/otl/lmroman
10-regular.luc)))
(/home/fede/.local/texlive/2017/texmf-dist/tex/latex/lyluatex/lyluatex.sty
(/home/fede/.local/texlive/2017/texmf-dist/tex/luatex/luatexbase/luatexbase.sty

(/home/fede/.local/texlive/2017/texmf-dist/tex/luatex/ctablestack/ctablestack.s
ty)) (/home/fede/.local/texlive/2017/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/home/fede/.local/texlive/2017/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/home/fede/.local/texlive/2017/texmf-dist/tex/generic/xkeyval/xkvutils.tex
(/home/fede/.local/texlive/2017/texmf-dist/tex/generic/xkeyval/keyval.tex))))
(/home/fede/.local/texlive/2017/texmf-dist/tex/latex/graphics/graphicx.sty
(/home/fede/.local/texlive/2017/texmf-dist/tex/latex/graphics/graphics.sty
(/home/fede/.local/texlive/2017/texmf-dist/tex/latex/graphics/trig.sty)
(/home/fede/.local/texlive/2017/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
(/home/fede/.local/texlive/2017/texmf-dist/tex/latex/graphics-def/luatex.def)))
 (/home/fede/.local/texlive/2017/texmf-dist/tex/latex/minibox/minibox.sty
(/home/fede/.local/texlive/2017/texmf-dist/tex/latex/l3kernel/expl3.sty
(/home/fede/.local/texlive/2017/texmf-dist/tex/latex/l3kernel/expl3-code.tex)
(/home/fede/.local/texlive/2017/texmf-dist/tex/latex/l3kernel/l3pdfmode.def)))
(/home/fede/.local/texlive/2017/texmf-dist/tex/latex/environ/environ.sty
(/home/fede/.local/texlive/2017/texmf-dist/tex/latex/trimspaces/trimspaces.sty)
) (/home/fede/.local/texlive/2017/texmf-dist/tex/latex/currfile/currfile.sty
(/home/fede/.local/texlive/2017/texmf-dist/tex/latex/oberdiek/kvoptions.sty
(/home/fede/.local/texlive/2017/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)
(/home/fede/.local/texlive/2017/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
(/home/fede/.local/texlive/2017/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
(/home/fede/.local/texlive/2017/texmf-dist/tex/generic/oberdiek/etexcmds.sty
(/home/fede/.local/texlive/2017/texmf-dist/tex/generic/oberdiek/ifluatex.sty)))
) (/home/fede/.local/texlive/2017/texmf-dist/tex/latex/filehook/filehook.sty))
(/home/fede/.local/texlive/2017/texmf-dist/tex/latex/pdfpages/pdfpages.sty
(/home/fede/.local/texlive/2017/texmf-dist/tex/latex/base/ifthen.sty)
(/home/fede/.local/texlive/2017/texmf-dist/tex/latex/tools/calc.sty)
(/home/fede/.local/texlive/2017/texmf-dist/tex/latex/eso-pic/eso-pic.sty
(/home/fede/.local/texlive/2017/texmf-dist/tex/generic/oberdiek/atbegshi.sty
(/home/fede/.local/texlive/2017/texmf-dist/tex/generic/oberdiek/ifpdf.sty))
(/home/fede/.local/texlive/2017/texmf-dist/tex/latex/xcolor/xcolor.sty
(/home/fede/.local/texlive/2017/texmf-dist/tex/latex/graphics-cfg/color.cfg)))
(/home/fede/.local/texlive/2017/texmf-dist/tex/latex/pdfpages/ppluatex.def))
(/home/fede/.local/texlive/2017/texmf-dist/tex/latex/metalogo/metalogo.sty
(/home/fede/.local/texlive/2017/texmf-dist/tex/generic/ifxetex/ifxetex.sty)))
(./minimal.aux)
(/home/fede/.local/texlive/2017/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
)
(/home/fede/.local/texlive/2017/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
(/home/fede/.local/texlive/2017/texmf-dist/tex/latex/oberdiek/grfext.sty
(/home/fede/.local/texlive/2017/texmf-dist/tex/generic/oberdiek/kvdefinekeys.st
y))
(/home/fede/.local/texlive/2017/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty)

(/home/fede/.local/texlive/2017/texmf-dist/tex/latex/latexconfig/epstopdf-sys.c
fg))
(/home/fede/.local/texlive/2017/texmf-dist/tex/latex/oberdiek/pdflscape.sty
(/home/fede/.local/texlive/2017/texmf-dist/tex/latex/graphics/lscape.sty))
! Too many }'s.
\lilypond ...#1}\else \Addto@Envbody {#1\end {#2}}
                                                  \fi \process@envbody 
l.7 \end{lilypond}

? X
 517 words of node memory still in use:
   3 hlist, 1 rule, 1 local_par, 1 dir, 9 glue, 11 glyph, 6 attribute, 49 glue_
spec, 6 attribute_list, 1 temp, 1 write, 1 pdf_colorstack nodes
   avail lists: 2:8,3:3,4:1,5:3,8:1,9:1

warning  (pdf backend): no pages of output.
Transcript written on minimal.log.

The same file compiles correctly if I add the square brackets here:

\begin{lilypond}[]

It seems that issue #51 was not completely fixed?

fedelibre commented 6 years ago

See also David's comment.