]> git.donarmstrong.com Git - lib.git/blobdiff - emacs_el/configuration/org-mode-configuration.el
bind C-x g to magit status globally
[lib.git] / emacs_el / configuration / org-mode-configuration.el
index 4cc28134efb64fca9cfd48ceb0ae7e399f3e6f37..b58a00d23ebe8a81f6993bf8ad9d80b899241378 100644 (file)
@@ -580,11 +580,13 @@ Maildir, or by Message-ID."
 
 ;; Originally taken from Bruno Tavernier: http://thread.gmane.org/gmane.emacs.orgmode/31150/focus=31432
 ;; but adapted to use latexmk 4.22 or higher.  
-(setq org-latex-pdf-process '("latexmk -pdflatex=xelatex -bibtex -use-make -pdf %f"))
+(setq org-latex-pdf-process '("latexmk -f -pdflatex=xelatex -bibtex -use-make -pdf %f"))
 
 ;; Default packages included in /every/ tex file, latex, pdflatex or xelatex
 (setq org-latex-default-packages-alist
-      '(("" "amsmath" t)))
+      '(("" "amsmath" t)
+        ("" "unicode-math" t)
+        ))
 (setq org-latex-packages-alist
       '(("" "graphicx" t)
         ("" "fontspec" t)
@@ -1053,6 +1055,22 @@ same directory as the org-buffer and insert a link to this file."
 
 (add-hook 'org-babel-after-execute-hook 'my/fix-inline-images)
 
+;; use xelatex to preview with imagemagick
+(add-to-list 'org-preview-latex-process-alist
+             '(xelateximagemagick
+              :programs ("xelatex" "convert")
+              :description "pdf > png"
+              :message "you need to install xelatex and imagemagick"
+              :use-xcolor t
+              :image-input-type "pdf"
+              :image-output-type "png"
+              :image-size-adjust (1.0 . 1.0)
+              :latex-compiler ("xelatex -interaction nonstopmode -output-directory %o %f")
+              :image-converter ("convert -density %D -trim -antialias %f -quality 100 %O"))
+             )
+;; use xelatex by default
+(setq org-preview-latex-default-process 'xelateximagemagick)
+
 ; from http://orgmode.org/Changes.html
 (defun my/org-repair-property-drawers ()
   "Fix properties drawers in current buffer.