
Ubuntu 13.10에서 다음 코드를 사용하여 AUCTex와 함께 Emacs를 설치했습니다.
sudo apt-get install texlive-base emacs23 auctex preview-latex
나는 팔로우했다이것들지침을 따르지만 파일에 복사해야 하는 코드에서 ~/.emacs
오류가 발생합니다.
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.
파일 ~/.emacs
에는 다음이 포함됩니다.
;;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"))))
저는 Emacs 초보자입니다. 저는 Lisp를 할 줄 모릅니다(그러나 C ;-)). Emacs와 AUCTex를 어떻게 시작하고 실행할 수 있습니까?
답변1
파일 .emacs
에 구문 오류가 있습니다. 평가하는 모든 줄은 (십진수 값 39) 문자를 사용하지 않고 ASCII가 아닌 문자를 add-hook
사용합니다 . '
(저는 PDF 지침의 복사하여 붙여넣기 때문이라는 @zeroth의 추측에 동의합니다.)
모든 를 ’
로 바꾸면 '
이 문제가 해결됩니다.
(이것이 중요한 이유는 Elisp 프로그래밍 언어(Emacs에서 구성을 위해 사용되는 것)가 '
프로그래밍 언어의 함수로 정의하기 때문입니다. 다른 문자에는 연관된 함수나 값이 없습니다. 평가되는 함수 기능 입니다 quote
- 인용은 여기서 실제로 관련이 없다고 생각하는 주제이며 작은 주제도 아닙니다. 관심이 있는 경우 다음에서 읽을 수 있습니다.인용에 관한 Elisp 매뉴얼 섹션(또는 Lisp 계열 언어의 다른 언어로 인용하는 것에 대한 토론에서))