From 2adfdac23bca4b80cf3162a0c2b5d95712b32e6c Mon Sep 17 00:00:00 2001 From: Jambunathan K Date: Sun, 28 Aug 2011 01:48:25 +0530 Subject: [PATCH] Run org-export-odt-preprocess-latex-fragments only if backend is odt * contrib/lisp/org-odt.el (org-export-odt-do-preprocess-latex-fragments): Renamed from org-export-odt-preprocess-latex-fragments. (org-export-odt-preprocess-latex-fragments): Check that backend is odt. If yes, delegate to org-export-odt-do-preprocess-latex-fragments. --- contrib/lisp/org-odt.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/lisp/org-odt.el b/contrib/lisp/org-odt.el index 9c81e8423..a5b2d96ba 100644 --- a/contrib/lisp/org-odt.el +++ b/contrib/lisp/org-odt.el @@ -1651,7 +1651,7 @@ visually." (defvar org-lparse-latex-fragment-fallback) ; set by org-do-lparse (defvar org-lparse-opt-plist) ; bound during org-do-lparse -(defun org-export-odt-preprocess-latex-fragments () +(defun org-export-odt-do-preprocess-latex-fragments () "Convert LaTeX fragments to images." (let* ((latex-frag-opt (plist-get org-lparse-opt-plist :LaTeX-fragments)) (latex-frag-opt-1 ; massage the options @@ -1673,6 +1673,10 @@ visually." org-current-export-dir nil "Creating LaTeX image %s" nil nil latex-frag-opt-1)))) +(defun org-export-odt-preprocess-latex-fragments () + (when (equal org-export-current-backend 'odt) + (org-export-odt-do-preprocess-latex-fragments))) + (defun org-export-odt-preprocess-label-references () (goto-char (point-min)) (let (label label-components category value pretty-label)