Riporto anche io il mio contributo. Queste sono le impostazioni nel fil .emacs in Ubuntu 10.10:
`; lunghezza righe
(setq-default fill-column 72)
; richiede file master
(setq-default TeX-master nil)
; interpretazione logica del sorgente
(setq TeX-parse-self t)
(setq TeX-auto-save t)
; blocca il log e permette di interagire alla presenza di errori
(setq TeX-interactive-mode t)
; Inserimento veloce matematica
(add-hook 'TeX-mode-hook 'LaTeX-math-mode)
; RefTeX
(require 'reftex)
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
(add-hook 'latex-mode-hook 'turn-on-reftex)
(setq reftex-plug-into-AUCTeX t)
; personalizzazione direttamente da emacs
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(LaTeX-indent-environment-list (quote ((“verbatim” current-indentation) (“verbatim*” current-indentation) (“array”) (“displaymath”) (“eqnarray”) (“eqnarray*”) (“equation”) (“equation*”) (“picture”) (“tabbing”) (“table”) (“table*”) (“tabular”) (“tabular*”) (“description” current-indentation) (“itemize” current-indentation) (“lstlistings” current-indentation))))
'(TeX-PDF-mode t);compilazione con PDFLaTeX
'(TeX-command-list (quote ((“TeX” “%(PDF)%(tex) %`%S%(PDFout)%(mode)%' %t” TeX-run-TeX nil (plain-tex-mode texinfo-mode ams-tex-mode) :help “Run plain TeX”) (“LaTeX” “%`%l%(mode)%' %t” TeX-run-interactive nil (latex-mode doctex-mode) :help “Run LaTeX”) (“Makeinfo” “makeinfo %t” TeX-run-interactive nil (texinfo-mode) :help “Run Makeinfo with Info output”) (“Makeinfo HTML” “makeinfo –html %t” TeX-run-compile nil (texinfo-mode) :help “Run Makeinfo with HTML output”) (“AmSTeX” “%(PDF)amstex %`%S%(PDFout)%(mode)%' %t” TeX-run-TeX nil (ams-tex-mode) :help “Run AMSTeX”) (“ConTeXt” “texexec –once –texutil %(execopts)%t” TeX-run-TeX nil (context-mode) :help “Run ConTeXt once”) (“ConTeXt Full” “texexec %(execopts)%t” TeX-run-TeX nil (context-mode) :help “Run ConTeXt until completion”) (“BibTeX” “bibtex %s” TeX-run-BibTeX nil t :help “Run BibTeX”) (“View” “%V” TeX-run-discard-or-function t t :help “Run Viewer”) (“Print” “%p” TeX-run-command t t :help “Print the file”) (“Queue” “%q” TeX-run-background nil t :help “View the printer queue” :visible TeX-queue-command) (“File” “%(o?)dvips %d -o %f ” TeX-run-command t t :help “Generate PostScript file”) (“Index” “makeindex %s” TeX-run-command nil t :help “Create index file”) (“Check” “lacheck %s” TeX-run-compile nil (latex-mode) :help “Check LaTeX file for correctness”) (“Spell” “(TeX-ispell-document \”\”)” TeX-run-function nil t :help “Spell-check the document”) (“Clean” “TeX-clean” TeX-run-function nil t :help “Delete generated intermediate files”) (“Clean All” “(TeX-clean t)” TeX-run-function nil t :help “Delete generated intermediate and output files”) (“Other” “” TeX-run-command t t :help “Run an arbitrary command”))))
'(TeX-debug-bad-boxes t);visualizza numero bad boxes
'(TeX-debug-warnings t);visualizza numero warnings
'(TeX-newline-function (quote newline-and-indent));indenta la nuova linea
'(TeX-show-compilation t)
'(TeX-source-correlate-method (quote synctex));ricerca diretta/inversa
'(TeX-source-correlate-mode t)
'(TeX-source-correlate-start-server t)
'(TeX-view-program-selection (quote (((output-dvi style-pstricks) “dvips and gv”) (output-dvi “xdvi”) (output-pdf “Evince”) (output-html “xdg-open”))))
'(compilation-ask-about-save t)
'(compilation-context-lines nil)
'(compilation-scroll-output (quote first-error))
'(preview-auto-cache-preamble t)
'(preview-inner-environments (quote (“Bmatrix” “Vmatrix” “aligned” “array” “bmatrix” “cases” “gathered” “matrix” “pmatrix” “smallmatrix” “split” “subarray” “vmatrix” “tabular”)))
'(reftex-label-alist (quote ((“lstlisting” 99 “cod:” nil nil (“codice”)) (“\\lstinputlisting[*]{}” 99 “cod:” nil nil (“codice”))))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)`
EDIT: ecco anche le impostazioni per Aquamacs. Preferences.el
`;; This is the Aquamacs Preferences file.
;; Add Emacs-Lisp code here that should be executed whenever
;; you start Aquamacs Emacs. If errors occur, Aquamacs will stop
;; evaluating this file and print errors in the *Messags* buffer.
;; Use this file in place of ~/.emacs (which is loaded as well.)
;;; direct/inverse search whit skim
;; Starts the Emacs server
(server-start)
;; Auto-raise Emacs on activation
(defun raise-emacs-on-aqua()
(shell-command “osascript -e 'tell application \”Emacs\” to activate' &”))
(add-hook 'server-switch-hook 'raise-emacs-on-aqua)
;; The following only works with AUCTeX loaded
(require 'tex-site)
(add-hook 'TeX-mode-hook
(lambda ()
(add-to-list 'TeX-output-view-style
'(“^pdf$” “.”
“/Applications/Skim.app/Contents/SharedSupport/displayline %n %o %b”)))
)
;;; Make emacs aware of multi-file projects
(setq-default TeX-master nil)
;;; Columns of 72 character width
(setq-default fill-column 72)
;;; Auto-save and logical interpretation
(setq TeX-parse-self t)
(setq TeX-auto-save t)
;;; Indentation level = 3
(custom-set-variables '(LaTeX-indent-level 3))
;;; Activate math-mode
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)
;;; Spell check on startup
(add-hook 'TeX-mode-hook 'flyspell-mode)`
e customizations.el
`(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(LaTeX-command “latex”)
'(LaTeX-indent-level 3)
'(TeX-command-list (quote ((“TeX” “%(PDF)%(tex) %`%S%(PDFout)%(mode)%' %t” TeX-run-TeX nil (plain-tex-mode texinfo-mode ams-tex-mode) :help “Run plain TeX”) (“LaTeX” “%`%l%(mode)%' %t” TeX-run-TeX nil (latex-mode doctex-mode) :help “Run LaTeX”) (“Makeinfo” “makeinfo %t” TeX-run-compile nil (texinfo-mode) :help “Run Makeinfo with Info output”) (“Makeinfo HTML” “makeinfo –html %t” TeX-run-compile nil (texinfo-mode) :help “Run Makeinfo with HTML output”) (“AmSTeX” “%(PDF)amstex %`%S%(PDFout)%(mode)%' %t” TeX-run-TeX nil (ams-tex-mode) :help “Run AMSTeX”) (“ConTeXt” “texexec –once –texutil %(execopts)%t” TeX-run-TeX nil (context-mode) :help “Run ConTeXt once”) (“ConTeXt Full” “texexec %(execopts)%t” TeX-run-TeX nil (context-mode) :help “Run ConTeXt until completion”) (“BibTeX” “bibtex %s” TeX-run-BibTeX nil t :help “Run BibTeX”) (“View” “%V” TeX-run-discard-or-function nil t :help “Run Viewer”) (“Print” “%p” TeX-run-command t t :help “Print the file”) (“Queue” “%q” TeX-run-background nil t :help “View the printer queue” :visible TeX-queue-command) (“File” “%(o?)dvips %d -o %f ” TeX-run-command t t :help “Generate PostScript file”) (“Index” “makeindex %s” TeX-run-command nil t :help “Create index file”) (“Check” “lacheck %s” TeX-run-compile nil (latex-mode) :help “Check LaTeX file for correctness”) (“Spell” “(TeX-ispell-document \”\”)” TeX-run-function nil t :help “Spell-check the document”) (“Clean” “TeX-clean” TeX-run-function nil t :help “Delete generated intermediate files”) (“Clean All” “(TeX-clean t)” TeX-run-function nil t :help “Delete generated intermediate and output files”) (“Other” “” TeX-run-command t t :help “Run an arbitrary command”) (“Jump to PDF” “%V” TeX-run-discard-or-function nil t :help “Run Viewer”))))
'(TeX-debug-warnings t)
'(TeX-newline-function (quote newline-and-indent))
'(TeX-view-program-selection (quote ((output-dvi “open”) (output-pdf-skim-running “Skim”) (output-pdf “Skim”) (output-html “open”))))
'(aquamacs-additional-fontsets nil t)
'(aquamacs-customization-version-id 210 t)
'(aquamacs-tool-bar-user-customization nil t)
'(ns-alternate-modifier nil)
'(ns-right-command-modifier (quote meta))
'(ns-tool-bar-display-mode (quote both) t)
'(ns-tool-bar-size-mode (quote regular) t)
'(visual-line-mode nil t))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(latex-mode-default ((t (:inherit text-mode-default :stipple nil :strike-through nil :underline nil :slant normal :weight normal :height 130 :width normal :family “Monaco”))))
'(text-mode-default ((t (:inherit autoface-default :stipple nil :strike-through nil :underline nil :slant normal :weight normal :height 130 :width normal :family “Monaco”)))))
`
Le ultime righe servono per settare il font Monaco (monospaced) in modalità testo e latex. Spero di essere stato utile.
Ciao a tutti
Fra