在 Emacs 中编译时无法识别 tufte 讲义文档类

在 Emacs 中编译时无法识别 tufte 讲义文档类

我不明白为什么当我在 Emacs 中编译 tufte 讲义时它无法被识别。那里的标准 tex 引擎是 xetex。我知道这可能是关键问题,但我不知道如何将其更改为 xelatex。例如,我可以通过 pdflatex 命令完美地正确编译文件,但当我使用 AUCTeX/Emacs 命令时它不起作用。

我尝试的是经典的C-c C-c技巧;我收到的输出是一个格式不太好的 pdf。

此外,从猫中提取的资料sample.log显示了以下错误信息:

This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) (preloaded format=pdftex 2017.1.28)  4 FEB 2017 08:37entering extended moderestricted \write18 enabled.
 file:line:error style messages enabled.
 %&-line parsing enabled.
**\input sample-notes-2.tex
(./sample-notes-2.tex
./sample-notes-2.tex:1: Undefined control sequence.
l.1 \documentclass
                  {tufte-handout}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

ETC...

    ### simple group (level 2) entered at line 27 ({)
    ### simple group (level 1) entered at line 27 ({)
    ### bottom level</usr/share/texlive/texmf-          
    dist/fonts/type1/public/amsfonts/cm/c
    mmi10.pfb></usr/share/texlive/texmf-     
    dist/fonts/type1/public/amsfonts/cm/cmr10.p
    fb></usr/share/texlive/texmf-   
    dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb>
    Output written on sample-notes-2.pdf (1 page, 35223 bytes).
    PDF statistics:
   26 PDF objects out of 1000 (max. 8388607)
   13 compressed objects within 1 object stream
   0 named destinations out of 1000 (max. 500000)
   1 words of extra memory for PDF output out of 10000 (max. 10000000)

所以实际上我确实得到了一页 pdf 的输出,但内容却一团糟。

答案1

\documentclass针对 LaTeX 格式定义。您正在尝试使用 XeTeX 处理 LaTeX 格式。请改用 XeLaTeX:

M-x LaTeX-mode RET  ;; my guess is you mistakenly used 'TeX-mode' here
M-x TeX-engine-set RET xetex RET

你的编译缓冲区看起来应该像这样:

Running `LaTeX' on `temp-file--65261vvi' with ``xelatex  -file-line-error   -interaction=nonstopmode "\input" temp-file--65261vvi.tex''
This is XeTeX, Version 3.14159265-2.6-0.99996 (TeX Live 2016) (preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
LaTeX2e <2017/01/01> patch level 1
Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.
(./temp-file--65261vvi.tex
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/size10.clo))
(./temp-file--65261vvi.aux) [1] (./temp-file--65261vvi.aux) )
Output written on temp-file--65261vvi.pdf (1 page).
Transcript written on temp-file--65261vvi.log.

TeX Output finished at Sat Mar  4 22:21:18

相关内容