]> git.donarmstrong.com Git - emacs.git/commitdiff
use latexmk for everything; fix package list
authorDon Armstrong <don@donarmstrong.com>
Wed, 15 Jan 2014 03:42:01 +0000 (19:42 -0800)
committerDon Armstrong <don@donarmstrong.com>
Wed, 15 Jan 2014 03:42:01 +0000 (19:42 -0800)
.emacs

diff --git a/.emacs b/.emacs
index 350375cf61d01d4697e385535893b15447f62ae3..d56140bc9f20880f371801fc87fe322df659313a 100644 (file)
--- a/.emacs
+++ b/.emacs
@@ -631,7 +631,7 @@ Argument DESCRIPTION MIME description."
 ;; default listings package instead, use
 ;; (setq org-latex-listings t)
 ;; and change references to "minted" below to "listings"
 ;; default listings package instead, use
 ;; (setq org-latex-listings t)
 ;; and change references to "minted" below to "listings"
-(setq org-latex-listings 'minted)
+(setq org-latex-listings 'minted)
 
 ;; default settings for minted code blocks
 (setq org-latex-minted-options
 
 ;; default settings for minted code blocks
 (setq org-latex-minted-options
@@ -675,43 +675,23 @@ Argument DESCRIPTION MIME description."
 
 ;; Originally taken from Bruno Tavernier: http://thread.gmane.org/gmane.emacs.orgmode/31150/focus=31432
 ;; but adapted to use latexmk 4.22 or higher.  
 
 ;; Originally taken from Bruno Tavernier: http://thread.gmane.org/gmane.emacs.orgmode/31150/focus=31432
 ;; but adapted to use latexmk 4.22 or higher.  
-(defun my-auto-tex-cmd ()
-  "When exporting from .org with latex, automatically run latex,
-                     pdflatex, or xelatex as appropriate, using latexmk."
-  (let ((texcmd)))
-  ;; default command: pdflatex 
-  (setq texcmd "latexmk -pdflatex='pdflatex -synctex=1 --shell-escape --' -pdf %f")        
-  ;; pdflatex -> .pdf
-  (if (string-match "LATEX_CMD: pdflatex" (buffer-string))
-      (setq texcmd "latexmk -pdflatex='pdflatex -synctex=1 --shell-escape' -pdf %f"))
-  ;; xelatex -> .pdf
-  (if (string-match "LATEX_CMD: xelatex" (buffer-string))
-      (setq texcmd "latexmk -pdflatex='xelatex -syntex=1 --shell-escape' -bibtex -use-make -pdf %f"))
-  ;; LaTeX compilation command
-  (setq org-latex-to-pdf-process (list texcmd)))
-
-(add-hook 'org-latex-after-initial-vars-hook 'my-auto-tex-cmd)
+(setq org-latex-pdf-process '("latexmk -pdflatex=xelatex -bibtex -use-make -pdf %f"))
 
 ;; Default packages included in /every/ tex file, latex, pdflatex or xelatex
 
 ;; Default packages included in /every/ tex file, latex, pdflatex or xelatex
+(setq org-latex-default-packages-alist
+      '(("" "fontspec" t)
+        ("" "xunicode" t)
+        ))
 (setq org-latex-packages-alist
       '(("" "graphicx" t)
 (setq org-latex-packages-alist
       '(("" "graphicx" t)
+        ("" "fontspec" t)
+        ("" "xunicode" t)
+        ("" "hyperref" t)
+        ("" "url" t)
+        ("" "rotating" t)
         ("" "longtable" nil)
         ("" "float" )))
 
         ("" "longtable" nil)
         ("" "float" )))
 
-;; Custom packages
-(defun my-auto-tex-parameters ()
-  "Automatically select the tex packages to include. See https://github.com/kjhealy/latex-custom-kjh for the support files included here."
-  ;; default packages for ordinary latex or pdflatex export
-  (setq org-latex-default-packages-alist
-        '(("AUTO" "inputenc" t)
-          ("minted,minion" "org-preamble-pdflatex" t)))        
-  ;; Packages to include when xelatex is used
-  (if (string-match "LATEX_CMD: xelatex" (buffer-string))
-      (setq org-latex-default-packages-alist
-            '(("minted" "org-preamble-xelatex" t) ))))
-
-(add-hook 'org-latex-after-initial-vars-hook 'my-auto-tex-parameters)
-
 ; support ignoring headers in org mode export to latex
 ; from http://article.gmane.org/gmane.emacs.orgmode/67692
 (defadvice org-latex-headline (around my-latex-skip-headlines
 ; support ignoring headers in org mode export to latex
 ; from http://article.gmane.org/gmane.emacs.orgmode/67692
 (defadvice org-latex-headline (around my-latex-skip-headlines