I installed emacs23 on my Ubuntu 13.10 64-bit system. I also downloaded the AucTeX tarball and installed it (./configure
then make
and finally make install
). Now I get the LaTeX commands in the menu of emacs and the key-bindings also work well. But I am able to compile only in LaTeX mode. That is, to generate the pdf I have to go the directory and give pdflatex
command in the terminal. Secondly, I tried the Other option in the compilation in emacs but pdflatex is not present as a command there. I would like to run pdflatex directly instead of LaTeX compilation so that it modifies my pdf. Secondly, I am not able to run XeLaTeX or LuaTeX in emacs as well. These are the compilation options available for me:
Also, I tried a sample code, I am able to compile and get the pdf in the terminal using
latex
and pdflatex
commands but emacs shows me some error.
Here is the code which I ran:
\documentclass[12pt]{article}
\author{Subham Soni S.}
\date{\today}
\title{Installing a new Kernel(ver. 3.13.3) to the Existing Ubuntu Operating System}
\begin{document}
\maketitle
To replace the existing \textsl{kernel} with a new one, do the following:
\begin{enumerate}
\item Download the latest kernel from \texttt{www.kernel.org}, the files will be compressed in tarball.
\end{enumerate}
\end{document}
The contents of my .emacs file are as follows:
(load "auctex.el" nil t t)
(load "preview-latex.el" nil t t)
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)
I would like to make emacs a complete IDE for LaTeX. What do I need to do?
C-c C-c <RET>
, which is what normally runs (some form of) LaTeX, BibTeX, Biber, or View. Also, the clause, "emacs shows me some error", is unclear. What error?(load "preview-latex.el" nil t t)
in your.emacs
, re-open the test file and try to run latex (useC-c C-c
and follow the prompt). If there is an error,C-l
will split the buffer and you can browse the details in the newly opened buffer..emacs
:(setq-default TeX-PDF-mode t)
. This will globally use PDF-mode. Alternatively, you can use the 'Local Variables' setting at the end of each file:%%% Local Variables \n %%% mode: latex \n %%% TeX-PDF-mode: t \n %%% End:
(where\n
= newline; it should not be written explicitly). Similarly, a%%% TeX-engine: luatex
among the Local Variables will set, for that file, LuaTeX as the engine. I think something like(setq TeX-engine 'luatex)
in your.emacs
would set LuaTeX as the default engine for all files, but I'd have to double-check.(setq-default TeX-PDF-mode t)
is the right line to put into your dotfile. If you want to try out the setting in the current buffer:C-c C-t C-p
. Also, please usepackage.el
to install things :) (Just runM-x list-packages
)