* Problem with ltxpng path for html and odt exports
@ 2012-09-13 21:28 Abdó Roig-Maranges
2012-09-14 7:38 ` Bastien
0 siblings, 1 reply; 2+ messages in thread
From: Abdó Roig-Maranges @ 2012-09-13 21:28 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 256 bytes --]
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ó Roig.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: the patch --]
[-- Type: text/x-patch, Size: 2215 bytes --]
From 02435c7ac59611278d49b8499ce117033b415d86 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Abd=C3=B3=20Roig-Maranges?= <abdo.roig@gmail.com>
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 "<img src=\"%s\" alt=\"%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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: Problem with ltxpng path for html and odt exports
2012-09-13 21:28 Problem with ltxpng path for html and odt exports Abdó Roig-Maranges
@ 2012-09-14 7:38 ` Bastien
0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2012-09-14 7:38 UTC (permalink / raw)
To: Abdó Roig-Maranges; +Cc: emacs-orgmode
Hi Abdó,
Abdó Roig-Maranges <abdo.roig@gmail.com> writes:
> 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.
Applied, thanks.
(PS: I edited the changelog a bit, please see my edits for further
commits and ChangeLogs.)
--
Bastien
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-14 7:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-13 21:28 Problem with ltxpng path for html and odt exports Abdó Roig-Maranges
2012-09-14 7:38 ` Bastien
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).