From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Abd=C3=B3?= Roig-Maranges Subject: Problem with ltxpng path for html and odt exports Date: Thu, 13 Sep 2012 23:28:30 +0200 Message-ID: <87y5kdsjcx.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:51347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCGxl-000696-Su for emacs-orgmode@gnu.org; Thu, 13 Sep 2012 17:28:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCGxj-0007i5-Vt for emacs-orgmode@gnu.org; Thu, 13 Sep 2012 17:28:41 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:58843) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCGxj-0007hb-OY for emacs-orgmode@gnu.org; Thu, 13 Sep 2012 17:28:39 -0400 Received: by wibhn17 with SMTP id hn17so3326356wib.12 for ; Thu, 13 Sep 2012 14:28:38 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Here is a patch fixing a bug introduced in commit 8474115b20ff2ac907d62f30a0f543064318f47d. That commit added a config variable with the path for the ltxpng directory (latex images) but didn't take into account html and odt exports. Abd=C3=B3 Roig. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=ltxpng.patch Content-Description: the patch >From 02435c7ac59611278d49b8499ce117033b415d86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abd=C3=B3=20Roig-Maranges?= Date: Thu, 13 Sep 2012 22:35:44 +0200 Subject: [PATCH] Fixes ltxpng path for html and odt exports Commit 8474115b20ff2ac907d62f30a0f543064318f47d breaks latex image exports as html and odt. This fixes it. * org-html.el (org-export-html-preprocess): replaces explicit "ltxpng/" (org-export-html-format-image): replaces "^ltxpng/" regexp. * org-odt.el (org-export-odt-do-preprocess-latex-fragments): replaces "ltxpng/" --- lisp/org-html.el | 4 ++-- lisp/org-odt.el | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/org-html.el b/lisp/org-html.el index 209e3ec..79b0286 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -763,7 +763,7 @@ The default is an extended format of the ISO 8601 specification." (when (and org-current-export-file (plist-get parameters :LaTeX-fragments)) (org-format-latex - (concat "ltxpng/" (file-name-sans-extension + (concat org-latex-preview-ltxpng-directory (file-name-sans-extension (file-name-nondirectory org-current-export-file))) org-current-export-dir nil "Creating LaTeX image %s" @@ -2031,7 +2031,7 @@ PUB-DIR is set, use this as the publishing directory." (defun org-export-html-format-image (src par-open) "Create image tag with source and attributes." (save-match-data - (if (string-match "^ltxpng/" src) + (if (string-match (regexp-quote org-latex-preview-ltxpng-directory) src) (format "\"%s\"/" src (org-find-text-property-in-string 'org-latex-src src)) (let* ((caption (org-find-text-property-in-string 'org-caption src)) diff --git a/lisp/org-odt.el b/lisp/org-odt.el index c3fc325..e7d4e31 100644 --- a/lisp/org-odt.el +++ b/lisp/org-odt.el @@ -2658,7 +2658,7 @@ using `org-open-file'." cache-dir display-msg) (cond ((eq latex-frag-opt 'dvipng) - (setq cache-dir "ltxpng/") + (setq cache-dir org-latex-preview-ltxpng-directory) (setq display-msg "Creating LaTeX image %s")) ((member latex-frag-opt '(mathjax t)) (setq latex-frag-opt 'mathml) -- 1.7.12 --=-=-=--