فهرست منبع

New option `org-export-latex-link-with-unknown-path-format'.

* org-latex.el
(org-export-latex-link-with-unknown-path-format): New option.
(org-export-latex-links): Use it.

Thanks to Sébastien Vauban for a preliminary patch for this.
Bastien Guerry 13 سال پیش
والد
کامیت
872516b8f9
1فایلهای تغییر یافته به همراه8 افزوده شده و 2 حذف شده
  1. 8 2
      lisp/org-latex.el

+ 8 - 2
lisp/org-latex.el

@@ -634,6 +634,12 @@ and `org-export-with-tags' instead."
   :version "24.1"
   :version "24.1"
   :type 'string)
   :type 'string)
 
 
+(defcustom org-export-latex-link-with-unknown-path-format "\\texttt{%s}"
+  "Format string for links with unknown path type."
+  :group 'org-export-latex
+  :version "24.2"
+  :type 'string)
+
 (defcustom org-export-latex-inline-image-extensions
 (defcustom org-export-latex-inline-image-extensions
   '("pdf" "jpeg" "jpg" "png" "ps" "eps")
   '("pdf" "jpeg" "jpg" "png" "ps" "eps")
   "Extensions of image files that can be inlined into LaTeX.
   "Extensions of image files that can be inlined into LaTeX.
@@ -2328,8 +2334,8 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
 	      (insert
 	      (insert
 	       (save-match-data
 	       (save-match-data
 		 (funcall fnc (org-link-unescape raw-path) desc 'latex))))
 		 (funcall fnc (org-link-unescape raw-path) desc 'latex))))
-
-	     (t (insert "\\texttt{" desc "}")))))))
+	     ;; Unrecognized path type
+	     (t (insert (format org-export-latex-link-with-unknown-path-format desc))))))))
 
 
 
 
 (defun org-export-latex-format-image (path caption label attr &optional shortn)
 (defun org-export-latex-format-image (path caption label attr &optional shortn)