
Windows では次のコマンドを問題なく使用できます。
latexmk -lualatex -shell-escape "xxx.tex"
ただし、ファイル名に中国語の文字が含まれている場合は失敗します。
latexmk -lualatex -shell-escape "中文.tex"
デフォルトのコード ページを 65001 に変更してみましたが、効果はありませんでした。唯一の違いは、すべての中国語の文字が奇妙な文字ではなくブロックとして表示されるようになったことです。
どうすれば機能するのでしょうか?
出力は次のようになります (奇妙な文字 ���� に注意してください)。
Latexmk: This is Latexmk, John Collins, 17 March 2019, version: 4.63b.
Latexmk: In reading rule 'lualatex' in 'c:/Users/Jeff/thesis2.0/����NodeJs�ĵ��̴���ϵͳ�����ʵ��.fdb_latexmk',
destination has different name than configured...
Rule 'lualatex': File changes, etc:
Changed files, or newly in use since previous run(s):
'chapter4/sku-lock-design.tex'
...
----------------------
C:\texlive\2019\bin\win32\runscript.tlu:907: command failed with exit code 12:
perl.exe c:\texlive\2019\texmf-dist\scripts\latexmk\latexmk.pl -lualatex -shell-escape -enable-write18 -synctex=1 -interaction=nonstopmode -outdir=c:/Users/Jeff/thesis2.0 -f ����NodeJs�ĵ��̴���ϵͳ�����ʵ��
答え1
2020 年 5 月に texlive 2020 に、utf8 ファイル名に対する luatex の正しいサポートが追加されました。それ以前は機能していませんでした。
現在の texlive 2020 では、lualatex を使用して中国語のファイル名のファイルを問題なく実行できます。
This is LuaHBTeX, Version 1.12.0 (TeX Live 2020/W32TeX) (format=lualatex 2020.9.14) 19 SEP 2020 21:18
restricted system commands enabled.
**中文.tex
(./中文.tex
...
Output written on 中文.pdf (1 page, 2891 bytes).
しかしlatexmk
失敗します:
C:\Users\XXXX\Documents\tests>latexmk -lualatex 中文.tex
Rc files read:
NONE
Latexmk: This is Latexmk, John Collins, 13 September 2020, version: 4.70a.
Latexmk: Filename '5%.tex' contains character not allowed for TeX file.
Latexmk: Stopping because of bad filename(s).