emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Open Document Exporter


From: Georg Lehner
Subject: Re: [O] Open Document Exporter
Date: Fri, 28 Jun 2013 23:20:00 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.12) Gecko/20130116 Icedove/10.0.12

Hello!

Here comes another (tiny) patch which fixes generation of external links to relative file paths.

Apparently =./Media/logo.png= has to be inserted as =href=../Media/logo.png=.

At least on LibreOffice 3 and 4 anything else fails. LibreOffice always shows and uses the absolute path and prefixes the stored relative path with the path to the =.odt= file
*including the filename itself*!

So the =../= removes the filename and the link gets calculated correctly.

Best Regards,

    Georg Lehner

- - -

--- /home/jorge/progs/org-mode/lisp/ox-odt.el
+++ /home/jorge/emacs/lib/org-mode/lisp/ox-odt.el
@@ -2763,7 +2780,7 @@
         ((string= type "file")
          (if (file-name-absolute-p raw-path)
              (concat "file://" (expand-file-name raw-path))
-           (concat "file://" raw-path)))
+           (concat "file:" "../" raw-path)))
         (t raw-path)))
      ;; Convert & to & for correct XML representation
      (path (replace-regexp-in-string "&" "&" path))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]