Witiko / markdown

:notebook_with_decorative_cover: A package for converting and rendering markdown documents in TeX
http://ctan.org/pkg/markdown
LaTeX Project Public License v1.3c
319 stars 32 forks source link

Compile error with fresh MiKTeX installation #458

Open Yggdrasil128 opened 4 days ago

Yggdrasil128 commented 4 days ago

Hello, I've recently ran into a problem that causes markdown to fail with the following error message:

...a/Local/Programs/MiKTeX/tex/luatex/markdown/markdown.lua:3237: bad argument #1 to 'open' (string expected, got nil)
stack traceback:
    [C]: in function 'io.open'
    ...a/Local/Programs/MiKTeX/tex/luatex/markdown/markdown.lua:3237: in function <...a/Local/Programs/MiKTeX/tex/luatex/markdown/markdown.lua:3235>
    ...a/Local/Programs/MiKTeX/tex/luatex/markdown/markdown.lua:3235: in main chunk
    [C]: in function 'require'
    [\directlua]:1: in main chunk.
\lua_now:e #1->\__lua_now:n {#1}

l.8 \end{markdown}

The lua interpreter ran into a problem, so the
remainder of this lua chunk will be ignored.

Here are my steps to reproduce:

  1. Create a fresh Windows 11 VM
  2. Install the most recent version of MiKTeX
  3. Create file document.tex

    \documentclass{article}
    \usepackage{markdown}
    \begin{document}
    Hello World!
    
    \begin{markdown}
    _Hello,_ **Markdown**!
    \end{markdown}
    \end{document}
  4. Run lualatex --interaction=nonstopmode --shell-escape --synctex=1 document.tex
  5. The above error occurs.

In the resulting PDF, only the "Hello World" part is there, the "Hello Markdown" part is missing. I have attached the full log file: document.log

Since everything is a fresh install, all packages are up-to-date.

Interestingly, on a different system where I haven't updated my MiKTeX packages in a while, I still have markdown version 2.23.0-0-g0b22f91 installed, and everything works fine there.

Please let me know if I can help you with any additional information.

Witiko commented 4 days ago

Hello and thank you for the report. I don't have any fix for you at the moment but I will look into reproducing your issue using the MikTeX Docker image.