From 93da262266c8eaa12aee290d1d9111cf1bb6e3dd Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Sat, 29 Apr 2017 10:08:48 -0700 Subject: [PATCH] use xelatex for previewing --- .../configuration/org-mode-configuration.el | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/emacs_el/configuration/org-mode-configuration.el b/emacs_el/configuration/org-mode-configuration.el index 4cc2813..b5d94a2 100644 --- a/emacs_el/configuration/org-mode-configuration.el +++ b/emacs_el/configuration/org-mode-configuration.el @@ -584,7 +584,9 @@ Maildir, or by Message-ID." ;; 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. -- 2.39.2