jperon / lyluatex

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

attempt to index a nil value ( field 'metadata') #302

Closed marekklein closed 1 year ago

marekklein commented 1 year ago

Hello, I have a problem when I try to generate a score. Last lines of log are here: `geometry driver: auto-detecting geometry detected driver: luatex (/usr/share/texlive/texmf-dist/tex/latex/pdflscape/pdflscape.sty (/usr/share/texlive/texmf-dist/tex/latex/graphics/lscape.sty))/usr/share/texliv e/texmf-dist/scripts/lyluatex/lyluatex.lua:1335: attempt to index a nil value ( field 'metadata') stack traceback: /usr/share/texlive/texmf-dist/scripts/lyluatex/lyluatex.lua:1335: in function 'lyluatex.lua.get_font_family' [\directlua]:1: in main chunk. \ly@currentfonts ..._font_family(font.current()))} \rmfamily \edef \rmfamilyi...

l.37 \includely[]{horvath-missa_lux_et_origo1.ly} ` Can you help me? book.log

jperon commented 1 year ago

Would you please have a MWE, so that I can look into it ? Otherwise, if you don’t mind sharing your document, you could send it to me.

jperon commented 1 year ago

Thank you for the document. The problem comes from those lines, that are obsolete:

\usepackage[T1]{fontenc}
\usepackage[utf8]{luainputenc}

You should replace them by:

\usepackage{fontspec}

You may also call a package to define the global font: under lualatex, they depend on fontspec, so no need to load it explicitly. Moreover, if adding the pass-fonts option to lyluatex, you would get a coherent font for you document:

\usepackage{ebgaramond}  % You may replace ebgaramond by libertine, for example.
\usepackage[pass-fonts]{lyluatex}
marekklein commented 1 year ago

Thank you. I get other errors now and the compiling hangs after the last line of the attached log...

On Wed, 22 Feb 2023 at 07:32, jperon @.***> wrote:

Thank you for the document. The problem comes from those lines, that are obsolete:

\usepackage[T1]{fontenc}\usepackage[utf8]{luainputenc}

You should replace them by:

\usepackage{fontspec}

You may also call a package to define the global font: under lualatex, they depend on fontspec, so no need to load it explicitly. Moreover, if adding the pass-fonts option to lyluatex, you would get a coherent font for you document:

\usepackage{ebgaramond} % You may replace ebgaramond by libertine, for example.\usepackage[pass-fonts]{lyluatex}

— Reply to this email directly, view it on GitHub https://github.com/jperon/lyluatex/issues/302#issuecomment-1439506015, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEMTKJRALUSVKAR2OAP23GLWYWXH5ANCNFSM6AAAAAAVBU2EQI . You are receiving this because you authored the thread.Message ID: @.***>

jperon commented 1 year ago

I fear the log didn’t get attached.

jperon commented 1 year ago

Fixed in v1.1.