jperon / lyluatex

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

No output. #138

Closed PunctatorFortunatus closed 5 years ago

PunctatorFortunatus commented 6 years ago

I've just updated to TeXlive 2017, and through tlmgr, some packages were updated: kpathsea, polexpr and texlive-docindex. Lyluatex was installed with TeX distribution.

So far I'm failing to run this minimal example:

\documentclass[letterpaper]{report}
\usepackage{lyluatex}
\usepackage{lipsum}
\begin{document}
    \lipsum[1]
    \lily{c'}
    \begin{ly}[]
        \relative c' { c d e f g a b c }
    \end{ly}
    \includely{../prueba.ly}
\end{document}

But only the lipsum paragraph is printed to the pdf. If I fill the ly environment, or any lilypond field with rubbish, I don't get any error message or warning, just the lipsum paragraph. This example is being edited in sublime text 3, and compiled with this command: "command": ["latexmk", "-cd", "-e", "$pdflatex = 'lualatex -shell-escape -interaction=nonstopmode -synctex=1 %S %O'", "-f", "-pdf"],

If I try to compile from a terminal with lualatex -shell-escape prueba_lyluatex.tex I have the following output:

This is LuaTeX, Version 1.0.4 (TeX Live 2017) 
 system commands enabled.
(./prueba_lyluatex.tex
LaTeX2e <2017-04-15>
(using write cache: /home/victor/.texlive2017/texmf-var/luatex-cache/generic)(u
sing read cache: /usr/local/texlive/2017/texmf-var/luatex-cache/generic /home/v
ictor/.texlive2017/texmf-var/luatex-cache/generic)
luaotfload | main : initialization completed in 0.153 seconds
Babel <3.18> and hyphenation patterns for 1 language(s) loaded.
(/usr/local/texlive/2017/texmf-dist/tex/latex/base/report.cls
Document Class: report 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2017/texmf-dist/tex/latex/base/size10.clo(load luc: /home/v
ictor/.texlive2017/texmf-var/luatex-cache/generic/fonts/otl/lmroman10-regular.l
uc))) (/usr/local/texlive/2017/texmf-dist/tex/latex/lyluatex/lyluatex.sty
(/usr/local/texlive/2017/texmf-dist/tex/luatex/luatexbase/luatexbase.sty
(/usr/local/texlive/2017/texmf-dist/tex/luatex/ctablestack/ctablestack.sty))
(/usr/local/texlive/2017/texmf-dist/tex/latex/oberdiek/kvoptions.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2017/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)
(/usr/local/texlive/2017/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
(/usr/local/texlive/2017/texmf-dist/tex/generic/oberdiek/infwarerr.sty)
(/usr/local/texlive/2017/texmf-dist/tex/generic/oberdiek/etexcmds.sty
(/usr/local/texlive/2017/texmf-dist/tex/generic/oberdiek/ifluatex.sty))))
(/usr/local/texlive/2017/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/local/texlive/2017/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
(/usr/local/texlive/2017/texmf-dist/tex/latex/graphics-def/luatex.def)))
(/usr/local/texlive/2017/texmf-dist/tex/latex/keycommand/keycommand.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/etex-pkg/etex.sty)
(/usr/local/texlive/2017/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/local/texlive/2017/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/local/texlive/2017/texmf-dist/tex/generic/xkeyval/xkvutils.tex)))
(/usr/local/texlive/2017/texmf-dist/tex/latex/etoolbox/etoolbox.sty))
(/usr/local/texlive/2017/texmf-dist/tex/latex/environ/environ.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/trimspaces/trimspaces.sty))
(/usr/local/texlive/2017/texmf-dist/tex/latex/currfile/currfile.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/filehook/filehook.sty))
(/usr/local/texlive/2017/texmf-dist/tex/latex/pdfpages/pdfpages.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/base/ifthen.sty)
(/usr/local/texlive/2017/texmf-dist/tex/latex/tools/calc.sty)
(/usr/local/texlive/2017/texmf-dist/tex/latex/eso-pic/eso-pic.sty
(/usr/local/texlive/2017/texmf-dist/tex/generic/oberdiek/atbegshi.sty
(/usr/local/texlive/2017/texmf-dist/tex/generic/oberdiek/ifpdf.sty))
(/usr/local/texlive/2017/texmf-dist/tex/latex/xcolor/xcolor.sty
(/usr/local/texlive/2017/texmf-dist/tex/latex/graphics-cfg/color.cfg)))
(/usr/local/texlive/2017/texmf-dist/tex/latex/pdfpages/ppluatex.def))
lua>

