emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Re: [Orgmode] S5 export
  2011-02-03 17:23 ` Bastien
@ 2011-06-01 12:41   ` Pierre de Buyl
  2011-06-01 18:21     ` Pierre de Buyl
                       ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Pierre de Buyl @ 2011-06-01 12:41 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1006 bytes --]

Hello,

After a lot a reading of org-exp.el and org-html.el I finally figured  
out the
existence of the "HTML_CONTAINER_CLASS" property.

I could then figure a minimal way to make a s5 presentation.
Minimal in the sens of minimum difference with the html exporter.

After setting a few STYLE and OPTIONS lines in an org file,
three steps are needed:
1. Set the HTML_CONTAINER_CLASS to "slide" on level 1 headings
2. Set org-export-html-toplevel-hlevel to "1", so that slide titles  
behave properly
3. Replace in the html output
<div id="content">
by
<div class="layout">
<div id="controls"><!-- DO NOT EDIT --></div>
<div id="currentSlide"><!-- DO NOT EDIT --></div>
<div id="header"></div>
<div id="footer">
<h1>Interactive Python plotting</h1>
</div>
</div>

<div class="presentation">

You need the "ui" directory from the S5 archive to make it work  
indeed, http://meyerweb.com/eric/tools/s5/ .
I attach an example org file and the resulting html (which was  
tweaked according to step 3).

Pierre


[-- Attachment #2: test2.html --]
[-- Type: text/html, Size: 4929 bytes --]

[-- Attachment #3: test2.org --]
[-- Type: application/octet-stream, Size: 1301 bytes --]

#+STYLE: <!-- configuration parameters -->
#+STYLE: <meta name="defaultView" content="slideshow" />
#+STYLE: <meta name="controlVis" content="hidden" />
#+STYLE: <!-- style sheet links -->
#+STYLE: <link rel="stylesheet" href="ui/default/slides.css" type="text/css" media="projection" id="slideProj" />
#+STYLE: <link rel="stylesheet" href="ui/default/outline.css" type="text/css" media="screen" id="outlineStyle" />
#+STYLE: <link rel="stylesheet" href="ui/default/print.css" type="text/css" media="print" id="slidePrint" />
#+STYLE: <link rel="stylesheet" href="ui/default/opera.css" type="text/css" media="projection" id="operaFix" />
#+STYLE: <!-- S5 JS -->
#+STYLE: <script src="ui/default/slides.js" type="text/javascript"></script>
#+OPTIONS: toc:nil author:nil timestamp:nil creator:nil num:nil H:2

* First slide
  :PROPERTIES:
  :HTML_CONTAINER_CLASS: slide
  :END:

  Introductory text.

  - Maybe
  - a
  - list

* Second slide
  :PROPERTIES:
  :HTML_CONTAINER_CLASS: slide
  :END:

  We may present easily source code.

#+begin_src python
  import numpy as np
  print np.pi
#+end_src


* Third slide
  :PROPERTIES:
  :HTML_CONTAINER_CLASS: slide
  :END:

** subheading 1

   Text

** subheading 2
   
   Figure

#+ATTR_HTML: width="500px"
[[http://orgmode.org/img/org-mode-unicorn.png]]


[-- Attachment #4: Type: text/plain, Size: 939 bytes --]



Le 3 févr. 11 à 12:23, Bastien a écrit :

> Hi Pierre,
>
> Pierre de Buyl <pdebuyl@chem.utoronto.ca> writes:
>
>> S5 allows one to present a slideshow in a web browser, even full  
>> screen for
>> some browsers.
>> I know that the topic has come here already, but I actually hacked  
>> the
>> excellent org-html.el export file to produde a S5 slideshow with org.
>
> This looks useful.
>
> By reading your code, I see org-export-as-s5 is a variation over
> org-export-as-html.
>
> I would welcome an approach where we factor out some elements of
> org-export-as-html, so that exporting to s5 would just require the
> user to customize those elements.
>
> Does that seem reasonable to you?  Would you volunteer to make
> org-export-as-html a bit more general?  Even a precise comparison
> of org-export-as-s5 against org-export-as-html would be helpful at
> this point.
>
> Thanks!
>
> -- 
>  Bastien


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Orgmode] S5 export
  2011-06-01 12:41   ` [Orgmode] " Pierre de Buyl
