|
|
@ -48,13 +48,14 @@ Enables linking to said headers from within the document"
|
|
|
|
"This is the same as `ox-slimhtml-paragraph' but doesn't add a
|
|
|
|
"This is the same as `ox-slimhtml-paragraph' but doesn't add a
|
|
|
|
<p> before export-snippet blocks like #+begin_src .... #+end_src"
|
|
|
|
<p> before export-snippet blocks like #+begin_src .... #+end_src"
|
|
|
|
(when contents
|
|
|
|
(when contents
|
|
|
|
(if (or (ox-slimhtml--immediate-child-of-p paragraph 'item)
|
|
|
|
(cond
|
|
|
|
(ox-slimhtml--immediate-child-of-p paragraph 'special-block)
|
|
|
|
((or (ox-slimhtml--immediate-child-of-p paragraph 'item)
|
|
|
|
(ox-slimhtml--has-immediate-child-of-p paragraph 'export-snippet))
|
|
|
|
(ox-slimhtml--immediate-child-of-p paragraph 'special-block)
|
|
|
|
contents
|
|
|
|
(ox-slimhtml--has-immediate-child-of-p paragraph 'export-snippet))
|
|
|
|
(if (ox-slimhtml--has-immediate-child-of-p paragraph 'link)
|
|
|
|
contents)
|
|
|
|
(format "<p>%s</p>" contents)
|
|
|
|
((ox-slimhtml--has-immediate-child-of-p paragraph 'link)
|
|
|
|
(format "<p%s>%s</p>" (ox-slimhtml--attr paragraph) contents)))))
|
|
|
|
(format "<p>%s</p>" contents))
|
|
|
|
|
|
|
|
(t (format "<p%s>%s</p>" (ox-slimhtml--attr paragraph) contents)))))
|
|
|
|
|
|
|
|
|
|
|
|
(defun ox-plumhtml-table (table contents info)
|
|
|
|
(defun ox-plumhtml-table (table contents info)
|
|
|
|
(format "<table>%s</table>" contents))
|
|
|
|
(format "<table>%s</table>" contents))
|
|
|
@ -104,7 +105,7 @@ Uses <th> for table headers"
|
|
|
|
(org-export-read-attribute 'attr_html `(nil
|
|
|
|
(org-export-read-attribute 'attr_html `(nil
|
|
|
|
(attr_html ,(split-string attributes))))))))
|
|
|
|
(attr_html ,(split-string attributes))))))))
|
|
|
|
(when (not (org-export-low-level-p headline info))
|
|
|
|
(when (not (org-export-low-level-p headline info))
|
|
|
|
(if ox-plumhtml-export-header-ids
|
|
|
|
(if (plist-get info :export-header-ids)
|
|
|
|
(format "<h%d id=\"%s\">%s</h%d>%s" level (org-export-get-reference headline info) text level (or contents ""))
|
|
|
|
(format "<h%d id=\"%s\">%s</h%d>%s" level (org-export-get-reference headline info) text level (or contents ""))
|
|
|
|
(format "<h%d%s>%s</h%d>%s" level (or attributes "") text level (or contents ""))))))
|
|
|
|
(format "<h%d%s>%s</h%d>%s" level (or attributes "") text level (or contents ""))))))
|
|
|
|
|
|
|
|
|
|
|
@ -139,7 +140,7 @@ INFO is a plist holding contextual information."
|
|
|
|
path))
|
|
|
|
path))
|
|
|
|
attributes contents)))
|
|
|
|
attributes contents)))
|
|
|
|
((and (string= "fuzzy" link-type)
|
|
|
|
((and (string= "fuzzy" link-type)
|
|
|
|
ox-plumhtml-export-header-ids)
|
|
|
|
(plist-get info :export-header-ids))
|
|
|
|
(format "<a href=\"#%s\"%s>%s</a>"
|
|
|
|
(format "<a href=\"#%s\"%s>%s</a>"
|
|
|
|
(org-export-get-reference (org-export-resolve-fuzzy-link link info) info)
|
|
|
|
(org-export-get-reference (org-export-resolve-fuzzy-link link info) info)
|
|
|
|
attributes contents))
|
|
|
|
attributes contents))
|
|
|
@ -148,6 +149,12 @@ INFO is a plist holding contextual information."
|
|
|
|
;; org-export backend and export/publish functions
|
|
|
|
;; org-export backend and export/publish functions
|
|
|
|
(org-export-define-derived-backend 'plumhtml
|
|
|
|
(org-export-define-derived-backend 'plumhtml
|
|
|
|
'slimhtml
|
|
|
|
'slimhtml
|
|
|
|
|
|
|
|
:menu-entry
|
|
|
|
|
|
|
|
'(?p "Export to plumhtml"
|
|
|
|
|
|
|
|
((?H "As plumhtml buffer" ox-slimhtml-export-as-html)
|
|
|
|
|
|
|
|
(?h "As plumhtml file" ox-slimhtml-export-to-html)))
|
|
|
|
|
|
|
|
:options-alist
|
|
|
|
|
|
|
|
'((:export-header-ids "PLUMHTML_HEADER_IDS" nil ox-plumhtml-export-header-ids t))
|
|
|
|
:translate-alist
|
|
|
|
:translate-alist
|
|
|
|
'((table . ox-plumhtml-table)
|
|
|
|
'((table . ox-plumhtml-table)
|
|
|
|
(table-row . ox-plumhtml-table-row)
|
|
|
|
(table-row . ox-plumhtml-table-row)
|
|
|
|