XeTeX 卡在文章文档类上,而 LaTeX-Mk 与 XeLaTeX 配合使用效果很好

XeTeX 卡在文章文档类上,而 LaTeX-Mk 与 XeLaTeX 配合使用效果很好

我有这个代码:

\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

相关内容