@ 2011-06-01 18:21     ` Pierre de Buyl
  2011-06-01 21:31     ` Eric Schulte
  2011-06-01 22:41     ` Eric Schulte
  2 siblings, 0 replies; 12+ messages in thread
From: Pierre de Buyl @ 2011-06-01 18:21 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1005 bytes --]

Hello,

After a lot a reading of org-exp.el and org-html.el I finally figured  
out the
existence of the "HTML_CONTAINER_CLASS" property.

I could then figure a minimal way to make a s5 presentation.
Minimal in the sens of minimum difference with the html exporter.

After setting a few STYLE and OPTIONS lines in an org file,
three steps are needed:
1. Set the HTML_CONTAINER_CLASS to "slide" on level 1 headings
2. Set org-export-html-toplevel-hlevel to "1", so that slide titles  
behave properly
3. Replace in the html output
<div id="content">
by
<div class="layout">
<div id="controls"><!-- DO NOT EDIT --></div>
<div id="currentSlide"><!-- DO NOT EDIT --></div>
<div id="header"></div>
<div id="footer">
<h1>Interactive Python plotting</h1>
</div>
</div>

<div class="presentation">

You need the "ui" directory from the S5 archive to make it work  
indeed, http://meyerweb.com/eric/tools/s5/ .
I attach an example org file and the resulting html (which was  
tweaked according to step 3).

Pierre

[-- Attachment #2: test2.html --]
[-- Type: text/html, Size: 4929 bytes --]

[-- Attachment #3: test2.org --]
[-- Type: application/octet-stream, Size: 1301 bytes --]

#+STYLE: <!-- configuration parameters -->
#+STYLE: <meta name="defaultView" content="slideshow" />
#+STYLE: <meta name="controlVis" content="hidden" />
#+STYLE: <!-- style sheet links -->
#+STYLE: <link rel="stylesheet" href="ui/default/slides.css" type="text/css" media="projection" id="slideProj" />
#+STYLE: <link rel="stylesheet" href="ui/default/outline.css" type="text/css" media="screen" id="outlineStyle" />
#+STYLE: <link rel="stylesheet" href="ui/default/print.css" type="text/css" media="print" id="slidePrint" />
#+STYLE: <link rel="stylesheet" href="ui/default/opera.css" type="text/css" media="projection" id="operaFix" />
#+STYLE: <!-- S5 JS -->
#+STYLE: <script src="ui/default/slides.js" type="text/javascript"></script>
#+OPTIONS: toc:nil author:nil timestamp:nil creator:nil num:nil H:2

* First slide
  :PROPERTIES:
  :HTML_CONTAINER_CLASS: slide
  :END:

  Introductory text.

  - Maybe
  - a
  - list

* Second slide
  :PROPERTIES:
  :HTML_CONTAINER_CLASS: slide
  :END:

  We may present easily source code.

#+begin_src python
  import numpy as np
  print np.pi
#+end_src


* Third slide
  :PROPERTIES:
  :HTML_CONTAINER_CLASS: slide
  :END:

** subheading 1

   Text

** subheading 2
   
   Figure

#+ATTR_HTML: width="500px"
[[http://orgmode.org/img/org-mode-unicorn.png]]


[-- Attachment #4: Type: text/plain, Size: 941 bytes --]



Le 3 févr. 11 à 12:23, Bastien a écrit :

> Hi Pierre,
>
> Pierre de Buyl <pdebuyl@chem.utoronto.ca> writes:
>
>> S5 allows one to present a slideshow in a web browser, even full  
>> screen for
>> some browsers.
>> I know that the topic has come here already, but I actually hacked  
>> the
>> excellent org-html.el export file to produde a S5 slideshow with org.
>
> This looks useful.
>
> By reading your code, I see org-export-as-s5 is a variation over
> org-export-as-html.
>
> I would welcome an approach where we factor out some elements of
> org-export-as-html, so that exporting to s5 would just require the
> user to customize those elements.
>
> Does that seem reasonable to you?  Would you volunteer to make
> org-export-as-html a bit more general?  Even a precise comparison
> of org-export-as-s5 against org-export-as-html would be helpful at
> this point.
>
> Thanks!
>
> -- 
>  Bastien



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Orgmode] S5 export
  2011-06-01 12:41   ` [Orgmode] " Pierre de Buyl
  2011-06-01 18:21     ` Pierre de Buyl
@ 2011-06-01 21:31     ` Eric Schulte
  2011-06-01 22:41     ` Eric Schulte
  2 siblings, 0 replies; 12+ messages in thread
From: Eric Schulte @ 2011-06-01 21:31 UTC (permalink / raw)
  To: Pierre de Buyl; +Cc: emacs-orgmode

Hi Pierre,

This looks very nice.  Perhaps you could add a function to the
`org-export-html-final-hook' which could perform step 3 below.  With
that in place it shouldn't be difficult to write a self-contained
`org-export-as-s5' function which let-binds the html-final-hook, as well
as some of the style elements included in your example file, and
possibly generates a copy of the ui directory in place.

I would find such a function to be a very useful extension of Org-mode's
existing presentation abilities --- specifically I often find myself
publishing old presentations as sparse-looking web pages.

Cheers -- Eric

Pierre de Buyl <pdebuyl@ulb.ac.be> writes:

> Hello,
>
> After a lot a reading of org-exp.el and org-html.el I finally figured
> out the
> existence of the "HTML_CONTAINER_CLASS" property.
>
> I could then figure a minimal way to make a s5 presentation.
> Minimal in the sens of minimum difference with the html exporter.
>
> After setting a few STYLE and OPTIONS lines in an org file,
> three steps are needed:
> 1. Set the HTML_CONTAINER_CLASS to "slide" on level 1 headings
> 2. Set org-export-html-toplevel-hlevel to "1", so that slide titles
> behave properly
> 3. Replace in the html output
> <div id="content">
> by
> <div class="layout">
> <div id="controls"><!-- DO NOT EDIT --></div>
> <div id="currentSlide"><!-- DO NOT EDIT --></div>
> <div id="header"></div>
> <div id="footer">
> <h1>Interactive Python plotting</h1>
> </div>
> </div>
>
> <div class="presentation">
>
> You need the "ui" directory from the S5 archive to make it work
> indeed, http://meyerweb.com/eric/tools/s5/ .
> I attach an example org file and the resulting html (which was tweaked
> according to step 3).
>
> Pierre
>
>
>
>
>
> Le 3 févr. 11 à 12:23, Bastien a écrit :
>
>> Hi Pierre,
>>
>> Pierre de Buyl <pdebuyl@chem.utoronto.ca> writes:
>>
>>> S5 allows one to present a slideshow in a web browser, even full
>>> screen for
>>> some browsers.
>>> I know that the topic has come here already, but I actually hacked
>>> the
>>> excellent org-html.el export file to produde a S5 slideshow with org.
>>
>> This looks useful.
>>
>> By reading your code, I see org-export-as-s5 is a variation over
>> org-export-as-html.
>>
>> I would welcome an approach where we factor out some elements of
>> org-export-as-html, so that exporting to s5 would just require the
>> user to customize those elements.
>>
>> Does that seem reasonable to you?  Would you volunteer to make
>> org-export-as-html a bit more general?  Even a precise comparison
>> of org-export-as-s5 against org-export-as-html would be helpful at
>> this point.
>>
>> Thanks!
>>
>> -- 
>>  Bastien
>

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Orgmode] S5 export
  2011-06-01 12:41   ` [Orgmode] " Pierre de Buyl
  2011-06-01 18:21     ` Pierre de Buyl
  2011-06-01 21:31     ` Eric Schulte
@ 2011-06-01 22:41     ` Eric Schulte
       [not found]       ` <AAB99C57-C1B0-4C78-90BD-3D9FE1E4958A@ulb.ac.be>
  2 siblings, 1 reply; 12+ messages in thread
From: Eric Schulte @ 2011-06-01 22:41 UTC (permalink / raw)
  To: Pierre de Buyl; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 710 bytes --]

Hi Pierre,

I've taken your very thorough S5 instructions and converted them into a
single `org-export-as-s5' function.  The attached archive file holds an
s5.org Org-mode file which defines this function, as well as the ui
directory required for S5, and an html file which results from calling
the `org-export-as-s5' function in the s5.org file.

For now the results are also posted up at
http://cs.unm.edu/~eschulte/notes/s5/s5.org
http://cs.unm.edu/~eschulte/notes/s5/s5.html

Thanks for the clear explanation which lead to such an easy translation
into elisp.  Please let me know if you think this should be augmented in
any way, or if the defined function throws any errors on your system.

Best -- Eric


[-- Attachment #2: s5.tar.bz2 --]
[-- Type: application/octet-stream, Size: 23317 bytes --]

[-- Attachment #3: Type: text/plain, Size: 2174 bytes --]


Pierre de Buyl <pdebuyl@ulb.ac.be> writes:

> Hello,
>
> After a lot a reading of org-exp.el and org-html.el I finally figured
> out the
> existence of the "HTML_CONTAINER_CLASS" property.
>
> I could then figure a minimal way to make a s5 presentation.
> Minimal in the sens of minimum difference with the html exporter.
>
> After setting a few STYLE and OPTIONS lines in an org file,
> three steps are needed:
> 1. Set the HTML_CONTAINER_CLASS to "slide" on level 1 headings
> 2. Set org-export-html-toplevel-hlevel to "1", so that slide titles
> behave properly
> 3. Replace in the html output
> <div id="content">
> by
> <div class="layout">
> <div id="controls"><!-- DO NOT EDIT --></div>
> <div id="currentSlide"><!-- DO NOT EDIT --></div>
> <div id="header"></div>
> <div id="footer">
> <h1>Interactive Python plotting</h1>
> </div>
> </div>
>
> <div class="presentation">
>
> You need the "ui" directory from the S5 archive to make it work
> indeed, http://meyerweb.com/eric/tools/s5/ .
> I attach an example org file and the resulting html (which was tweaked
> according to step 3).
>
> Pierre
>
>
>
>
>
> Le 3 févr. 11 à 12:23, Bastien a écrit :
>
>> Hi Pierre,
>>
>> Pierre de Buyl <pdebuyl@chem.utoronto.ca> writes:
>>
>>> S5 allows one to present a slideshow in a web browser, even full
>>> screen for
>>> some browsers.
>>> I know that the topic has come here already, but I actually hacked
>>> the
>>> excellent org-html.el export file to produde a S5 slideshow with org.
>>
>> This looks useful.
>>
>> By reading your code, I see org-export-as-s5 is a variation over
>> org-export-as-html.
>>
>> I would welcome an approach where we factor out some elements of
>> org-export-as-html, so that exporting to s5 would just require the
>> user to customize those elements.
>>
>> Does that seem reasonable to you?  Would you volunteer to make
>> org-export-as-html a bit more general?  Even a precise comparison
>> of org-export-as-s5 against org-export-as-html would be helpful at
>> this point.
>>
>> Thanks!
>>
>> -- 
>>  Bastien
>

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Orgmode] S5 export
       [not found]       ` <AAB99C57-C1B0-4C78-90BD-3D9FE1E4958A@ulb.ac.be>
@ 2011-06-03 11:38         ` Pierre de Buyl
  2011-06-03 12:48           ` Eric Schulte
  2011-06-03 13:15           ` Christian Moe
  0 siblings, 2 replies; 12+ messages in thread
From: Pierre de Buyl @ 2011-06-03 11:38 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 805 bytes --]

