瀏覽代碼

Merge branch 'maint'

Bastien Guerry 12 年之前
父節點
當前提交
ad9ca25d86
共有 1 個文件被更改,包括 10 次插入1 次删除
  1. 10 1
      lisp/org-html.el

+ 10 - 1
lisp/org-html.el

@@ -464,6 +464,9 @@ precedence over this variable."
 (defcustom org-export-html-preamble-format '(("en" ""))
   "Alist of languages and format strings for the HTML preamble.
 
+To enable the HTML exporter to use these formats, you need to set
+`org-export-html-preamble' to `t'.
+
 The first element of each list is the language code, as used for
 the #+LANGUAGE keyword.
 
@@ -510,6 +513,9 @@ precedence over this variable."
 "))
   "Alist of languages and format strings for the HTML postamble.
 
+To enable the HTML exporter to use these formats, you need to set
+`org-export-html-postamble' to `t'.
+
 The first element of each list is the language code, as used for
 the #+LANGUAGE keyword.
 
@@ -1030,7 +1036,10 @@ OPT-PLIST is the export options list."
 	  (if (string-match "^file:" desc)
 	      (setq desc (substring desc (match-end 0)))))
 	(setq desc (org-add-props
-		       (concat "<img src=\"" desc "\" alt=\""
+		       (concat "<img src=\"" desc "\" "
+			       (when (save-match-data (string-match "width=" attr))
+				 (prog1 (concat attr " ") (setq attr "")))
+			       "alt=\""
 			       (file-name-nondirectory desc) "\"/>")
 		       '(org-protected t))))
       (cond