![XeTeX 卡在文章文档类上,而 LaTeX-Mk 与 XeLaTeX 配合使用效果很好](https://linux22.com/image/332768/XeTeX%20%E5%8D%A1%E5%9C%A8%E6%96%87%E7%AB%A0%E6%96%87%E6%A1%A3%E7%B1%BB%E4%B8%8A%EF%BC%8C%E8%80%8C%20LaTeX-Mk%20%E4%B8%8E%20XeLaTeX%20%E9%85%8D%E5%90%88%E4%BD%BF%E7%94%A8%E6%95%88%E6%9E%9C%E5%BE%88%E5%A5%BD.png)
我有这个代码:
\documentclass{article}
\usepackage{fontspec}
\begin{document}
\thispagestyle{empty}
\pagestyle{empty}
äätewää--llll
\end{document}
特克斯
xetex xetex-acutex.tex
生成:
(甚至xetex -recorder xetex-acutex.tex
如此,因为 latexmk 使用它 - 请参阅其日志)
This is XeTeX, Version 3.14159265-2.6-0.99992 (TeX Live 2015/dev/Debian) (preloaded format=xetex)
restricted \write18 enabled.
entering extended mode
(./xetex-acutex.tex
! Undefined control sequence.
l.1 \documentclass
{article}
? X
No pages of output.
Transcript written on xetex-acutex.log.
LaTeX 的 Mk
latexmk -xelatex xetex-acutex.tex
生成:
Latexmk: This is Latexmk, John Collins, 10 Nov 2013, version: 4.39.
**** Report bugs etc to John Collins <collins at phys.psu.edu>. ****
Latexmk: applying rule 'pdflatex'...
Rule 'pdflatex': File changes, etc:
Changed files, or newly in use since previous run(s):
'xetex-acutex.tex'
------------
Run number 1 of rule 'pdflatex'
------------
------------
Running 'xelatex -recorder "xetex-acutex.tex"'
------------
This is XeTeX, Version 3.14159265-2.6-0.99992 (TeX Live 2015/dev/Debian) (preloaded format=xelatex)
restricted \write18 enabled.
entering extended mode
(./xetex-acutex.tex
LaTeX2e <2014/05/01>
Babel <3.9l> and hyphenation patterns for 79 languages loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3-code.tex
(/usr/share/texlive/texmf-dist/tex/latex/etex-pkg/etex.sty))
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3unicode-data.def)
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3xdvipdfmx.def))
(/usr/share/texlive/texmf-dist/tex/latex/l3packages/xparse/xparse.sty)
(/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec-patches.sty)
(/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty
(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty
(/usr/share/texlive/texmf-dist/tex/latex/euenc/eu1enc.def)
(/usr/share/texlive/texmf-dist/tex/latex/euenc/eu1lmr.fd))
(/usr/share/texlive/texmf-dist/tex/xelatex/xunicode/xunicode.sty
(/usr/share/texmf/tex/latex/tipa/t3enc.def
(/usr/share/texlive/texmf-dist/tex/latex/euenc/eu1lmss.fd))
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg)
(/usr/share/texlive/texmf-dist/tex/xelatex/xetex-def/xetex.def))))
(/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.cfg)))
(./xetex-acutex.aux) (/usr/share/texmf/tex/latex/tipa/t3cmr.fd) [1]
(./xetex-acutex.aux) )
Output written on xetex-acutex.pdf (1 page).
Transcript written on xetex-acutex.log.
Latexmk: Log file says output to 'xetex-acutex.pdf'
Latexmk: All targets (xetex-acutex.pdf) are up-to-date
要怎么做才能让 XeTeX 也能完美运行?为什么 XeTeX 的代码有问题?
答案1
这非常类似于pdfTeX 和 pdfLaTeX 有什么区别?,因为你混淆了普通的 TeX 格式和 LaTeX 格式。唯一的区别是使用的“引擎”:另一个问题是关于 pdfTeX,这里你使用的是 XeTeX。本质上:
- 文件启动
\documentclass
需要 LaTeX 格式,使用 XeTeX 引擎意味着xelatex
- 文件结尾
\bye
需要纯 TeX 格式,使用 XeTeX 引擎意味着xetex