Hello Eric,

This is amazing, actual emacs lisp code from my explanations, thanks  
a lot!

If welcomed, I have a few comments related to how I currently use  
this function (I have a talk coming soon :-) )

     - If all "star" headlines become slides, it quickly leads to  
awkward layouts with empty slides below one star headings.
       I made a modification to the code to choose only one star  
headings as slides. This way, level 2 headings can be used as "in  
slide" headings.
       I used an (if (looking-at "^\\* ") XXX) in the preprocess hook  
for that.
     - An actual "title page" seems more appropriate, so I added one  
with "title author date" as h1,h2 and h3 headings.

The css need to be tweaked a little bit to get nice results.
My modified org-export-as-s5 function is attached.


[-- Attachment #2: org-export-as-s5.el --]
[-- Type: application/octet-stream, Size: 2393 bytes --]

(defun org-export-as-s5
  (arg &optional hidden ext-plist to-buffer body-only pub-dir)
  "Wrap `org-export-as-html' in setting for S5 export."
  (interactive "P")
  (flet ((join (lst) (mapconcat #'identity lst "\n"))
	 (sheet (href media id)
		(org-fill-template
		 (concat "<link rel=\"stylesheet\" href=\"%href\""
			 " type=\"text/css\" media=\"%media\" id=\"%id\" />")
		 `(("href" . ,href)
		   ("media" . ,media)
		   ("id" . ,id)))))
    (let ((org-export-html-style-extra
	   (join `("<!-- configuration parameters -->"
		   "<meta name=\"defaultView\" content=\"slideshow\" />"
		   "<meta name=\"controlVis\" content=\"hidden\" />"
		   "<!-- style sheet links -->"
		   ,(sheet "ui/default/slides.css" "projection" "slideProj")
		   ,(sheet "ui/default/outline.css" "screen" "outlineStyle")
		   ,(sheet "ui/default/print.css" "print" "slidePrint")
		   ,(sheet "ui/default/opera.css" "projection" "operaFix")
		   "<!-- S5 JS -->"
		   ,(concat "<script src=\"ui/default/slides.js\" "
			    "type=\"text/javascript\"></script>"))))
	  (org-export-html-toplevel-hlevel 1)
	  (org-export-headline-levels 2)
	  (org-export-preprocess-hook
	   (list
	    (lambda ()
	      (let ((class "slide"))
		(org-map-entries
		 (lambda ()
		   (save-excursion ;; from `org-export-remember-html-container-classes'
		     (org-back-to-heading t)
		     (if (looking-at "^\\* ")
			 (put-text-property (point-at-bol) (point-at-eol)
					    'html-container-class class))))))
	      )))

	  (org-export-html-final-hook
	   (list
	    (lambda ()
	      (save-excursion
		(replace-regexp
		 (regexp-quote "<div id=\"content\">")
		 (mapconcat #'identity
			    `("<div class=\"layout\">"
			      "<div id=\"controls\"><!-- no edit --></div>"
			      "<div id=\"currentSlide\"><!-- no edit --></div>"
			      "<div id=\"header\"></div>"
			      "<div id=\"footer\">"
			      ,(format "<h1>%s - %s</h1>" author title)
			      "</div>"
			      "</div>"
			      ""
			      "<div class=\"presentation\">"
			      "<div class=\"slide\">"
			      ,(format "<h1> %s </h1>
<h3> %s </h3>

<h3> %s </h3>" title author date)
			      "</div>") "\n"))))
	    (lambda ()
	      (save-excursion
		(replace-regexp
		 (regexp-quote "<div id=\"table-of-contents\">")
		 "<div id=\"table-of-contents\" class=\"slide\">"))))))
      (org-export-as-html arg hidden ext-plist to-buffer body-only pub-dir))))
  

[-- Attachment #3: Type: text/plain, Size: 3650 bytes --]


I also posted an example online. It it exported from the file s5- 
test.org with the function defined in the attached file. The css is  
very slightly modified.
The "scientific content" of the talk is incomplete, this is normal :-/

http://homepages.ulb.ac.be/~pdebuyl/lectures/s5-test.html
http://homepages.ulb.ac.be/~pdebuyl/lectures/s5-test.org

For those reading, I'll mention that using the html export, as done  
here, allows to include syntax-highlighted code and LaTeX equations  
very easily.

Regards,

Pierre

Le 1 juin 11 à 18:41, Eric Schulte a écrit :

> Hi Pierre,
>
> I've taken your very thorough S5 instructions and converted them  
> into a
> single `org-export-as-s5' function.  The attached archive file  
> holds an
> s5.org Org-mode file which defines this function, as well as the ui
> directory required for S5, and an html file which results from calling
> the `org-export-as-s5' function in the s5.org file.
>
> For now the results are also posted up at
> http://cs.unm.edu/~eschulte/notes/s5/s5.org
> http://cs.unm.edu/~eschulte/notes/s5/s5.html
>
> Thanks for the clear explanation which lead to such an easy  
> translation
> into elisp.  Please let me know if you think this should be  
> augmented in
> any way, or if the defined function throws any errors on your system.
>
> Best -- Eric
>
> <s5.tar.bz2>
> Pierre de Buyl <pdebuyl@ulb.ac.be> writes:
>
>> Hello,
>>
>> After a lot a reading of org-exp.el and org-html.el I finally figured
>> out the
>> existence of the "HTML_CONTAINER_CLASS" property.
>>
>> I could then figure a minimal way to make a s5 presentation.
>> Minimal in the sens of minimum difference with the html exporter.
>>
>> After setting a few STYLE and OPTIONS lines in an org file,
>> three steps are needed:
>> 1. Set the HTML_CONTAINER_CLASS to "slide" on level 1 headings
>> 2. Set org-export-html-toplevel-hlevel to "1", so that slide titles
>> behave properly
>> 3. Replace in the html output
>> <div id="content">
>> by
>> <div class="layout">
>> <div id="controls"><!-- DO NOT EDIT --></div>
>> <div id="currentSlide"><!-- DO NOT EDIT --></div>
>> <div id="header"></div>
>> <div id="footer">
>> <h1>Interactive Python plotting</h1>
>> </div>
>> </div>
>>
>> <div class="presentation">
>>
>> You need the "ui" directory from the S5 archive to make it work
>> indeed, http://meyerweb.com/eric/tools/s5/ .
>> I attach an example org file and the resulting html (which was  
>> tweaked
>> according to step 3).
>>
>> Pierre
>>
>>
>>
>>
>>
>> Le 3 févr. 11 à 12:23, Bastien a écrit :
>>
>>> Hi Pierre,
>>>
>>> Pierre de Buyl <pdebuyl@chem.utoronto.ca> writes:
>>>
>>>> S5 allows one to present a slideshow in a web browser, even full
>>>> screen for
>>>> some browsers.
>>>> I know that the topic has come here already, but I actually hacked
>>>> the
>>>> excellent org-html.el export file to produde a S5 slideshow with  
>>>> org.
>>>
>>> This looks useful.
>>>
>>> By reading your code, I see org-export-as-s5 is a variation over
>>> org-export-as-html.
>>>
>>> I would welcome an approach where we factor out some elements of
>>> org-export-as-html, so that exporting to s5 would just require the
>>> user to customize those elements.
>>>
>>> Does that seem reasonable to you?  Would you volunteer to make
>>> org-export-as-html a bit more general?  Even a precise comparison
>>> of org-export-as-s5 against org-export-as-html would be helpful at
>>> this point.
>>>
>>> Thanks!
>>>
>>> -- 
>>>  Bastien
>>
>
> -- 
> Eric Schulte
> http://cs.unm.edu/~eschulte/



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Orgmode] S5 export
  2011-06-03 11:38         ` Pierre de Buyl
@ 2011-06-03 12:48           ` Eric Schulte
  2011-06-03 13:45             ` Pierre de Buyl
  2011-06-03 13:15           ` Christian Moe
  1 sibling, 1 reply; 12+ messages in thread
From: Eric Schulte @ 2011-06-03 12:48 UTC (permalink / raw)
  To: Pierre de Buyl; +Cc: emacs-orgmode

Hi Pierre,

Pierre de Buyl <pdebuyl@ulb.ac.be> writes:

> Hello Eric,
>
> This is amazing, actual emacs lisp code from my explanations, thanks a
> lot!
>

I'm happy to share it, thanks for the idea and the thorough explanation.

>
> If welcomed, I have a few comments related to how I currently use this
> function (I have a talk coming soon :-) )
>

Certainly, I'm happy to hear your feedback.

I have the most recent version of my code up in a git repository
available at [1], with the file defining the `org-export-as-s5' function
up at [2].

>
>     - If all "star" headlines become slides, it quickly leads to
> awkward layouts with empty slides below one star headings.

Agreed, for this reason `org-export-headline-levels' is set to 1.

> 
>       I made a modification to the code to choose only one star
> headings as slides. This way, level 2 headings can be used as "in
> slide" headings.
>       I used an (if (looking-at "^\\* ") XXX) in the preprocess hook
> for that.

I think using the `org-export-headline-levels' variable should be an
easier way to implement this.  See line 29 of the current code where
this variable is set.

Oh, looking more closely, I see why you've made this change.  Even
though it shouldn't affect the output it seems wasteful to add the
'html-container-class property to non-top-level headlines.  I've added a
slight modification of your change to my code.

> 
>     - An actual "title page" seems more appropriate, so I added one
> with "title author date" as h1,h2 and h3 headings.
>

Great idea.  I've updated my code to include two customizable format
strings (`org-s5-title-string-fmt' and `org-s5-title-page-fmt') which
can be used to specify the title string shown at the bottom of each
page, and the title page respectively.

>
> The css need to be tweaked a little bit to get nice results.
> My modified org-export-as-s5 function is attached.
>
>
>
> I also posted an example online. It it exported from the file s5- 
> test.org with the function defined in the attached file. The css is
> very slightly modified.
> The "scientific content" of the talk is incomplete, this is normal :-/
>
> http://homepages.ulb.ac.be/~pdebuyl/lectures/s5-test.html
> http://homepages.ulb.ac.be/~pdebuyl/lectures/s5-test.org
>

Very nice, I really like the title page addition, and it's great to see
pictures, code and latex equations in a single example presentation.

I have an example with a simple theme I wrote available online [3].
Just yesterday I added a page to Worg [4] with instructions for using
this new function which links to my simple example presentation.  If you
don't mind sharing your example publicly I think it would make a great
addition to this worg page.

In general, I think this new S5 export option is turning into a very
useful addition to Org-mode.

Cheers -- Eric

>
> For those reading, I'll mention that using the html export, as done
> here, allows to include syntax-highlighted code and LaTeX equations
> very easily.
>
> Regards,
>
> Pierre
>
> Le 1 juin 11 à 18:41, Eric Schulte a écrit :
>
>> Hi Pierre,
>>
>> I've taken your very thorough S5 instructions and converted them
>> into a
>> single `org-export-as-s5' function.  The attached archive file holds
>> an
>> s5.org Org-mode file which defines this function, as well as the ui
>> directory required for S5, and an html file which results from calling
>> the `org-export-as-s5' function in the s5.org file.
>>
>> For now the results are also posted up at
>> http://cs.unm.edu/~eschulte/notes/s5/s5.org
>> http://cs.unm.edu/~eschulte/notes/s5/s5.html
>>
>> Thanks for the clear explanation which lead to such an easy
>> translation
>> into elisp.  Please let me know if you think this should be
>> augmented in
>> any way, or if the defined function throws any errors on your system.
>>
>> Best -- Eric
>>
>> <s5.tar.bz2>
>> Pierre de Buyl <pdebuyl@ulb.ac.be> writes:
>>
>>> Hello,
>>>
>>> After a lot a reading of org-exp.el and org-html.el I finally figured
>>> out the
>>> existence of the "HTML_CONTAINER_CLASS" property.
>>>
>>> I could then figure a minimal way to make a s5 presentation.
>>> Minimal in the sens of minimum difference with the html exporter.
>>>
>>> After setting a few STYLE and OPTIONS lines in an org file,
>>> three steps are needed:
>>> 1. Set the HTML_CONTAINER_CLASS to "slide" on level 1 headings
>>> 2. Set org-export-html-toplevel-hlevel to "1", so that slide titles
>>> behave properly
>>> 3. Replace in the html output
>>> <div id="content">
>>> by
>>> <div class="layout">
>>> <div id="controls"><!-- DO NOT EDIT --></div>
>>> <div id="currentSlide"><!-- DO NOT EDIT --></div>
>>> <div id="header"></div>
>>> <div id="footer">
>>> <h1>Interactive Python plotting</h1>
>>> </div>
>>> </div>
>>>
>>> <div class="presentation">
>>>
>>> You need the "ui" directory from the S5 archive to make it work
>>> indeed, http://meyerweb.com/eric/tools/s5/ .
>>> I attach an example org file and the resulting html (which was
>>> tweaked
>>> according to step 3).
>>>
>>> Pierre
>>>
>>>
>>>
>>>
>>>
>>> Le 3 févr. 11 à 12:23, Bastien a écrit :
>>>
>>>> Hi Pierre,
>>>>
>>>> Pierre de Buyl <pdebuyl@chem.utoronto.ca> writes:
>>>>
>>>>> S5 allows one to present a slideshow in a web browser, even full
>>>>> screen for
>>>>> some browsers.
>>>>> I know that the topic has come here already, but I actually hacked
>>>>> the
>>>>> excellent org-html.el export file to produde a S5 slideshow with
>>>>> org.
>>>>
>>>> This looks useful.
>>>>
>>>> By reading your code, I see org-export-as-s5 is a variation over
>>>> org-export-as-html.
>>>>
>>>> I would welcome an approach where we factor out some elements of
>>>> org-export-as-html, so that exporting to s5 would just require the
>>>> user to customize those elements.
>>>>
>>>> Does that seem reasonable to you?  Would you volunteer to make
>>>> org-export-as-html a bit more general?  Even a precise comparison
>>>> of org-export-as-s5 against org-export-as-html would be helpful at
>>>> this point.
>>>>
>>>> Thanks!
>>>>
>>>> -- 
>>>>  Bastien
>>>

Footnotes: 
[1]  http://gitweb.adaptive.cs.unm.edu/org-S5.git

[2]  http://gitweb.adaptive.cs.unm.edu/org-S5.git/blob_plain/HEAD:/org-export-as-s5.el

[3]  http://cs.unm.edu/~eschulte/notes/s5/s5.html

[4]  http://orgmode.org/worg/org-tutorials/non-beamer-presentations.html

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Orgmode] S5 export
  2011-06-03 11:38         ` Pierre de Buyl
  2011-06-03 12:48           ` Eric Schulte
@ 2011-06-03 13:15           ` Christian Moe
  2011-06-03 15:05             ` Eric Schulte
  1 sibling, 1 reply; 12+ messages in thread
From: Christian Moe @ 2011-06-03 13:15 UTC (permalink / raw)
  To: Pierre de Buyl; +Cc: emacs-orgmode

Hi,

I haven't had time to test Eric's solution yet, but I look forward to it.

Have you also tried Yann Hodique's s5 solution for Org? It has some 
Org setup but depends on Javascript to tweak the exported HTML.

http://www.hodique.info/blog/2009/11/14/s5_presentation_from_org-mode

To me, an ideal solution would "know" how to make a sensible s5 
presentation from an ordinary multi-level outline, with occasional TOC 
slides.

Yours,
Christian

On 6/3/11 1:38 PM, Pierre de Buyl wrote:
> Hello Eric,
>
> This is amazing, actual emacs lisp code from my explanations, thanks a
> lot!
>
> If welcomed, I have a few comments related to how I currently use this
> function (I have a talk coming soon :-) )
>
> - If all "star" headlines become slides, it quickly leads to awkward
> layouts with empty slides below one star headings.
> I made a modification to the code to choose only one star headings as
> slides. This way, level 2 headings can be used as "in slide" headings.
> I used an (if (looking-at "^\\* ") XXX) in the preprocess hook for that.
> - An actual "title page" seems more appropriate, so I added one with
> "title author date" as h1,h2 and h3 headings.
>
> The css need to be tweaked a little bit to get nice results.
> My modified org-export-as-s5 function is attached.
>
>
> I also posted an example online. It it exported from the file
> s5-test.org with the function defined in the attached file. The css is
> very slightly modified.
> The "scientific content" of the talk is incomplete, this is normal :-/
>
> http://homepages.ulb.ac.be/~pdebuyl/lectures/s5-test.html
> http://homepages.ulb.ac.be/~pdebuyl/lectures/s5-test.org
>
> For those reading, I'll mention that using the html export, as done
> here, allows to include syntax-highlighted code and LaTeX equations
> very easily.
>
> Regards,
>
> Pierre
>
> Le 1 juin 11 à 18:41, Eric Schulte a écrit :
>
>> Hi Pierre,
>>
>> I've taken your very thorough S5 instructions and converted them into a
>> single `org-export-as-s5' function. The attached archive file holds an
>> s5.org Org-mode file which defines this function, as well as the ui
>> directory required for S5, and an html file which results from calling
>> the `org-export-as-s5' function in the s5.org file.
>>
>> For now the results are also posted up at
>> http://cs.unm.edu/~eschulte/notes/s5/s5.org
>> http://cs.unm.edu/~eschulte/notes/s5/s5.html
>>
>> Thanks for the clear explanation which lead to such an easy translation
>> into elisp. Please let me know if you think this should be augmented in
>> any way, or if the defined function throws any errors on your system.
>>
>> Best -- Eric
>>
>> <s5.tar.bz2>
>> Pierre de Buyl <pdebuyl@ulb.ac.be> writes:
>>
>>> Hello,
>>>
>>> After a lot a reading of org-exp.el and org-html.el I finally figured
>>> out the
>>> existence of the "HTML_CONTAINER_CLASS" property.
>>>
>>> I could then figure a minimal way to make a s5 presentation.
>>> Minimal in the sens of minimum difference with the html exporter.
>>>
>>> After setting a few STYLE and OPTIONS lines in an org file,
>>> three steps are needed:
>>> 1. Set the HTML_CONTAINER_CLASS to "slide" on level 1 headings
>>> 2. Set org-export-html-toplevel-hlevel to "1", so that slide titles
>>> behave properly
>>> 3. Replace in the html output
>>> <div id="content">
>>> by
>>> <div class="layout">
>>> <div id="controls"><!-- DO NOT EDIT --></div>
>>> <div id="currentSlide"><!-- DO NOT EDIT --></div>
>>> <div id="header"></div>
>>> <div id="footer">
>>> <h1>Interactive Python plotting</h1>
>>> </div>
>>> </div>
>>>
>>> <div class="presentation">
>>>
>>> You need the "ui" directory from the S5 archive to make it work
>>> indeed, http://meyerweb.com/eric/tools/s5/ .
>>> I attach an example org file and the resulting html (which was tweaked
>>> according to step 3).
>>>
>>> Pierre
>>>
>>>
>>>
>>>
>>>
>>> Le 3 févr. 11 à 12:23, Bastien a écrit :
>>>
>>>> Hi Pierre,
>>>>
>>>> Pierre de Buyl <pdebuyl@chem.utoronto.ca> writes:
>>>>
>>>>> S5 allows one to present a slideshow in a web browser, even full
>>>>> screen for
>>>>> some browsers.
>>>>> I know that the topic has come here already, but I actually hacked
>>>>> the
>>>>> excellent org-html.el export file to produde a S5 slideshow with
>>>>> org.
>>>>
>>>> This looks useful.
>>>>
>>>> By reading your code, I see org-export-as-s5 is a variation over
>>>> org-export-as-html.
>>>>
>>>> I would welcome an approach where we factor out some elements of
>>>> org-export-as-html, so that exporting to s5 would just require the
>>>> user to customize those elements.
>>>>
>>>> Does that seem reasonable to you? Would you volunteer to make
>>>> org-export-as-html a bit more general? Even a precise comparison
>>>> of org-export-as-s5 against org-export-as-html would be helpful at
>>>> this point.
>>>>
>>>> Thanks!
>>>>
>>>> --
>>>> Bastien
>>>
>>
>> --
>> Eric Schulte
>> http://cs.unm.edu/~eschulte/
>
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Orgmode] S5 export
  2011-06-03 12:48           ` Eric Schulte
@ 2011-06-03 13:45             ` Pierre de Buyl
  2011-06-03 15:02               ` Eric Schulte
  0 siblings, 1 reply; 12+ messages in thread
From: Pierre de Buyl @ 2011-06-03 13:45 UTC (permalink / raw)
  To: emacs-orgmode

>> If welcomed, I have a few comments related to how I currently use  
>> this
>> function (I have a talk coming soon :-) )
>
> Certainly, I'm happy to hear your feedback.
>
> I have the most recent version of my code up in a git repository
> available at [1], with the file defining the `org-export-as-s5'  
> function
> up at [2].

