[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 4504473779: ox-latex: Support svg images with unico
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 4504473779: ox-latex: Support svg images with unicode paths |
Date: |
Mon, 25 Jul 2022 10:57:42 -0400 (EDT) |
branch: externals/org
commit 4504473779351ba41b8d8631b25bb1d4f2eaa593
Author: TEC <tec@tecosaur.com>
Commit: TEC <tec@tecosaur.com>
ox-latex: Support svg images with unicode paths
* lisp/ox-latex.el (org-latex--inline-image): Testing with TeXLive 2022
finds that while \includegraphics is fine with unicode characters in the
file path, \includesvg needs \detokenize{...} to prevent errors.
---
lisp/ox-latex.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 0d1d05f748..121a3f84c6 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -2765,7 +2765,12 @@ used as a communication channel."
((string-prefix-p "," options)
(format "[%s]" (substring options 1)))
(t (format "[%s]" options)))
- path))
+ ;; While \includegraphics is fine with unicode in the path,
+ ;; \includesvg is prone to producing errors.
+ (if (and (string-match-p "[^[:ascii:]]" path)
+ (equal filetype "svg"))
+ (concat "\\detokenize{" path "}")
+ path)))
(when (equal filetype "svg")
(setq image-code (replace-regexp-in-string "^\\\\includegraphics"
"\\includesvg"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/org 4504473779: ox-latex: Support svg images with unicode paths,
ELPA Syncer <=