일부 오류가 있지만 Emacs에서는 lualatex에 대해 오류가 발생하지 않습니다.

일부 오류가 있지만 Emacs에서는 lualatex에 대해 오류가 발생하지 않습니다.

파일을 생성하는 경우:

\documentclass{article}

\begin{document}

Hello
\directlua{tex.sprint("Yeahhh"+thisvariabledoesnotexist)}

\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-engine: luatex
%%% End:

, 파일을 되돌리고 emacs( C-c C-c LaTeX)에서 Auctex로 컴파일합니다.아니다오류가 발생하지만 thisvariabledoesnotexist존재하지 않으므로 오류를 인쇄해야 합니다.

emacs에서 로그를 확인하면 다음을 볼 수 있습니다.

Running `LaTeX' on `lettre_gutenberg' with ``lualatex --jobname=lettre_gutenberg  -file-line-error   --synctex=1 -interaction=nonstopmode lettre_gutenberg.tex''
This is LuaHBTeX, Version 1.15.0 (Web2C 2022/nixos.org) 
 restricted system commands enabled.
(./lettre_gutenberg.tex
LaTeX2e <2022-11-01> patch level 1
 L3 programming layer <2022-12-17>
(/nix/store/6z1x24dwqp88qh769isg4y769w47d1x2-texlive-combined-2022/share/texmf/tex/latex/base/article.cls
Document Class: article 2022/07/02 v1.4n Standard LaTeX document class

(/nix/store/6z1x24dwqp88qh769isg4y769w47d1x2-texlive-combined-2022/share/texmf/tex/latex/base/size10.clo
luaotfload | db : Reload initiated (formats: otf,ttf,ttc); reason: File not found: "lmroman10-regular".))
(/nix/store/6z1x24dwqp88qh769isg4y769w47d1x2-texlive-combined-2022/share/texmf/tex/latex/l3backend/l3backend-luatex.def) (./lettre_gutenberg.aux)
(/nix/store/6z1x24dwqp88qh769isg4y769w47d1x2-texlive-combined-2022/share/texmf/tex/latex/base/ts1cmr.fd)[\directlua]:1: attempt to perform arithmetic on a string value
stack traceback:
    [\directlua]:1: in main chunk.
l.7 ...ex.sprint("Yeahhh"+thisvariabledoesnotexist)}
                                                  
[1{/nix/store/6z1x24dwqp88qh769isg4y769w47d1x2-texlive-combined-2022/share/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./lettre_gutenberg.aux))
(see the transcript file for additional information)
 406 words of node memory still in use:
   3 hlist, 1 vlist, 1 rule, 2 glue, 3 kern, 1 glyph, 4 attribute, 48 glue_spec, 4 attribute_list, 1 write nodes
   avail lists: 2:23,3:4,4:2,5:22,6:2,7:40,9:18
</nix/store/6z1x24dwqp88qh769isg4y769w47d1x2-texlive-combined-2022/share/texmf/fonts/opentype/public/lm/lmroman10-regular.otf>
Output written on lettre_gutenberg.pdf (1 page, 2869 bytes).
SyncTeX written on lettre_gutenberg.synctex.gz.
Transcript written on lettre_gutenberg.log.

TeX Output exited abnormally with code 1 at Fri Dec 22 22:38:19

따라서 오류가 존재하므로 분명히 올바르게 구문 분석되지 않은 것 같습니다(그리고 TeX exited abnormallyEmacs에도 불구하고 여전히 "성공적으로 형식화되었습니다"라고 표시됩니다). 이 문제를 해결하는 방법을 알고 있나요?

다른 LaTeX 오류는 ERROR: Undefined control sequence. \foo예상대로 인쇄됩니다.

관련 정보