I can't clone the repository.
$ git clone http://gitweb.adaptive.cs.unm.edu/org-S5.git
Cloning into org-S5...
warning: remote HEAD refers to nonexistent ref, unable to checkout.

I could get a snapshot however, from the web interface.

>>     - If all "star" headlines become slides, it quickly leads to
>> awkward layouts with empty slides below one star headings.
>
> Agreed, for this reason `org-export-headline-levels' is set to 1.
>
>>
>>       I made a modification to the code to choose only one star
>> headings as slides. This way, level 2 headings can be used as "in
>> slide" headings.
>>       I used an (if (looking-at "^\\* ") XXX) in the preprocess hook
>> for that.
>
> I think using the `org-export-headline-levels' variable should be an
> easier way to implement this.  See line 29 of the current code where
> this variable is set.
>
> Oh, looking more closely, I see why you've made this change.  Even
> though it shouldn't affect the output it seems wasteful to add the
> 'html-container-class property to non-top-level headlines.  I've  
> added a
> slight modification of your change to my code.
Also, you cannot CSS properties for level 2 headlines, for instance.

With your modification, it is still not possible to use level 2  
headings in a slide with proper CSS formatting.

>>     - An actual "title page" seems more appropriate, so I added one
>> with "title author date" as h1,h2 and h3 headings.
>
> Great idea.  I've updated my code to include two customizable format
> strings (`org-s5-title-string-fmt' and `org-s5-title-page-fmt') which
> can be used to specify the title string shown at the bottom of each
> page, and the title page respectively.
Ok, but how should one set that ?
I have the feeling that defining variables is not an easy approach.
For instance, can it be set as a text field in the file ?
Ok, I just read it and they are taken from the regular title author  
and date variables.

>> The css need to be tweaked a little bit to get nice results.
>> My modified org-export-as-s5 function is attached.
>>
>> I also posted an example online. It it exported from the file s5-
>> test.org with the function defined in the attached file. The css is
>> very slightly modified.
>> The "scientific content" of the talk is incomplete, this is  
>> normal :-/
>>
>> http://homepages.ulb.ac.be/~pdebuyl/lectures/s5-test.html
>> http://homepages.ulb.ac.be/~pdebuyl/lectures/s5-test.org
>>
>
> Very nice, I really like the title page addition, and it's great to  
> see
> pictures, code and latex equations in a single example presentation.
>
> I have an example with a simple theme I wrote available online [3].
> Just yesterday I added a page to Worg [4] with instructions for using
> this new function which links to my simple example presentation.   
> If you
> don't mind sharing your example publicly I think it would make a great
> addition to this worg page.

You can post all of that, source and everything, on worg. It should  
just not rely on links to my page for the pictures, if possible.

> In general, I think this new S5 export option is turning into a very
> useful addition to Org-mode.
>
> Cheers -- Eric

It is especially useful for presentations with source code, in my  
opinion.
Regards,

Pierre


>>
>> For those reading, I'll mention that using the html export, as done
>> here, allows to include syntax-highlighted code and LaTeX equations
>> very easily.
>>
>> Regards,
>>
>> Pierre
>>
>> Le 1 juin 11 à 18:41, Eric Schulte a écrit :
>>
>>> Hi Pierre,
>>>
>>> I've taken your very thorough S5 instructions and converted them
>>> into a
>>> single `org-export-as-s5' function.  The attached archive file holds
>>> an
>>> s5.org Org-mode file which defines this function, as well as the ui
>>> directory required for S5, and an html file which results from  
>>> calling
>>> the `org-export-as-s5' function in the s5.org file.
>>>
>>> For now the results are also posted up at
>>> http://cs.unm.edu/~eschulte/notes/s5/s5.org
>>> http://cs.unm.edu/~eschulte/notes/s5/s5.html
>>>
>>> Thanks for the clear explanation which lead to such an easy
>>> translation
>>> into elisp.  Please let me know if you think this should be
>>> augmented in
>>> any way, or if the defined function throws any errors on your  
>>> system.
>>>
>>> Best -- Eric
>>>
>>> <s5.tar.bz2>
>>> Pierre de Buyl <pdebuyl@ulb.ac.be> writes:
>>>
>>>> Hello,
>>>>
>>>> After a lot a reading of org-exp.el and org-html.el I finally  
>>>> figured
>>>> out the
>>>> existence of the "HTML_CONTAINER_CLASS" property.
>>>>
>>>> I could then figure a minimal way to make a s5 presentation.
>>>> Minimal in the sens of minimum difference with the html exporter.
>>>>
>>>> After setting a few STYLE and OPTIONS lines in an org file,
>>>> three steps are needed:
>>>> 1. Set the HTML_CONTAINER_CLASS to "slide" on level 1 headings
>>>> 2. Set org-export-html-toplevel-hlevel to "1", so that slide titles
>>>> behave properly
>>>> 3. Replace in the html output
>>>> <div id="content">
>>>> by
>>>> <div class="layout">
>>>> <div id="controls"><!-- DO NOT EDIT --></div>
>>>> <div id="currentSlide"><!-- DO NOT EDIT --></div>
>>>> <div id="header"></div>
>>>> <div id="footer">
>>>> <h1>Interactive Python plotting</h1>
>>>> </div>
>>>> </div>
>>>>
>>>> <div class="presentation">
>>>>
>>>> You need the "ui" directory from the S5 archive to make it work
>>>> indeed, http://meyerweb.com/eric/tools/s5/ .
>>>> I attach an example org file and the resulting html (which was
>>>> tweaked
>>>> according to step 3).
>>>>
>>>> Pierre
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Le 3 févr. 11 à 12:23, Bastien a écrit :
>>>>
>>>>> Hi Pierre,
>>>>>
>>>>> Pierre de Buyl <pdebuyl@chem.utoronto.ca> writes:
>>>>>
>>>>>> S5 allows one to present a slideshow in a web browser, even full
>>>>>> screen for
>>>>>> some browsers.
>>>>>> I know that the topic has come here already, but I actually  
>>>>>> hacked
>>>>>> the
>>>>>> excellent org-html.el export file to produde a S5 slideshow with
>>>>>> org.
>>>>>
>>>>> This looks useful.
>>>>>
>>>>> By reading your code, I see org-export-as-s5 is a variation over
>>>>> org-export-as-html.
>>>>>
>>>>> I would welcome an approach where we factor out some elements of
>>>>> org-export-as-html, so that exporting to s5 would just require the
>>>>> user to customize those elements.
>>>>>
>>>>> Does that seem reasonable to you?  Would you volunteer to make
>>>>> org-export-as-html a bit more general?  Even a precise comparison
>>>>> of org-export-as-s5 against org-export-as-html would be helpful at
>>>>> this point.
>>>>>
>>>>> Thanks!
>>>>>
>>>>> -- 
>>>>>  Bastien
>>>>
>
> Footnotes:
> [1]  http://gitweb.adaptive.cs.unm.edu/org-S5.git
>
> [2]  http://gitweb.adaptive.cs.unm.edu/org-S5.git/blob_plain/HEAD:/ 
> org-export-as-s5.el
>
> [3]  http://cs.unm.edu/~eschulte/notes/s5/s5.html
>
> [4]  http://orgmode.org/worg/org-tutorials/non-beamer- 
> presentations.html
>
> -- 
> Eric Schulte
> http://cs.unm.edu/~eschulte/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Orgmode] S5 export
  2011-06-03 13:45             ` Pierre de Buyl
@ 2011-06-03 15:02               ` Eric Schulte
  0 siblings, 0 replies; 12+ messages in thread
From: Eric Schulte @ 2011-06-03 15:02 UTC (permalink / raw)
  To: Pierre de Buyl; +Cc: emacs-orgmode

Pierre de Buyl <pdebuyl@ulb.ac.be> writes:

>>> If welcomed, I have a few comments related to how I currently use
>>> this
>>> function (I have a talk coming soon :-) )
>>
>> Certainly, I'm happy to hear your feedback.
>>
>> I have the most recent version of my code up in a git repository
>> available at [1], with the file defining the `org-export-as-s5'
>> function
>> up at [2].
>
> I can't clone the repository.
> $ git clone http://gitweb.adaptive.cs.unm.edu/org-S5.git
> Cloning into org-S5...
> warning: remote HEAD refers to nonexistent ref, unable to checkout.
>
> I could get a snapshot however, from the web interface.
>

Try cloning using the git:// protocol, rather than http://

  git clone git://gitweb.adaptive.cs.unm.edu/org-S5.git

>
>>>     - If all "star" headlines become slides, it quickly leads to
>>> awkward layouts with empty slides below one star headings.
>>
>> Agreed, for this reason `org-export-headline-levels' is set to 1.
>>
>>>
>>>       I made a modification to the code to choose only one star
>>> headings as slides. This way, level 2 headings can be used as "in
>>> slide" headings.
>>>       I used an (if (looking-at "^\\* ") XXX) in the preprocess hook
>>> for that.
>>
>> I think using the `org-export-headline-levels' variable should be an
>> easier way to implement this.  See line 29 of the current code where
>> this variable is set.
>>
>> Oh, looking more closely, I see why you've made this change.  Even
>> though it shouldn't affect the output it seems wasteful to add the
>> 'html-container-class property to non-top-level headlines.  I've
>> added a
>> slight modification of your change to my code.
> Also, you cannot CSS properties for level 2 headlines, for instance.
>
> With your modification, it is still not possible to use level 2
> headings in a slide with proper CSS formatting.
>

Ah, because they become formatted as list elements.  This makes sense,
I've reverted this part of my changes.  Thanks for clarifying.

>
>>>     - An actual "title page" seems more appropriate, so I added one
>>> with "title author date" as h1,h2 and h3 headings.
>>
>> Great idea.  I've updated my code to include two customizable format
>> strings (`org-s5-title-string-fmt' and `org-s5-title-page-fmt') which
>> can be used to specify the title string shown at the bottom of each
>> page, and the title page respectively.
> Ok, but how should one set that ?
> I have the feeling that defining variables is not an easy approach.
> For instance, can it be set as a text field in the file ?
> Ok, I just read it and they are taken from the regular title author
> and date variables.
>

