[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] RFC: Revisit org-export-content-div (in the context of org-s5)

From: Jambunathan K
Subject: [O] RFC: Revisit org-export-content-div (in the context of org-s5)
Date: Sun, 10 Jul 2011 16:39:48 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (windows-nt)

Couple of comments wrt org-export-content-div:

1. Should be renamed to org-export-html-content-div

2. If we look at org-s5.el[1], we see the following usage where
   apparently <div id="content"> is essentially replaced by "<div
   class="presentation"> with a bunch of leading and trailing stuff.

#+begin_src emacs-lisp
  (lambda ()
       (regexp-quote "<div id=\"content\">")
       (let ((info `(("author" . ,author)
                     ("title" . ,title)
                     ("date" . ,(substring date 0 10)))))
         (join `("<div class=\"layout\">"
                 "<div id=\"controls\"><!-- no edit --></div>"
                 "<div id=\"currentSlide\"><!-- no edit --></div>"
                 "<div id=\"header\"></div>"
                 "<div id=\"footer\">"
                 ,(org-fill-template org-s5-title-string-fmt info)
                 "<div class=\"presentation\">"
                 ,(org-fill-template org-s5-title-page-fmt info)))))))

3. Considering (2) above it might be worthwhile defining the
   customization as below (for a first cut)

#+begin_src emacs-lisp
  (defcustom org-export-html-content-div "%s <div %s> %s" ; note the html in 
    "The name of the container DIV that holds all the page contents."
    :group 'org-export-htmlize
    :type 'string)

With the above re-definition I believe there is an opportunity to suck

#+begin_src emacs-lisp-mode
(if (or link-up link-home)
     (format org-export-html-home/up-format
             (or link-up link-home)
             (or link-home link-up))

and even the entire preamble in to

#+begin_src emacs-lisp
  (when (plist-get opt-plist :html-preamble)
    ;; etc etc etc

the suffix %s in the above custom definition.

Or alternatively

one can suck the suffix "%s" in to preamble string.

Just a thought. WDYT.

Jambunathan K.



[1] https://github.com/eschulte/org-S5/blob/master/org-export-as-s5.el
at around line 60 or so.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]