Just started using Emacs for editing my .tex documents after a long time away. I am rusty.
I installed auctex and setup my environment nicely. Most things are working, but the fly in the ointment is this pesky preview-latex mode. I can't seem to switch this ugly mess off. I am using latex-preview-pane in the right panel, so am able to view the PDF. I just want to see the actual unformatted (except by me) text without any preview elements in the left panel. Right now, I have a LaTeXised form of \dagger showing up where my \cite strings should be, my superscripts are showing up as (ugly) superscripts in the text window, I{} showing up for \textit{}, triangles at \begin \end sequences, etc. I just need the plain text of my document back, no interpreted crap added.
I have tried to use the Emacs menu to switch this disgusting stuff off Preview>Remove previews>from document (also tried from buffer). It does not remove this junk.
How do I disable preview-latex?
My .emacs:
(package-initialize)
(prefer-coding-system 'utf-8)
(add-to-list 'load-path "~/Private/etc/emacsd/")
(pdf-tools-install)
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)
(add-hook 'LaTeX-mode-hook 'visual-line-mode)
(add-hook 'LaTeX-mode-hook 'flyspell-mode)
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)
(add-hook 'TeX-mode-hook 'zotelo-minor-mode)
(add-hook 'LaTeX-mode-hook 'latex-preview-pane-mode)
(add-hook 'LaTeX-mode-hook #'rainbow-delimiters-mode)
(add-hook 'LaTeX-mode-hook 'magic-latex-buffer)
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
(setq reftex-plug-into-AUCTeX t)
(setq TeX-PDF-mode t)
(setq bibtex-completion-pdf-field "file")
;;Eliminates the necessity for the save command before compilation is completed
(setq TeX-save-query nil)
;;Function that combines two commands 1. revert pdfoutput buffer 2. pdf-outline
(defun my-TeX-revert-document-buffer (file)
(TeX-revert-document-buffer file)
(pdf-outline))
;; Add custom function to the TeX compilation hook
(add-hook 'TeX-after-compilation-finished-functions #'my-TeX-revert-document-buffer)
magic-latex-buffer
, maybe? AFAICS, you are blamingpreview-latex
for things it has nothing to do with (that you added yourself!).(setq font-latex-fontify-script nil)
. With a .emacs containing only(add-to-list 'load-path "/path/to/auctex") (require 'tex-site) (setq font-latex-fontify-script nil)
, this works. After changing the value, either restart Emacs or useM-x revert-buffer
.