Yes, these variables are bound by Org-mode during export.

The `org-s5-title-string-fmt' and `org-s5-title-page-fmt' variables can
be set in a user's .emacs or as file local variables.

>
>>> The css need to be tweaked a little bit to get nice results.
>>> My modified org-export-as-s5 function is attached.
>>>
>>> I also posted an example online. It it exported from the file s5-
>>> test.org with the function defined in the attached file. The css is
>>> very slightly modified.
>>> The "scientific content" of the talk is incomplete, this is normal
>>> :-/
>>>
>>> http://homepages.ulb.ac.be/~pdebuyl/lectures/s5-test.html
>>> http://homepages.ulb.ac.be/~pdebuyl/lectures/s5-test.org
>>>
>>
>> Very nice, I really like the title page addition, and it's great to
>> see
>> pictures, code and latex equations in a single example presentation.
>>
>> I have an example with a simple theme I wrote available online [3].
>> Just yesterday I added a page to Worg [4] with instructions for using
>> this new function which links to my simple example presentation.  If
>> you
>> don't mind sharing your example publicly I think it would make a great
>> addition to this worg page.
>
> You can post all of that, source and everything, on worg. It should
> just not rely on links to my page for the pictures, if possible.
>

Great, If I find the time I'll copy this example somewhere and link to
it from the worg page.

