 ;; desktop
 (desktop-save-mode t)
 
+;;; ** ELPA
+
+(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
+			 ;; ("marmalade" . "http://marmalade-repo.org/packages/")
+			 ("melpa" . "http://melpa.org/packages/")
+			 ("org" . "http://orgmode.org/elpa/")))
 ;;; * Packages
 
 (package-initialize)


;;; ** auctex
;;set xetex mode in tex/latex
(add-hook 'LaTeX-mode-hook
	  (lambda()
	    (add-to-list 'TeX-command-list '("XeLaTeX" "%`xelatex%(mode)%' %t" TeX-run-TeX nil t))
	    (setq TeX-command-default "XeLaTeX")
	    (setq TeX-save-query nil)
	    (setq TeX-show-compilation t)
	    ))
(setq LaTeX-item-indent 0)
(setq TeX-newline-function 'newline-and-indent)

;;; ** perl


;; (add-to-list 'org-latex-packages-alist '("" "color"))

;; reftex settings
(use-package reftex
  :commands turn-on-reftex
  :init
  (setq reftex-plug-into-AUCTeX t))

(defun org-mode-reftex-setup ()
  ;; (load-library "reftex")
  (require 'reftex)
