summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdó Roig-Maranges <abdo.roig@gmail.com>2012-08-01 19:24:50 +0200
committerBastien Guerry <bzg@altern.org>2012-08-03 19:53:43 +0200
commitdd49e0b225b050d633453558025ebf6931a0d7f6 (patch)
tree86b43a914bb176dac6e1a032de8d8c8b8aa6d60c
parent96551f3dd8885dee6972c70ce06888fd3d5f4dd4 (diff)
downloadorg-mode-dd49e0b225b050d633453558025ebf6931a0d7f6.tar.gz
Option to chose directory for latex preview images
* org.el (org-latex-preview-ltxpng-directory): New option. (org-preview-latex-fragment): Store LaTeX preview images in `org-latex-preview-ltxpng-directory'. Added an option `org-latex-preview-ltxpng-directory' with a path where the preview images will be stored. The default does not change (small little ltxpng scattered all over the place) but now the user can chose an absolute path and put all the images on a single place. TINYCHANGE
-rw-r--r--lisp/org.el12
1 files changed, 10 insertions, 2 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 85370f5..2d96416 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -3419,6 +3419,14 @@ imagemagick Convert the LaTeX fragments to pdf files and use imagemagick
(const :tag "dvipng" dvipng)
(const :tag "imagemagick" imagemagick)))
+(defcustom org-latex-preview-ltxpng-directory "ltxpng/"
+ "Path to store latex preview images. A relative path here creates many
+ directories relative to the processed org files paths. An absolute path
+ puts all preview images at the same place."
+ :group 'org-latex
+ :version "24.2"
+ :type 'string)
+
(defun org-format-latex-mathml-available-p ()
"Return t if `org-latex-to-mathml-convert-command' is usable."
(save-match-data
@@ -17163,8 +17171,8 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]."
(narrow-to-region beg end)
(goto-char beg)
(org-format-latex
- (concat "ltxpng/" (file-name-sans-extension
- (file-name-nondirectory
+ (concat org-latex-preview-ltxpng-directory (file-name-sans-extension
+ (file-name-nondirectory
buffer-file-name)))
default-directory 'overlays msg at 'forbuffer
org-latex-create-formula-image-program)