>
>> In general, I think this new S5 export option is turning into a very
>> useful addition to Org-mode.
>>
>> Cheers -- Eric
>
> It is especially useful for presentations with source code, in my
> opinion.

Agreed, I personally like it as a way to publish or distribute quick
presentation I've give with epresent [1].

Thanks -- Eric

> 
> Regards,
>
> Pierre
>
>
>>>
>>> For those reading, I'll mention that using the html export, as done
>>> here, allows to include syntax-highlighted code and LaTeX equations
>>> very easily.
>>>
>>> Regards,
>>>
>>> Pierre
>>>
>>> Le 1 juin 11 à 18:41, Eric Schulte a écrit :
>>>
>>>> Hi Pierre,
>>>>
>>>> I've taken your very thorough S5 instructions and converted them
>>>> into a
>>>> single `org-export-as-s5' function.  The attached archive file holds
>>>> an
>>>> s5.org Org-mode file which defines this function, as well as the ui
>>>> directory required for S5, and an html file which results from
>>>> calling
>>>> the `org-export-as-s5' function in the s5.org file.
>>>>
>>>> For now the results are also posted up at
>>>> http://cs.unm.edu/~eschulte/notes/s5/s5.org
>>>> http://cs.unm.edu/~eschulte/notes/s5/s5.html
>>>>
>>>> Thanks for the clear explanation which lead to such an easy
>>>> translation
>>>> into elisp.  Please let me know if you think this should be
>>>> augmented in
>>>> any way, or if the defined function throws any errors on your
>>>> system.
>>>>
>>>> Best -- Eric
>>>>
>>>> <s5.tar.bz2>
>>>> Pierre de Buyl <pdebuyl@ulb.ac.be> writes:
>>>>
>>>>> Hello,
>>>>>
>>>>> After a lot a reading of org-exp.el and org-html.el I finally
>>>>> figured
>>>>> out the
>>>>> existence of the "HTML_CONTAINER_CLASS" property.
>>>>>
>>>>> I could then figure a minimal way to make a s5 presentation.
>>>>> Minimal in the sens of minimum difference with the html exporter.
>>>>>
>>>>> After setting a few STYLE and OPTIONS lines in an org file,
>>>>> three steps are needed:
>>>>> 1. Set the HTML_CONTAINER_CLASS to "slide" on level 1 headings
>>>>> 2. Set org-export-html-toplevel-hlevel to "1", so that slide titles
>>>>> behave properly
>>>>> 3. Replace in the html output
>>>>> <div id="content">
>>>>> by
>>>>> <div class="layout">
>>>>> <div id="controls"><!-- DO NOT EDIT --></div>
>>>>> <div id="currentSlide"><!-- DO NOT EDIT --></div>
>>>>> <div id="header"></div>
>>>>> <div id="footer">
>>>>> <h1>Interactive Python plotting</h1>
>>>>> </div>
>>>>> </div>
>>>>>
>>>>> <div class="presentation">
>>>>>
>>>>> You need the "ui" directory from the S5 archive to make it work
>>>>> indeed, http://meyerweb.com/eric/tools/s5/ .
>>>>> I attach an example org file and the resulting html (which was
>>>>> tweaked
>>>>> according to step 3).
>>>>>
>>>>> Pierre
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Le 3 févr. 11 à 12:23, Bastien a écrit :
>>>>>
>>>>>> Hi Pierre,
>>>>>>
>>>>>> Pierre de Buyl <pdebuyl@chem.utoronto.ca> writes:
>>>>>>
>>>>>>> S5 allows one to present a slideshow in a web browser, even full
>>>>>>> screen for
>>>>>>> some browsers.
>>>>>>> I know that the topic has come here already, but I actually
>>>>>>> hacked
>>>>>>> the
>>>>>>> excellent org-html.el export file to produde a S5 slideshow with
>>>>>>> org.
>>>>>>
>>>>>> This looks useful.
>>>>>>
>>>>>> By reading your code, I see org-export-as-s5 is a variation over
>>>>>> org-export-as-html.
>>>>>>
>>>>>> I would welcome an approach where we factor out some elements of
>>>>>> org-export-as-html, so that exporting to s5 would just require the
>>>>>> user to customize those elements.
>>>>>>
>>>>>> Does that seem reasonable to you?  Would you volunteer to make
>>>>>> org-export-as-html a bit more general?  Even a precise comparison
>>>>>> of org-export-as-s5 against org-export-as-html would be helpful at
>>>>>> this point.
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>> -- 
>>>>>>  Bastien
>>>>>
>>
>> Footnotes:
>> [1]  http://gitweb.adaptive.cs.unm.edu/org-S5.git
>>
>> [2]
>> http://gitweb.adaptive.cs.unm.edu/org-S5.git/blob_plain/HEAD:/org-export-as-s5.el
>>
>> [3]  http://cs.unm.edu/~eschulte/notes/s5/s5.html
>>
>> [4]  http://orgmode.org/worg/org-tutorials/non-beamer- 
>> presentations.html
>>
>> -- 
>> Eric Schulte
>> http://cs.unm.edu/~eschulte/
>
>


