diff --git a/lisp/org-html.el b/lisp/org-html.el index 7bb8b61..8aff1c6 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -614,11 +614,6 @@ with a link to this URL." (const :tag "Keep internal css" nil) (string :tag "URL or local href"))) -(defcustom org-export-html-before-content-div "" - "Arbitrary HTML code placed before
." - :group 'org-export-html - :type 'string) - (defcustom org-export-html-content-div "content" "The name of the container DIV that holds all the page contents." :group 'org-export-html @@ -1300,8 +1295,6 @@ lang=\"%s\" xml:lang=\"%s\"> %s -
-%s " (format (or (and (stringp org-export-html-xml-declaration) @@ -1317,8 +1310,6 @@ lang=\"%s\" xml:lang=\"%s\"> date author description keywords style mathjax - org-export-html-before-content-div - org-export-html-content-div (if (or link-up link-home) (concat (format org-export-html-home/up-format @@ -1330,6 +1321,7 @@ lang=\"%s\" xml:lang=\"%s\"> ;; insert html preamble (when (plist-get opt-plist :html-preamble) (let ((html-pre (plist-get opt-plist :html-preamble))) + (insert "
") (cond ((stringp html-pre) (insert (format-spec html-pre `((?t . ,title) (?a . ,author) @@ -1343,8 +1335,13 @@ lang=\"%s\" xml:lang=\"%s\"> org-export-html-preamble-format)) (cadr (assoc "en" org-export-html-preamble-format))) `((?t . ,title) (?a . ,author) - (?d . ,date) (?e . ,email))))))))) + (?d . ,date) (?e . ,email)))))) + (insert "
\n"))) + ;; begin wrap around body + (insert (format "\n
" org-export-html-content-div))) + + ;; insert body (if (and org-export-with-toc (not body-only)) (progn (push (format "%s\n" @@ -1748,8 +1745,11 @@ lang=\"%s\" xml:lang=\"%s\"> (when bib (insert "\n" bib "\n"))) - ;; export html postamble (unless body-only + ;; end wrap around body + (insert "
\n") + + ;; export html postamble (let ((html-post (plist-get opt-plist :html-postamble)) (email (mapconcat (lambda(e) @@ -1759,19 +1759,18 @@ lang=\"%s\" xml:lang=\"%s\"> (creator-info (concat "Org version " org-version " with Emacs version " (number-to-string emacs-major-version)))) + (when (plist-get opt-plist :html-postamble) + (insert "\n
") (cond ((stringp html-post) - (insert "
\n") (insert (format-spec html-post `((?a . ,author) (?e . ,email) (?d . ,date) (?c . ,creator-info) - (?v . ,html-validation-link)))) - (insert "
")) + (?v . ,html-validation-link))))) ((functionp html-post) (funcall html-post)) ((eq html-post 'auto) ;; fall back on default postamble - (insert "
\n") (when (plist-get opt-plist :time-stamp-file) (insert "

" (nth 2 lang-words) ": " date "

\n")) (when (and (plist-get opt-plist :author-info) author) @@ -1782,22 +1781,22 @@ lang=\"%s\" xml:lang=\"%s\"> (insert "

" (concat "Org version " org-version " with Emacs version " (number-to-string emacs-major-version) "

\n"))) - (insert html-validation-link "\n
")) + (insert html-validation-link "\n")) (t - (insert "
\n") (insert (format-spec (or (cadr (assoc (nth 0 lang-words) org-export-html-postamble-format)) (cadr (assoc "en" org-export-html-postamble-format))) `((?a . ,author) (?e . ,email) (?d . ,date) (?c . ,creator-info) - (?v . ,html-validation-link)))) - (insert "
")))))) + (?v . ,html-validation-link)))))) + (insert "
") + ))) (if org-export-html-with-timestamp (insert org-export-html-html-helper-timestamp)) - (unless body-only (insert "\n
\n\n\n")) + (unless body-only (insert "\n\n\n")) (unless (plist-get opt-plist :buffer-will-be-killed) (normal-mode)