diff options
author | Bastien Guerry <bzg@altern.org> | 2013-03-01 13:57:54 +0100 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2013-03-01 13:57:54 +0100 |
commit | cfe1d9a9fcb7f9249c4b9def3a39d3861f515ed0 (patch) | |
tree | d31596a26f5bd1dec7b313991716fa7fc0397409 | |
parent | 25b5ab8a23470e8c06bd652c1eef66a016d84b58 (diff) | |
download | org-mode-cfe1d9a9fcb7f9249c4b9def3a39d3861f515ed0.tar.gz |
ox-html.el: Fix document structure for org-info.js compatibility.
* ox-html.el (org-html-inner-template): Add the document title
here, within the "content" class, as the org-info.js needs it.
(org-html-template): Don't include the document's title here.
(org-html-format-inlinetask-function): Remove wrong example.
Although counter-intuitive and certainly weird, the
<h1 class="title"> string needs to be within the "content"
div, not before it. We would need the developer of org-info.js
to update org-info.js to put the title outside of "content".
-rw-r--r-- | lisp/ox-html.el | 32 |
1 files changed, 5 insertions, 27 deletions
diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 710009a..1533dd1 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -388,29 +388,7 @@ The function must accept six parameters: TAGS the inlinetask tags, as a list of strings. CONTENTS the contents of the inlinetask, as a string. -The function should return the string to be exported. - -For example, the variable could be set to the following function -in order to mimic default behaviour: - -\(defun org-html-format-inlinetask \(todo type priority name tags contents\) -\"Format an inline task element for HTML export.\" - \(let \(\(full-title - \(concat - \(when todo - \(format \"\\\\textbf{\\\\textsf{\\\\textsc{%s}}} \" todo)) - \(when priority (format \"\\\\framebox{\\\\#%c} \" priority)) - title - \(when tags (format \"\\\\hfill{}\\\\textsc{%s}\" tags))))) - \(format (concat \"\\\\begin{center}\\n\" - \"\\\\fbox{\\n\" - \"\\\\begin{minipage}[c]{.6\\\\textwidth}\\n\" - \"%s\\n\\n\" - \"\\\\rule[.8em]{\\\\textwidth}{2pt}\\n\\n\" - \"%s\" - \"\\\\end{minipage}}\" - \"\\\\end{center}\") - full-title contents))" +The function should return the string to be exported." :group 'org-export-html :type 'function) @@ -1323,6 +1301,10 @@ CONTENTS is the transcoded contents string. INFO is a plist holding export options." (concat (format "<div id=\"%s\">\n" (nth 1 org-html-divs)) + ;; Document title. + (let ((title (plist-get info :title))) + (when title + (format "<h1 class=\"title\">%s</h1>\n" (org-export-data title info)))) ;; Table of contents. (let ((depth (plist-get info :with-toc))) (when depth (org-html-toc depth info))) @@ -1370,10 +1352,6 @@ holding export options." (or link-home link-up)))) ;; Preamble. (org-html--build-preamble info) - ;; Document title. - (let ((title (plist-get info :title))) - (when title - (format "<h1 class=\"title\">%s</h1>\n" (org-export-data title info)))) ;; Document contents. contents ;; Postamble. |