Footnotes: 
[1]  https://github.com/eschulte/epresent

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Orgmode] S5 export
  2011-06-03 13:15           ` Christian Moe
@ 2011-06-03 15:05             ` Eric Schulte
  0 siblings, 0 replies; 12+ messages in thread
From: Eric Schulte @ 2011-06-03 15:05 UTC (permalink / raw)
  To: mail; +Cc: Pierre de Buyl, emacs-orgmode

Hi Christian,

Thanks for sharing the link to Yann Hodique's solution, I was not aware
that this existed.  I've just added this to the worg page on non-beamer
export options.

Cheers -- Eric

Christian Moe <mail@christianmoe.com> writes:

> Hi,
>
> I haven't had time to test Eric's solution yet, but I look forward to it.
>
> Have you also tried Yann Hodique's s5 solution for Org? It has some
> Org setup but depends on Javascript to tweak the exported HTML.
>
> http://www.hodique.info/blog/2009/11/14/s5_presentation_from_org-mode
>
> To me, an ideal solution would "know" how to make a sensible s5
> presentation from an ordinary multi-level outline, with occasional TOC
> slides.
>
> Yours,
> Christian
>
> On 6/3/11 1:38 PM, Pierre de Buyl wrote:
>> Hello Eric,
>>
>> This is amazing, actual emacs lisp code from my explanations, thanks a
>> lot!
>>
>> If welcomed, I have a few comments related to how I currently use this
>> function (I have a talk coming soon :-) )
>>
>> - If all "star" headlines become slides, it quickly leads to awkward
>> layouts with empty slides below one star headings.
>> I made a modification to the code to choose only one star headings as
>> slides. This way, level 2 headings can be used as "in slide" headings.
>> I used an (if (looking-at "^\\* ") XXX) in the preprocess hook for that.
>> - An actual "title page" seems more appropriate, so I added one with
>> "title author date" as h1,h2 and h3 headings.
>>
>> The css need to be tweaked a little bit to get nice results.
>> My modified org-export-as-s5 function is attached.
>>
>>
>> I also posted an example online. It it exported from the file
>> s5-test.org with the function defined in the attached file. The css is
>> very slightly modified.
>> The "scientific content" of the talk is incomplete, this is normal :-/
>>
>> http://homepages.ulb.ac.be/~pdebuyl/lectures/s5-test.html
>> http://homepages.ulb.ac.be/~pdebuyl/lectures/s5-test.org
>>
>> For those reading, I'll mention that using the html export, as done
>> here, allows to include syntax-highlighted code and LaTeX equations
>> very easily.
>>
>> Regards,
>>
>> Pierre
>>
>> Le 1 juin 11 à 18:41, Eric Schulte a écrit :
>>
>>> Hi Pierre,
>>>
>>> I've taken your very thorough S5 instructions and converted them into a
>>> single `org-export-as-s5' function. The attached archive file holds an
>>> s5.org Org-mode file which defines this function, as well as the ui
>>> directory required for S5, and an html file which results from calling
>>> the `org-export-as-s5' function in the s5.org file.
>>>
>>> For now the results are also posted up at
>>> http://cs.unm.edu/~eschulte/notes/s5/s5.org
>>> http://cs.unm.edu/~eschulte/notes/s5/s5.html
>>>
>>> Thanks for the clear explanation which lead to such an easy translation
>>> into elisp. Please let me know if you think this should be augmented in
>>> any way, or if the defined function throws any errors on your system.
>>>
>>> Best -- Eric
>>>
>>> <s5.tar.bz2>
>>> Pierre de Buyl <pdebuyl@ulb.ac.be> writes:
>>>
>>>> Hello,
>>>>
>>>> After a lot a reading of org-exp.el and org-html.el I finally figured
>>>> out the
>>>> existence of the "HTML_CONTAINER_CLASS" property.
>>>>
>>>> I could then figure a minimal way to make a s5 presentation.
>>>> Minimal in the sens of minimum difference with the html exporter.
>>>>
>>>> After setting a few STYLE and OPTIONS lines in an org file,
>>>> three steps are needed:
>>>> 1. Set the HTML_CONTAINER_CLASS to "slide" on level 1 headings
>>>> 2. Set org-export-html-toplevel-hlevel to "1", so that slide titles
>>>> behave properly
>>>> 3. Replace in the html output
>>>> <div id="content">
>>>> by
>>>> <div class="layout">
>>>> <div id="controls"><!-- DO NOT EDIT --></div>
>>>> <div id="currentSlide"><!-- DO NOT EDIT --></div>
>>>> <div id="header"></div>
>>>> <div id="footer">
>>>> <h1>Interactive Python plotting</h1>
>>>> </div>
>>>> </div>
>>>>
>>>> <div class="presentation">
>>>>
>>>> You need the "ui" directory from the S5 archive to make it work
>>>> indeed, http://meyerweb.com/eric/tools/s5/ .
>>>> I attach an example org file and the resulting html (which was tweaked
>>>> according to step 3).
>>>>
>>>> Pierre
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Le 3 févr. 11 à 12:23, Bastien a écrit :
>>>>
>>>>> Hi Pierre,
>>>>>
>>>>> Pierre de Buyl <pdebuyl@chem.utoronto.ca> writes:
>>>>>
>>>>>> S5 allows one to present a slideshow in a web browser, even full
>>>>>> screen for
>>>>>> some browsers.
>>>>>> I know that the topic has come here already, but I actually hacked
>>>>>> the
>>>>>> excellent org-html.el export file to produde a S5 slideshow with
>>>>>> org.
>>>>>
>>>>> This looks useful.
>>>>>
>>>>> By reading your code, I see org-export-as-s5 is a variation over
>>>>> org-export-as-html.
>>>>>
>>>>> I would welcome an approach where we factor out some elements of
>>>>> org-export-as-html, so that exporting to s5 would just require the
>>>>> user to customize those elements.
>>>>>
>>>>> Does that seem reasonable to you? Would you volunteer to make
>>>>> org-export-as-html a bit more general? Even a precise comparison
>>>>> of org-export-as-s5 against org-export-as-html would be helpful at
>>>>> this point.
>>>>>
>>>>> Thanks!
>>>>>
>>>>> --
>>>>> Bastien
>>>>
>>>
>>> --
>>> Eric Schulte
>>> http://cs.unm.edu/~eschulte/
>>
>>
>
>

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Orgmode] S5 export
@ 2011-06-05  8:29 Rustom Mody
  2011-06-05 15:18 ` Eric Schulte
  0 siblings, 1 reply; 12+ messages in thread
From: Rustom Mody @ 2011-06-05  8:29 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 139 bytes --]

Hey Eric!

Thanks for epresent -- just heard of it and tried it.
Nice on the whole but it seems to mark my file as read -- Intended?

Rusi

[-- Attachment #2: Type: text/html, Size: 158 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Orgmode] S5 export
  2011-06-05  8:29 [Orgmode] S5 export Rustom Mody
@ 2011-06-05 15:18 ` Eric Schulte
  0 siblings, 0 replies; 12+ messages in thread
