diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2013-03-27 23:24:50 +0100 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2013-03-27 23:24:50 +0100 |
commit | 2746c764c64daf7898eaf0925a6e2685e568bc86 (patch) | |
tree | b8b823e06426c09611ada16db7724b7ee4db3e89 | |
parent | 7f9893887e2d656db9ecee2f9ccf3e3510c10f17 (diff) | |
download | org-mode-2746c764c64daf7898eaf0925a6e2685e568bc86.tar.gz |
ox-latex: Do not prefix relative paths with "file://"
* lisp/ox-latex.el (org-latex-link): Do not prefix relative paths with
"file://".
-rw-r--r-- | lisp/ox-latex.el | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 77d1b2f..8727adc 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -1915,9 +1915,8 @@ INFO is a plist holding contextual information. See ((member type '("http" "https" "ftp" "mailto")) (concat type ":" raw-path)) ((string= type "file") - (if (file-name-absolute-p raw-path) - (concat "file://" (expand-file-name raw-path)) - (concat "file://" raw-path))) + (if (not (file-name-absolute-p raw-path)) raw-path + (concat "file://" (expand-file-name raw-path)))) (t raw-path))) protocol) (cond @@ -1940,8 +1939,8 @@ INFO is a plist holding contextual information. See (case (org-element-type destination) ;; Id link points to an external file. (plain-text - (if desc (format "\\href{file://%s}{%s}" destination desc) - (format "\\url{file://%s}" destination))) + (if desc (format "\\href{%s}{%s}" destination desc) + (format "\\url{%s}" destination))) ;; Fuzzy link points nowhere. ('nil (format org-latex-link-with-unknown-path-format |