I am using AUCTeX with the following configuration.
(require 'tex)
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master "main")
(setq latex-run-command "pdflatex")
Trying to build my document with C-c C-a
gives me the error
ERROR: Undefined control sequence.
--- TeX said ---
l.1 \documentclass{IEEEtran}
My main.tex
file looks like this:
\documentclass{IEEEtran}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[ngerman]{babel}
\usepackage{caption}
\usepackage{graphicx}
\usepackage{import}
\usepackage{url}
\def\UrlBreaks{\do\/\do-}
\renewcommand\_{\textunderscore\allowbreak}
\begin{document}
\title{foo bar}
\author{foo}
\maketitle
\begin{abstract}
\end{abstract}
\begin{IEEEkeywords}
Blockchain
\end{IEEEkeywords}
% Einleitung
\import{./}{intro.tex}
\nocite{*}
\bibliographystyle{unsrt}
\bibliography{references}
\end{document}
Using pdflatex
on the terminal is just working fine.
Why does my emacs
say different? I though internally is just a pdflatex
call and... violá.
C-h v AUCTeX-version RET
) and how did you install it? I suggest you install the latest version via ELPA, drop the lines(require 'tex)
and(setq latex-run-command "pdflatex")
in your.emacs
and try it again. You can also check the output buffer withC-c C-l
to see how TeX was invoked.documentclass
is a LaTeX macro). I don't think you are usingpdflatex
from Emacs when you compile your document. Probably it just calls to something that knows how to process just TeX.C-c C-l
really did the thing.pdflatex
was not correctly included into mypath
inemacs
.