From: Eric Schulte @ 2011-06-05 15:18 UTC (permalink / raw)
  To: Rustom Mody; +Cc: emacs-orgmode

Rustom Mody <rustompmody@gmail.com> writes:

> Hey Eric!
>
> Thanks for epresent -- just heard of it and tried it.
> Nice on the whole but it seems to mark my file as read -- Intended?
>
> Rusi

Hi Rusi,

I've noticed the marking of presented buffers as modified as well.  I
believe this is a result of one of the Org-mode functions called to
"prettify" the buffer (e.g., adding latex equation and image overlays).

I've just pushed up a change which unsets this flag at the beginning of
a presentation.  This way, if you edit during a presentation then the
buffer will appear to be modified, but if you are only presenting (not
editing) then the buffer should appear unmodified when the presentation
is ended.

Cheers -- Eric

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-06-05 15:18 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-05  8:29 [Orgmode] S5 export Rustom Mody
2011-06-05 15:18 ` Eric Schulte
  -- strict thread matches above, loose matches on Subject: below --
2010-11-04 14:31 Pierre de Buyl
2011-02-03 17:23 ` Bastien
2011-06-01 12:41   ` [Orgmode] " Pierre de Buyl
2011-06-01 18:21     ` Pierre de Buyl
2011-06-01 21:31     ` Eric Schulte
2011-06-01 22:41     ` Eric Schulte
     [not found]       ` <AAB99C57-C1B0-4C78-90BD-3D9FE1E4958A@ulb.ac.be>
2011-06-03 11:38         ` Pierre de Buyl
2011-06-03 12:48           ` Eric Schulte
2011-06-03 13:45             ` Pierre de Buyl
2011-06-03 15:02               ` Eric Schulte
2011-06-03 13:15           ` Christian Moe
2011-06-03 15:05             ` Eric Schulte

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).