And it waits there for some input, so If I hit ctrl+c this shows up:

cannot read stdin: Interrupted system call
stack traceback:
    [C]: in function 'dofile'
    [\directlua]:1: in main chunk.
l.20 ...tlua{dofile(kpse.find_file("lyluatex.lua"))}

I hope this information is useful. Thanks in advance for any help. Regards, Víctor.

jperon commented 6 years ago

I think it's a "revival" of #80: could you please try to copy texmf-dist/scripts/lyluatex/lyluatex.lua (in your texlive installation) to texmf-dist/tex/latex/lyluatex/, then run mktexlsr, then try again ?

PunctatorFortunatus commented 6 years ago

Excellent, I now have a PDF output, but I still don't have warnings or error messages if I write rubbish or if the file doesn't exists. Also, in the above example, the ly context yields no output after the \lily command, but renders correctly if I place it before; I also tried lilypond with the same result.

\lily{c'} %this renders correctly
\begin{ly}[]
\relative c' { c d e f } %this doesn't renders
\end{ly}

But if order is inverted both work correctly.

jperon commented 6 years ago

That's weird, I don't get this error. Could you check you're using last version of lyluatex, and if so, give me more details about your platform, please ?

PunctatorFortunatus commented 6 years ago

I'm using the version distributed in TeXLive 2017, via tlmgr, on Ubuntu 16.04. Lilypond is 2.19.49.

jperon commented 6 years ago

Could you please try to replace lyluatex.lua and lyluatex.sty by the versions of this repository ? Or (easier, and won't touch your TeXLive installation) copy them in the same folder as your mwe ?

PunctatorFortunatus commented 6 years ago

Yes, with the repo version it compiles fine, with this warning:

lyluatex.sty: Module lyluatex Warning: Found something incompatible with `fragment`(lyluatex)               (or `relative`). Setting them to false.
lyluatex.sty: Module lyluatex Warning: Score with more than one system included inline.

But I still don't get a warning if file name is wrong in \includely

jperon commented 6 years ago

I still don't get a warning if file name is wrong in \includely.

Could you please give a mwe, as I don't really understand the exact issue ?

PunctatorFortunatus commented 6 years ago

When I use \includely{wrong-file-name.ly} no error or warning is passed. I don't know if this is normal, though.

jperon commented 6 years ago

Another weird thing: I can't reproduce that, at least with last version. With that mwe:

\documentclass{scrartcl}

\usepackage{lyluatex}
\begin{document}

\includely{wrong-file-name.ly}

\end{document}

I get this:

Module lyluatex Error: File wrong-file-name.ly doesn't exist. on input line 6                                                                                       

stack traceback:                                                                                                                                                    
        [C]: in function 'error'                                                                                                                                    
        /usr/share/texlive/texmf-dist/tex/latex/base/ltluatex.lua:109: in function </u                                                                              
sr/share/texlive/texmf-dist/tex/latex/base/ltluatex.lua:108>                                                                                                        
        (...tail calls...)                                                                                                                                          
        /usr/share/texlive/texmf-dist/scripts/lyluatex/lyluatex.lua:1136: in function                                                                               
'file'                                                                                                                                                              
        [\directlua]:1: in main chunk.                                                                                                                              
\ly@compilescore ... #1 ly.newpage_if_fullpage() }                                                                                                                  
                                                  \ly@resetunits \ly@page \l...                                                                                     

l.6 \includely{wrong-file-name.ly}                                                                                                                                  

?                                                                                                                                                                   
! Emergency stop.
jperon commented 5 years ago

@PunctatorFortunatus Is it OK for you now, so that I close this issue ?