我想使用 \input 或 \include 命令来包含一个以 cjk 字符命名的文件。
\documentclass[UTF8]{ctexart}
\title{input with cjk path}
\begin{document}
\maketitle
\input{中文}
\end{document}
而中文.tex 是
hello, world
我尝试过utf8编码,gbk编码,但是xelatex显示同样的错误
LaTeX Error: File `涓枃.tex' not found.
操作系统是 Windows,我使用 xelatex 命令:
xelatex a.tex
我尝试过改变代码页,但仍然不起作用:
chcp 65001
xelatex a.tex
和 a.log 显示
This is XeTeX, Version 3.14159265-2.6-0.99998 (TeX Live 2017/W32TeX)(preloaded format=xelatex 2017.6.21) 3 JUL 2017 20:55
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**./a.tex
(./a.tex
LaTeX2e <2017-04-15>
...
...
...
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 4.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 4.
LaTeX Warning: No \author given.
! LaTeX Error: File `中文.tex' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: tex)
Enter file name: X
)
(\end occurred when \ifx on line 5 was incomplete)
(\end occurred when \ifx on line 5 was incomplete)
Here is how much of TeX's memory you used:
19344 strings out of 493005
406504 string characters out of 6131656
441240 words of memory out of 5000000
23197 multiletter control sequences out of 15000+600000
6602 words of font info for 39 fonts, out of 8000000 for 9000
1348 hyphenation exceptions out of 8191
57i,6n,68p,10436b,270s stack positions out of 5000i,500n,10000p,200000b,80000s
No pages of output.