;; ==================================================================== ;; Change directories appropriately in all of these ;; Also, note the warning below for the MiKTeX commands. ;; ==================================================================== (setq load-path (cons "c:/apps/emacs-21.1/site-lisp/" load-path)) (load-file "c:/apps/emacs-21.1/site-lisp/tex-site.el") (setq bib-bibtex-env-variable "TEXBIB") (setq bib-bibtex-env-variable "e:/tex/localtexmf/bibtex/") (custom-set-variables '(reftex-default-bibliography (quote ("c:\\tex\\localtexmf\\bibtex\\allrefs.bib"))) '(search-whitespace-regexp "[ ]+") '(reftex-cite-format (quote harvard)) '(reftex-bibpath-environment-variables (quote ("BIBINPUT")))) (defvar TeX-macro-global '("d:/tex/texmf/tex/latex/") "*Directories containing the sites TeX macro files and style files.") (defvar TeX-lisp-directory "c:/apps/emacs-21.1/site-lisp/auctex/" "*The directory where the AUC TeX lisp files are located.") ;; ===================================================================== ;; DISPLAY -- Set the font to Courier-12 -- Set Colors appropriately ;; MODIFY TO SET WIDTH, HEIGHT and POSITION APPROPRIATELY ;; ===================================================================== (setq default-frame-alist '((top . 0) (left . 670) (width . 80) (height . 65) (foreground-color . "midnight blue") (background-color . "old lace") (font . "-*-Courier New-normal-r-*-*-12-*-*-*-*-c-*-*-ansi-"))) (set-face-foreground 'modeline "firebrick") (set-cursor-color "firebrick") ;; show column number in status bar (setq column-number-mode t) ;; ==================================================================== ;; Standard Auctex commands ;; ==================================================================== (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; AUCTeX LaTeX mode (add-hook 'latex-mode-hook 'turn-on-reftex) ; Emacs latex mode ;; ==================================================================== ;; The MikTeX commands. ;; -- You may need to remove single quotes from LaTeX command below ;; ==================================================================== ;; The MikTeX commands. (setq TeX-command-list (list (list "TeX" "tex \\nonstopmode\\input %t" 'TeX-run-TeX nil t) (list "LaTeX" "%l '\\nonstopmode\\input{%t}'" 'TeX-run-LaTeX nil t) (list "View" "yap -1 -s \"%n %t\" %d" 'TeX-run-discard nil nil) (list "Yap" "%v" 'TeX-run-discard nil nil) (list "Print" "gsview32 %f" 'TeX-run-command t nil) (list "File" "dvips %d -o %f " 'TeX-run-command t nil) (list "BibTeX" "bibtex %s" 'TeX-run-BibTeX nil nil) (list "Index" "makeindex %s" 'TeX-run-command nil t) (list "PDFLaTeX" "pdflatex %t" 'TeX-run-LaTeX nil t) (list "Acrobat" "c:/Program Files/Adobe/Acrobat 4.0/Acrobat/Acrobat.exe %s" 'TeX-run-discard nil nil) (list "Check" "lacheck %s" 'TeX-run-compile nil t) (list "Other" "" 'TeX-run-command t t))) (setq load-path (append load-path (list TeX-lisp-directory))) ; ; this turns on the feature where you hit "`" and then a letter to get ; latex math symbol ; (setq LaTeX-math-mode t) ;; ==================================================================== ;; Text Highlighting Commands ;; ==================================================================== ; Show matching parentheses (show-paren-mode 1) ; Turn on auto-fill mode (setq auto-fill-mode t) ; for syntax highlighting (setq font-lock-maximum-decoration t) (global-font-lock-mode 1 t) ;; ==================================================================== ;; My commands ;; ==================================================================== (setq auto-save-interval 1000) (setq dired-listing-switches "-alt") (add-hook 'latex-mode-hook (function (lambda () (setq paragraph-start "^[ \t\n]") (setq paragraph-separate "\\(\n\n+\\)\\|\\(\n+[ \t]+\\)") ))) (global-set-key "\C-xb" 'buffer-menu) (define-key global-map "\C-c1" 'ispell-word ) (define-key global-map "\C-c2" 'ispell-region ) (define-key global-map "\C-c3" 'ispell-buffer ) ;; ====================================================================== ;; THIS TURNS ON FLYSPELL MODE -- (Warning == This slows things down a lot!!) ;; ====================================================================== (add-hook 'text-mode-hook 'flyspell-mode) ;; ===================================================================== ;; MODE LINE ;; ===================================================================== ;; I like to know what time it is. These lines show the clock in the ;; status bar. Comment out first line if you prefer to show time in 12 ;; hour format (setq display-time-24hr-format t) (setq display-time-day-and-date t) (display-time) ;; ===================================================================== ;; for matlab mode (version 2.2.3) ;; ===================================================================== (autoload 'matlab-mode "matlab" "Enter Matlab mode." t) (setq auto-mode-alist (cons '("\\.m\\'" . matlab-mode) auto-mode-alist)) (autoload 'matlab-shell "matlab" "Interactive Matlab mode." t) ;; User Level customizations (You need not use them all): (setq matlab-indent-function t) ; if you want function bodies indented ;; (setq matlab-verify-on-save-flag nil) ; turn off auto-verify on save (defun my-matlab-mode-hook () (setq fill-column 86)) ; where auto-fill should wrap ;; (add-hook 'matlab-mode-hook 'my-matlab-mode-hook) ;; (defun my-matlab-shell-mode-hook () ;; '()) ;; (add-hook 'matlab-shell-mode-hook 'my-matlab-shell-mode-hook)