From: "Abdó Roig-Maranges" <abdo.roig@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Problem with ltxpng path for html and odt exports
Date: Thu, 13 Sep 2012 23:28:30 +0200 [thread overview]
Message-ID: <87y5kdsjcx.fsf@gmail.com> (raw)
[-- 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
next reply other threads:[~2012-09-13 21:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-13 21:28 Abdó Roig-Maranges [this message]
2012-09-14 7:38 ` Problem with ltxpng path for html and odt exports Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y5kdsjcx.fsf@gmail.com \
--to=abdo.roig@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).