构建过程中无法找到用于嵌入 markdown 的生成的 lua 文件。
您好,我想将 markdown 文件集成到我的 latex 文件中。首先,我尝试运行一个示例。但是,由于出现错误,构建失败,错误提示无法找到目录中已存在的 lua 文件。
梅威瑟:
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}
错误:
相应的行steps.log
c:/path/to/directory/steps.tex:42: I can't find file `"|texlua ./steps.markdown.lua"'.
环境:
- texlive 2022
- VSCode 带有 LaTeX Workshop 插件,我在下面列出了构建参数
{
"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": {}
},
答案1
答案2
如果使用命令行进行编译latexmk
,而不是使用 LaTeX-Workshop(在这种情况下请参阅Reactionionic 的回答),适当使用-pdflua
或,而不是或的对应部分。-dvilua
pdflatex
-pdf
-dvi
即使用
latexmk -pdfdvi (...other flags...) input_file.tex
和不是
latexmk -pdf (...other flags...) input_file.tex