Closed hongy19 closed 2 months ago
I ha[ve] configured "\def\markdownOptionOutputDir{latex.out}" to indicate output folder but seems texlua doesn't notice it.
@hongy19: Hey there, thanks for reaching out!
The option \markdownOptionOutputDir
has been deprecated in version 3.4.1 (2024-02-16). Instead, the output directory is automatically determined based on the parameter -output-directory
of XeTeX. You should be able to remove \def\markdownOptionOutputDir{latex.out}
from file markdown1.tex
and achieve the same result. This won't solve your issue but will make your file tidier.
Here is what seems to be the cause of your issue:
lt3luabridge
that we use to execute texlua
does not automatically determine the output directory based on the parameter -output-directory
, see https://github.com/Witiko/lt3luabridge/issues/26.\markdownOptionOutputDir
to the library lt3luabridge
either.You can fix your issue by adding the following code before \usepackage{markdown}
in file markdown1.tex
:
\def\markdownOptionOutputDir{latex.out}
\ExplSyntaxOn
\str_new:N
\g_luabridge_output_dirname_str
\str_gset:NV
\g_luabridge_output_dirname_str
\markdownOptionOutputDir
\ExplSyntaxOff
After I have fixed both causes in the next release, you should be able to remove the above code from file markdown1.tex
.
Please, let me know if this solved your issue, so that I know that I am on the right track!
@Witiko thanks for your feedback
I got following error with your suggestion, Latex log: markdown.log
| LaTeX Error: Control sequence \g_luabridge_output_dirname_str already defined.
\documentclass{article}
\usepackage{markdown}
\def\markdownOptionOutputDir{latex.out}
\ExplSyntaxOn
\str_new:N
\g_luabridge_output_dirname_str
\str_gset:NV
\g_luabridge_output_dirname_str
\markdownOptionOutputDir
\ExplSyntaxOff
\begin{document}
\begin{markdown}
- item1
- item11
- item12
- item2
- item21
- item22
\end{markdown}
\end{document}
LaTeX Error: Control sequence
\g_luabridge_output_dirname_str
already defined.
Does it help if you move \usepackage{markdown}
below the code, i.e. between \ExplSyntaxOff
and \begin{document}
?
LaTeX Error: Control sequence
\g_luabridge_output_dirname_str
already defined.Does it help if you move
\usepackage{markdown}
below the code, i.e. between\ExplSyntaxOff
and\begin{document}
?
Thanks so much! it works
\documentclass{article}
\def\markdownOptionOutputDir{latex.out}
\ExplSyntaxOn
\str_new:N
\g_luabridge_output_dirname_str
\str_gset:NV
\g_luabridge_output_dirname_str
\markdownOptionOutputDir
\ExplSyntaxOff
\usepackage{markdown}
\begin{document}
\begin{markdown}
- item1
- item11
- item12
- item2
- item21
- item22
\end{markdown}
\end{document}
I am glad that worked! I plan to look at fixing this issue in the package later today. In addition to the issues from https://github.com/Witiko/markdown/issues/457#issuecomment-2203637382, we need a better tests for -output-directory
, so that we don't see similar silent regressions in the future.
markdown works well before but I met following mistake after upgrading.
markdown1.log
I use latex with latexmk and I could see markdown1.luabridge.lua in latex.out folder. I guess texlua should use latex.out/markdown1.luabridge.lua? but texlua is trying to use ./markdown1.luabridge.lua. I has configured "\def\markdownOptionOutputDir{latex.out}" to indicate output folder but seems texlua doesn't notice it.
here comes my .latexmkrc content: