2

A generated lua file for embedding markdown cannot be found during build process.

Hello I want to integrate a markdown file in my latex file. Firstly, I tried to run an example for it. However, the build fails because of an error, that says that a lua file cannot be found, which is already in directory.

MWE:

steps.tex

\documentclass[a4paper, 11pt]{article}
\usepackage{geometry}
\usepackage[hashEnumerators,smartEllipses]{markdown}

\geometry{
 a4paper,
 total={170mm,257mm},
 left=20mm,
 top=20mm,
 }

\usepackage{float}
\begin{document}

\begin{markdown}
An h1 header
============

Paragraphs are separated by a blank line. 

2nd paragraph. *Italic*, **bold**, and `monospace`. Itemized lists
look like:

* this one
* that one
* the other one

> Block quotes are
> written like so.
>
> They can span multiple paragraphs,
> if you like.

An h2 header
------------

Here's a numbered list (use `hashEnumerators` option if you want to use hashes):

#. first item
#. second item
#. third item
\end{markdown}

\end{document}

Error:

The corresponding line in steps.log

c:/path/to/directory/steps.tex:42: I can't find file `"|texlua ./steps.markdown.lua"'.

Environment:

  • texlive 2022
  • VSCode with LaTeX Workshop plugin and I have listed build arguments below
{
        "name": "latexmk",
        "command": "C:/texlive/2022/bin/win32/latexmk.exe",
        "args": [
            "-synctex=1",
            "-interaction=nonstopmode",
            "-file-line-error",
            "-pdf",
            "-outdir=%OUTDIR%",
            "%DOC%"
        ],
        "env": {}
    },
    {
        "name": "lualatexmk",
        "command": "C:/texlive/2022/bin/win32/latexmk.exe",
        "args": [
            "-synctex=1",
            "-interaction=nonstopmode",
            "-file-line-error",
            "-lualatex",
            "-outdir=%OUTDIR%",
            "%DOC%"
        ],
        "env": {}
    },
    {
        "name": "pdflatex",
        "command": "C:/texlive/2022/bin/win32/pdflatex.exe",
        "args": [
            "-synctex=1",
            "-interaction=nonstopmode",
            "-file-line-error",
            "-output-directory=%OUTDIR%",
            "%DOC%"
        ],
        "env": {}
    },
3
  • your absolute pathes (C:/texlive/2022/bin/win32/latexmk.exe) sounds as if you are not in the current directory when you start the compilation. Commented Sep 9, 2022 at 8:20
  • Yes, they just indicate the executables. Since, this path is in the system path. I can actually remove and keep it like latexmk.exe. However, it does not help. Except markdown all the packages I used work without problem.
    – Reactionic
    Commented Sep 9, 2022 at 8:44
  • try without the outdir settings. Commented Sep 9, 2022 at 9:27

2 Answers 2

0

The problem was the recipe. When markdown is used in LaTeX, one should choose lualatexmk recipe (whose parameters are shown in the question) instead of the default recipe.

enter image description here

2
  • 1
    Note that your solution and the tags used for your question does not really match the title of your question. To make this more useful to others it might be an idea to add extra tags and rephrase the title.
    – daleif
    Commented Sep 9, 2022 at 11:05
  • 1
    Hopefully it is now more suitable.
    – Reactionic
    Commented Sep 9, 2022 at 11:16
0

If compiling from the command line with latexmk, rather than from LaTeX-Workshop (in which case see Reactionic's answer), use the -pdflua or -dvilua, as appropriate, rather than the pdflatex counterparts of -pdf or -dvi.

I.e., use

latexmk -pdfdvi (...other flags...) input_file.tex

and not

latexmk -pdf (...other flags...) input_file.tex

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .