gregorio-project / gregorio

The Gregorio Project
http://gregorio-project.github.io
Other
162 stars 43 forks source link

Extra return before closing bracket for \gabcsnippet stops compilation #1497

Closed adunning closed 3 years ago

adunning commented 4 years ago

An extra return character before the closing bracket for \gabcsnippet prevents Gregorio from compiling the section, giving a 'shell-escape mode may not be activated' error.

This minimal example triggers the problem for me under LuaHBTeX 1.12.0/TeX Live 2020:

\documentclass{article}

\usepackage{gregoriotex}

\begin{document}

\gabcsnippet{(c3) Mi(f)se(f)ré(gv)re.(fe) (::)

} % Remove the space before this line to fix the error

\end{document}

This is the error message:

Module gregoriotex Error: 
(gregoriotex)             Something went wrong when executing
(gregoriotex)                 gregorio -W -o "%s" -l "test.gsniplog" "test.gsni
ppet"
(gregoriotex)             shell-escape mode may not be activated. Try
(gregoriotex)             
(gregoriotex)             lualatex --shell-escape test.tex
(gregoriotex)             
(gregoriotex)             See the documentation of Gregorio or your TeX
(gregoriotex)             distribution to automatize it. on input line 9

stack traceback:
    [C]: in function 'error'
    ...texlive/2020basic/texmf-dist/tex/latex/base/ltluatex.lua:109: in function <
...texlive/2020basic/texmf-dist/tex/latex/base/ltluatex.lua:108>
    (...tail calls...)
    ...0basic/texmf-dist/tex/luatex/gregoriotex/gregoriotex.lua:939: in field 'dir
ect_gabc'
    [\directlua]:1: in main chunk.
\gabcsnippet ... \gre@allowdeprecated@asboolean )}

l.9 }
rpspringuel commented 3 years ago

The problem is that a \par finds its way into the snippet file.