summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRick Frankel <rick@rickster.com>2013-03-17 12:07:26 -0400
committerRick Frankel <rick@rickster.com>2013-03-17 12:07:26 -0400
commit77e6543f8a2fcd98c8467443966a0f415f3758a9 (patch)
treeb648234b45cd07f7f6a8891815f4a9e20f93dcc4
parent91a6caa6a26431fbcf5d58aed170fa5a83cd78d3 (diff)
downloadorg-mode-77e6543f8a2fcd98c8467443966a0f415f3758a9.tar.gz
Simplfiy setting S5 slideshow type to XOXO.
* contrib/lisp/ox-s5.el (org-s5-template): Set org-html-divs based on :html-container. If it's "li", use XOXO format ("ol"). (org-s5-divs): Changed to internal variable from option and renamed to `org--s5--divs' -- Changing the element type or id of the preamble (header) or postamble (footer) breaks the S5 stylesheets.
-rw-r--r--contrib/lisp/ox-s5.el37
1 files changed, 15 insertions, 22 deletions
diff --git a/contrib/lisp/ox-s5.el b/contrib/lisp/ox-s5.el
index 76f5fa6..ae7e6be 100644
--- a/contrib/lisp/ox-s5.el
+++ b/contrib/lisp/ox-s5.el
@@ -118,31 +118,21 @@ Can be overriden with the S5_UI_URL property."
:group 'org-export-s5
:type '(choice (const hidden) (const visibile)))
-(defcustom org-s5-divs
+(defvar org-s5--divs
'((preamble "div" "header")
(content "div" "content")
(postamble "div" "footer"))
- "Alist of the threed section elements for HTML export.
+ "Alist of the three section elements for HTML export.
The car of each entry is one of 'preamble, 'content or 'postamble.
The cdrs of each entry are the ELEMENT_TYPE and ID for each
section of the exported document.
-Note that changing the defaults for the preamble and postamble
-will break the standard S5 stylesheets. To generate XOXO compatible
-slideshows, change the content ELEMENT_TYPE to \"ul\" or \"ol\"
-and the `org-html-container-element' to \"li\"."
- :group 'org-export-html
- :version "24.4"
- :package-version '(Org . "8.0")
- :type '(list :greedy t
- (list :tag "Preamble"
- (const :format "" preamble)
- (string :tag "element") (string :tag " id"))
- (list :tag "Content"
- (const :format "" content)
- (string :tag "element") (string :tag " id"))
- (list :tag "Postamble" (const :format "" postamble)
- (string :tag " id") (string :tag "element"))))
+If you set `org-html-container-element' to \"li\", \"ol\" will be
+uses as the content ELEMENT_TYPE, generating an XOXO format
+slideshow.
+
+Note that changing the preamble or postamble will break the
+core S5 stylesheets.")
(defcustom org-s5-postamble "<h1>%a - %t</h1>"
"Preamble inserted into the S5 layout section.
@@ -306,7 +296,10 @@ holding export options."
"Return complete document string after HTML conversion.
CONTENTS is the transcoded contents string. INFO is a plist
holding export options."
- (let ((org-html-divs org-s5-divs)
+ (let ((org-html-divs
+ (if (equal (plist-get info :html-container) "li")
+ (append '((content "ol" "content")) org-s5--divs)
+ org-s5--divs))
(info (plist-put
(plist-put info :html-preamble (plist-get info :s5-preamble))
:html-postamble (plist-get info :s5-postamble))))
@@ -330,8 +323,8 @@ holding export options."
(org-html--build-pre/postamble 'postamble info)
"</div>"
(format "<%s id=\"%s\" class=\"presentation\">"
- (nth 1 (assq 'content org-s5-divs))
- (nth 2 (assq 'content org-s5-divs)))
+ (nth 1 (assq 'content org-html-divs))
+ (nth 2 (assq 'content org-html-divs)))
;; title page
(format "<%s id='title-slide' class='slide'>"
(plist-get info :html-container))
@@ -341,7 +334,7 @@ holding export options."
(let ((depth (plist-get info :with-toc)))
(when depth (org-s5-toc depth info)))
contents
- (format "</%s>" (nth 1 (assq 'content org-s5-divs)))
+ (format "</%s>" (nth 1 (assq 'content org-html-divs)))
"</body>"
"</html>\n") "\n")))