diff --git a/contrib/lisp/org-e-html.el b/contrib/lisp/org-e-html.el index d2d88c604..0bac01596 100644 --- a/contrib/lisp/org-e-html.el +++ b/contrib/lisp/org-e-html.el @@ -1062,13 +1062,13 @@ in order to mimic default behaviour: (defcustom org-e-html-quotes '(("fr" - ("\\(\\s-\\|[[(]\\|^\\)\"" . "«~") - ("\\(\\S-\\)\"" . "~»") - ("\\(\\s-\\|(\\|^\\)'" . "'")) + ("\\(\\s-\\|[[(]\\|^\\)\"" . "« ") + ("\\(\\S-\\)\"" . " »") + ("\\(\\s-\\|(\\|^\\)'" . "’")) ("en" - ("\\(\\s-\\|[[(]\\|^\\)\"" . "``") - ("\\(\\S-\\)\"" . "''") - ("\\(\\s-\\|(\\|^\\)'" . "`"))) + ("\\(\\s-\\|[[(]\\|^\\)\"" . "“") + ("\\(\\S-\\)\"" . "”") + ("\\(\\s-\\|(\\|^\\)'" . "‘"))) "Alist for quotes to use when converting english double-quotes. The CAR of each item in this alist is the language code. @@ -1098,99 +1098,6 @@ string defines the replacement string for this quote." ;;; Internal Functions (HTML) -(defun org-e-html-cvt-org-as-html (opt-plist type path) - "Convert an org filename to an equivalent html filename. -If TYPE is not file, just return `nil'. -See variable `org-e-html-link-org-files-as-html'." - (save-match-data - (and - org-e-html-link-org-files-as-html - (string= type "file") - (string-match "\\.org$" path) - (progn - (list - "file" - (concat - (substring path 0 (match-beginning 0)) - "." (plist-get opt-plist :html-extension))))))) - -(defun org-e-html-format-org-link (opt-plist type-1 path fragment desc attr - descp) - "Make an HTML link. -OPT-PLIST is an options list. -TYPE is the device-type of the link (THIS://foo.html). -PATH is the path of the link (http://THIS#location). -FRAGMENT is the fragment part of the link, if any (foo.html#THIS). -DESC is the link description, if any. -ATTR is a string of other attributes of the \"a\" element." - (declare (special org-lparse-par-open)) - (save-match-data - (let* ((may-inline-p - (and (member type-1 '("http" "https" "file")) - (org-lparse-should-inline-p path descp) - (not fragment))) - (type (if (equal type-1 "id") "file" type-1)) - (filename path) - ;;First pass. Just sanity stuff. - (components-1 - (cond - ((string= type "file") - (list - type - ;;Substitute just if original path was absolute. - ;;(Otherwise path must remain relative) - (if (file-name-absolute-p path) - (concat "file://" (expand-file-name path)) - path))) - ((string= type "") - (list nil path)) - (t (list type path)))) - - ;;Second pass. Components converted so they can refer - ;;to a remote site. - (components-2 - (or - (and org-e-html-cvt-link-fn - (apply org-e-html-cvt-link-fn - opt-plist components-1)) - (apply #'org-e-html-cvt-org-as-html - opt-plist components-1) - components-1)) - (type (first components-2)) - (thefile (second components-2))) - - - ;;Third pass. Build final link except for leading type - ;;spec. - (cond - ((or - (not type) - (string= type "http") - (string= type "https") - (string= type "file") - (string= type "coderef")) - (if fragment - (setq thefile (concat thefile "#" fragment)))) - - (t)) - - ;;Final URL-build, for all types. - (setq thefile - (let - ((str (org-xml-format-href thefile))) - (if (and type (not (or (string= "file" type) - (string= "coderef" type)))) - (concat type ":" str) - str))) - - (if may-inline-p - (ignore) ;; (org-e-html-format-image thefile) - (org-lparse-format - 'LINK (org-xml-format-desc desc) thefile attr))))) - -;; (caption (and caption (org-xml-encode-org-text caption))) -;; alt = (file-name-nondirectory path) - (defun org-e-html-format-inline-image (src &optional caption label attr standalone-p) (let* ((id (if (not label) "" @@ -1356,25 +1263,16 @@ that uses these same face definitions." headline info 'org-e-html-format-toc-headline) (org-export-get-relative-level headline info))))) (when toc-entries - (let* ((lang-specific-heading - (nth 3 (or (assoc (plist-get info :language) - org-export-language-setup) - (assoc "en" org-export-language-setup))))) - (concat - "
%s: %s
" (nth 2 lang-words) date)) +%s: %s
" (org-e-html--translate "Date" info) date)) (when (and (plist-get info :with-author) author) (format " - " (nth 1 lang-words) author)) + " (org-e-html--translate "Author" info) author)) (when (and (plist-get info :with-email) email) (format "%s
" email)) @@ -1658,7 +1547,7 @@ This function shouldn't be used for floats. See ;; default postamble (t (format-spec - (or (cadr (assoc (nth 0 lang-words) + (or (cadr (assoc (plist-get info :language) org-e-html-postamble-format)) (cadr (assoc "en" org-e-html-postamble-format))) `((?a . ,author) (?e . ,email) @@ -1741,6 +1630,21 @@ original parsed data. INFO is a plist holding export options." "