I installed Emacs with AUCTex using the following code in Ubuntu 13.10:
sudo apt-get install texlive-base emacs23 auctex preview-latex
I followed these instructions, but the Code that should be copied to the ~/.emacs
file issues an error:
Warning (initialization): An error occurred while loading `/home/dbelal/.emacs':
Symbol's value as variable is void: ’LaTeX-mode-hook
To ensure normal operation, you should investigate and remove the cause of the error in
your initialization file. Start Emacs with the `--debug-init' option to view a
complete error backtrace.
The ~/.emacs
file contains:
;;For Auctex < 11.82 exchange ";;" in the following 2 lines
;;(require ’tex-site)
(load "auctex.el" nil t t)
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq TeX-PDF-mode t) ;; .pdf instead of .dvi per default:
2;;Zeilenumbruch
(add-hook ’LaTeX-mode-hook ’turn-on-auto-fill)
;;Syntax Higlighting
(add-hook ’LaTeX-mode-hook ’turn-on-font-lock)
;; Math Mode
(add-hook ’LaTeX-mode-hook ’LaTeX-math-mode)
;; loading Reftex
(setq reftex-plug-into-AUCTeX t)
(add-hook ’LaTeX-mode-hook ’turn-on-reftex)
;; Satzende ". " statt ". ". " f¨ur M-k: l¨oschen bis Satzende usw.
(setq sentence-end "[.?!][]\"’)}]*\\($\\| \\| \\)[
;;]*") ;; Da ist ein "Newline in der Zeile!"
(setq sentence-end-double-space nil)
;;german spell correction
;;(add-hook ’LaTeX-mode-hook ’flyspell-mode)
;; Use only with Auctex > 11.81 with preview-latex:
(load "preview-latex.el" nil t t)
;; aspell is better than ispell.
;; Comment line if not installed
(setq-default ispell-program-name "aspell")
;; German Spell Correction falls \usepackage{ngerman}
;; oder german benutzt wird
(add-hook ’TeX-language-de-hook
(function (lambda () (ispell-change-dictionary "german8"))))
I am an Emacs beginner. I do not speak Lisp (but C ;-) ).how can I get Emacs and AUCTex up and running?
.emacs
. Welcome to TeX.SE! :)(add-hook ’LaTeX-mode-hook
where it should be:(add-hook 'LaTeX-mode-hook
. Notice that it is a single quotation mark, I am not too sure what your mark is. Of course this correction should be applied all places.apt-get install ...
. Try without any.emacs
file.