mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-29 20:07:46 +00:00
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.
This commit is contained in:
parent
eb5622b7ad
commit
4504473779
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue