all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* org-slidy and other HTML slideshows in org 8.x?
@ 2013-10-24  3:12 Jay Dixit
  2013-10-24  9:41 ` Rasmus
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Jay Dixit @ 2013-10-24  3:12 UTC (permalink / raw)
  To: emacs-orgmode

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

Hey everyone,

I'm trying to use Dov Grobgeld's org-slidy (https://github.com/dov/org-slidy)
to create HTML-based slideshows using org-mode, but it doesn't seem to be
working. I'm not sure, but I suspect this is because the syntax for org's
HTML export may have changed?

Here are the options used by org-slidy.
https://gist.github.com/7129945

I tried to fix it by taking out the "-export" from the commands, but it
didn't work. Does anyone know the new correct syntax for these options?

I'm having similar issues trying to use Takumi Kinjo's
org-html5presentation (https://github.com/kinjo/org-html5presentation.el)
and org-impress-js (https://github.com/kinjo/org-impress-js.el). I get
errors like "void-variable org-export-html-special-string-regexps," but I
don't know enough to translate the commands into org-8ese. Does anyone know
how to do this?

Finally, are there other HTML-based slideshows that are compatible with org
8 besides s5 and deck.js?

Thanks!


#+OPTIONS: H:1 num:nil toc:nil \n:nil @:t ::t |:t ^:t f:t LaTeX:t
#+BIND: org-export-html-style-include-default nil
#+BIND: org-export-html-style-include-scripts t
#+BIND: org-export-html-auto-preamble nil
#+BIND: org-export-html-auto-postamble nil
#+BIND: org-export-html-style "<!-- configuration parameters --> <meta
name='duration' content='5' /> <meta name='font-size-adjustment'
content='2' /> <!-- style sheet links --> <link rel='stylesheet'
href='slidy.css' type='text/css' /> <!-- HTMTLSLIDY JS --> <script
src='htmlslidy-slides.js' type='text/javascript'></script> <script
src='slidy.js' type='text/javascript'></script> <script src='jquery.js'
type='text/javascript'></script> <script src='org-slidy-slides.js'
type='text/javascript'></script>"
#+BIND: org-export-html-style-extra ""
#+BIND: org-export-html-preamble org-htmlslidy-html-preamble-function
#+BIND: org-export-html-postamble org-htmlslidy-html-postamble-function

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

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

* Re: org-slidy and other HTML slideshows in org 8.x?
  2013-10-24  3:12 org-slidy and other HTML slideshows in org 8.x? Jay Dixit
@ 2013-10-24  9:41 ` Rasmus
  2013-10-24 16:04 ` Rick Frankel
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Rasmus @ 2013-10-24  9:41 UTC (permalink / raw)
  To: emacs-orgmode

Jay Dixit <jaydixit.work@gmail.com> writes:

> Hey everyone,
>
> I'm trying to use Dov Grobgeld's org-slidy (https://github.com/dov/org-slidy)
> to create HTML-based slideshows using org-mode, but it doesn't seem to be
> working. I'm not sure, but I suspect this is because the syntax for org's
> HTML export may have changed?
>
> Here are the options used by org-slidy.
> https://gist.github.com/7129945
>
> I tried to fix it by taking out the "-export" from the commands, but it
> didn't work. Does anyone know the new correct syntax for these options?
>
> I'm having similar issues trying to use Takumi Kinjo's
> org-html5presentation (https://github.com/kinjo/org-html5presentation.el)
> and org-impress-js (https://github.com/kinjo/org-impress-js.el). I get
> errors like "void-variable org-export-html-special-string-regexps," but I
> don't know enough to translate the commands into org-8ese. Does anyone know
> how to do this?
>
> Finally, are there other HTML-based slideshows that are compatible with org
> 8 besides s5 and deck.js?

There's ox-reveal on Github.  The author announced it a while back.

        https://github.com/yjwen/org-reveal/

The implementation has some limitations ATM but for simple stuff it's
OK.  E.g. I couldn't get inheritance between headlines working, the
style of description lists is forced bold plus some other annoyances.

I like reveal.js, but it lacks a good theme for more, say, 'academic'
stuff, where text tends to be aligned to the left and description
lists are typeset in a nicer manner etc.

–Rasmus

-- 
. . . The proofs are technical in nature and provides no real understanding.

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

* Re: org-slidy and other HTML slideshows in org 8.x?
  2013-10-24  3:12 org-slidy and other HTML slideshows in org 8.x? Jay Dixit
  2013-10-24  9:41 ` Rasmus
@ 2013-10-24 16:04 ` Rick Frankel
  2013-10-24 23:41 ` Rick Frankel
  2013-10-25  1:17 ` Rick Frankel
  3 siblings, 0 replies; 6+ messages in thread
From: Rick Frankel @ 2013-10-24 16:04 UTC (permalink / raw)
  To: Jay Dixit; +Cc: emacs-orgmode

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

On 2013-10-23 23:12, Jay Dixit wrote:
> Hey everyone,
> 
> I'm trying to use Dov Grobgeld's org-slidy
> (https://github.com/dov/org-slidy [1]) to create HTML-based slideshows
> using org-mode, but it doesn't seem to be working. I'm not sure, but I
> suspect this is because the syntax for org's HTML export may have
> changed? 
> 

Attached is a quick hack --- ox-slidy.el, an org 8 exporter which 
inherits from ox-s5.

It has a lot of stuff hardcoded that should be variables, but it works.

rick

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: ox-slidy.el --]
[-- Type: text/x-lisp; name=ox-slidy.el, Size: 6097 bytes --]

(require 'ox-s5)
(org-export-define-derived-backend 'slidy 's5
  :menu-entry
  '(?S "Export to SLIDY HTML Presentation"
       ((?H "To temporary buffer" org-slidy-export-as-html)
	(?h "To file" org-slidy-export-to-html)
	(?o "To file and open"
	    (lambda (a s v b)
	      (if a (org-slidy-export-to-html t s v b)
		(org-open-file (org-slidy-export-to-html nil s v b)))))))
  :options-alist
  '((:html-link-home "HTML_LINK_HOME" nil nil)
    (:html-link-up "HTML_LINK_UP" nil nil)
    (:slidy-background "SLIDY_BACKGROUND" nil org-slidy-background newline)
    (:html-head-include-default-style "HTML_INCLUDE_DEFAULT_STYLE" nil nil)
    (:html-head-include-scripts "HTML_INCLUDE_SCRIPTS" nil nil))
  :translate-alist
  '((template . org-slidy-template)))

(defgroup org-export-slidy nil
  "Options for exporting Org mode files to Slidy HTML Presentations."
  :tag "Org Export Slidy"
  :group 'org-export-html)

(defcustom org-slidy-background
  "<img id=\"head-icon\" alt=\"graphic with four colored squares\"
  src=\"http://www.w3.org/Talks/Tools/Slidy2/graphics/icon-blue.png\" />"
  "Contents for the background div"
  :group 'org-export-slidy
  :type 'string)

(defcustom org-slidy-style
  "http://www.w3.org/Talks/Tools/Slidy2/styles/w3c-blue.css"
  "Slidy theme stylesheet url."
  :group 'org-export-slidy
  :type 'string)

(defun org-slidy-template (contents info)
  "Return complete document string after HTML conversion.
CONTENTS is the transcoded contents string.  INFO is a plist
holding export options."
  (let ((org-html--pre/postamble-class "background")
        (info (plist-put
		(plist-put info :html-preamble (plist-get info :slidy-background))
		:html-postamble nil)))
    (mapconcat
     'identity
     (list
      (org-html-doctype info)
      (format "<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"%s\" xml:lang=\"%s\">"
	      (plist-get info :language) (plist-get info :language))
      "<head>"
      "<link rel='stylesheet'"
      " href='http://www.w3.org/Talks/Tools/Slidy2/styles/slidy.css'"
      " media='screen, projection, print'"
      " type='text/css' />"
      (when org-slidy-style
        (format "<link rel='%s' type='%s' media='%s' href='%s' />"
         "stylesheet" "text/css" "screen, projection, print"
         org-slidy-style))
      "<script src='http://www.w3.org/Talks/Tools/Slidy2/scripts/slidy.js'"
      " type='text/javascript'></script>"
      (org-html--build-meta-info info)
      (org-html--build-head info)
      (org-html--build-mathjax-config info)
      "</head>"
      "<body>"
      (org-html--build-pre/postamble 'preamble info)
      (org-html--build-pre/postamble 'postamble info)
      (format "<%s id=\"%s\" class=\"presentation\">"
	      (nth 1 (assq 'content org-html-divs))
	      (nth 2 (assq 'content org-html-divs)))
      ;; title page
      (format "<%s id='title-slide' class='slide cover'>"
	      (plist-get info :html-container))
      (format-spec org-s5-title-slide-template (org-html-format-spec info))
      (format "</%s>" (plist-get info :html-container))
      ;; table of contents.
      (let ((depth (plist-get info :with-toc)))
	(when depth (org-slidy-toc depth info)))
      contents
      (format "</%s>" (nth 1 (assq 'content org-html-divs)))
      "</body>"
      "</html>\n") "\n")))

(defun org-slidy-export-as-html
  (&optional async subtreep visible-only body-only ext-plist)
  "Export current buffer to an HTML buffer.

If narrowing is active in the current buffer, only export its
narrowed part.

If a region is active, export that region.

A non-nil optional argument ASYNC means the process should happen
asynchronously.  The resulting buffer should be accessible
through the `org-export-stack' interface.

When optional argument SUBTREEP is non-nil, export the sub-tree
at point, extracting information from the headline properties
first.

When optional argument VISIBLE-ONLY is non-nil, don't export
contents of hidden elements.

When optional argument BODY-ONLY is non-nil, only write code
between \"<body>\" and \"</body>\" tags.

EXT-PLIST, when provided, is a property list with external
parameters overriding Org default settings, but still inferior to
file-local settings.

Export is done in a buffer named \"*Org SLIDY Export*\", which
will be displayed when `org-export-show-temporary-export-buffer'
is non-nil."
  (interactive)
  (org-export-to-buffer 'slidy "*Org SLIDY Export*"
    async subtreep visible-only body-only ext-plist (lambda () (nxml-mode))))

(defun org-slidy-export-to-html
  (&optional async subtreep visible-only body-only ext-plist)
  "Export current buffer to a SLIDY HTML file.

If narrowing is active in the current buffer, only export its
narrowed part.

If a region is active, export that region.

A non-nil optional argument ASYNC means the process should happen
asynchronously.  The resulting file should be accessible through
the `org-export-stack' interface.

When optional argument SUBTREEP is non-nil, export the sub-tree
at point, extracting information from the headline properties
first.

When optional argument VISIBLE-ONLY is non-nil, don't export
contents of hidden elements.

When optional argument BODY-ONLY is non-nil, only write code
between \"<body>\" and \"</body>\" tags.

EXT-PLIST, when provided, is a property list with external
parameters overriding Org default settings, but still inferior to
file-local settings.

Return output file's name."
  (interactive)
  (let* ((extension (concat "." org-html-extension))
         (file (org-export-output-file-name extension subtreep))
         (org-export-coding-system org-html-coding-system))
    (org-export-to-file 'slidy file
      async subtreep visible-only body-only ext-plist)))

(defun org-slidy-publish-to-html (plist filename pub-dir)
  "Publish an org file to SLIDY HTML Presentation.

FILENAME is the filename of the Org file to be published.  PLIST
is the property list for the given project.  PUB-DIR is the
publishing directory.

Return output file name."
  (org-publish-org-to 'slidy filename ".html" plist pub-dir))

(provide 'ox-slidy)

;;; ox-slidy.el ends here

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

* Re: org-slidy and other HTML slideshows in org 8.x?
  2013-10-24  3:12 org-slidy and other HTML slideshows in org 8.x? Jay Dixit
  2013-10-24  9:41 ` Rasmus
  2013-10-24 16:04 ` Rick Frankel
@ 2013-10-24 23:41 ` Rick Frankel
  2013-10-25  1:17 ` Rick Frankel
  3 siblings, 0 replies; 6+ messages in thread
From: Rick Frankel @ 2013-10-24 23:41 UTC (permalink / raw)
  To: Jay Dixit; +Cc: emacs-orgmode

On 2013-10-23 23:12, Jay Dixit wrote:
#+OPTIONS: H:1 num:nil toc:nil n:nil @:t ::t |:t ^:t f:t LaTeX:t

> #+BIND: org-export-html-style-include-default nil
> #+BIND: org-export-html-style-include-scripts t
> #+BIND: org-export-html-auto-preamble nil
> #+BIND: org-export-html-auto-postamble nil
> #+BIND: org-export-html-style "<!-- configuration parameters --> <meta
> name='duration' content='5' /> <meta name='font-size-adjustment'
> content='2' /> <!-- style sheet links --> <link rel='stylesheet'
> href='slidy.css' type='text/css' /> <!-- HTMTLSLIDY JS --> <script
> src='htmlslidy-slides.js' type='text/javascript'></script> <script
> src='slidy.js' type='text/javascript'></script> <script
> src='jquery.js' type='text/javascript'></script> <script
> src='org-slidy-slides.js' type='text/javascript'></script>"
> #+BIND: org-export-html-style-extra ""
> #+BIND: org-export-html-preamble org-htmlslidy-html-preamble-function
> #+BIND: org-export-html-postamble org-htmlslidy-html-postamble-function


#+BIND: org-html-head-include-default-style: nil
#+BIND: org-html-include-scripts nil
#+HTML_HEAD:

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

* Re: org-slidy and other HTML slideshows in org 8.x?
  2013-10-24  3:12 org-slidy and other HTML slideshows in org 8.x? Jay Dixit
                   ` (2 preceding siblings ...)
  2013-10-24 23:41 ` Rick Frankel
@ 2013-10-25  1:17 ` Rick Frankel
  2013-10-25 14:19   ` Rick Frankel
  3 siblings, 1 reply; 6+ messages in thread
From: Rick Frankel @ 2013-10-25  1:17 UTC (permalink / raw)
  To: Jay Dixit; +Cc: emacs-orgmode

On 2013-10-23 23:12, Jay Dixit wrote:
#+OPTIONS: H:1 num:nil toc:nil n:nil @:t ::t |:t ^:t f:t LaTeX:t

> #+BIND: org-export-html-style-include-default nil
> #+BIND: org-export-html-style-include-scripts t
> #+BIND: org-export-html-auto-preamble nil
> #+BIND: org-export-html-auto-postamble nil
> #+BIND: org-export-html-style "<!-- configuration parameters --> <meta
> name='duration' content='5' /> <meta name='font-size-adjustment'
> content='2' /> <!-- style sheet links --> <link rel='stylesheet'
> href='slidy.css' type='text/css' /> <!-- HTMTLSLIDY JS --> <script
> src='htmlslidy-slides.js' type='text/javascript'></script> <script
> src='slidy.js' type='text/javascript'></script> <script
> src='jquery.js' type='text/javascript'></script> <script
> src='org-slidy-slides.js' type='text/javascript'></script>"
> #+BIND: org-export-html-style-extra ""
> #+BIND: org-export-html-preamble org-htmlslidy-html-preamble-function
> #+BIND: org-export-html-postamble org-htmlslidy-html-postamble-function


#+BIND: org-html-head-include-default-style: nil
#+BIND: org-html-include-scripts nil
#+HTML_HEAD:

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

* Re: org-slidy and other HTML slideshows in org 8.x?
  2013-10-25  1:17 ` Rick Frankel
@ 2013-10-25 14:19   ` Rick Frankel
  0 siblings, 0 replies; 6+ messages in thread
From: Rick Frankel @ 2013-10-25 14:19 UTC (permalink / raw)
  To: emacs-orgmode

My apologys and please ingore these two email. I'm setting up a new 
computer and it pushed a couple of copies of saved drafts during mail 
setup.

rick

On 2013-10-24 21:17, Rick Frankel wrote:
> On 2013-10-23 23:12, Jay Dixit wrote:
> #+OPTIONS: H:1 num:nil toc:nil n:nil @:t ::t |:t ^:t f:t LaTeX:t
> 
> #+BIND: org-export-html-style-include-default nil
> #+BIND: org-export-html-style-include-scripts t
> #+BIND: org-export-html-auto-preamble nil
> #+BIND: org-export-html-auto-postamble nil
> #+BIND: org-export-html-style "<!-- configuration parameters --> <meta
> name='duration' content='5' /> <meta name='font-size-adjustment'
> content='2' /> <!-- style sheet links --> <link rel='stylesheet'
> href='slidy.css' type='text/css' /> <!-- HTMTLSLIDY JS --> <script
> src='htmlslidy-slides.js' type='text/javascript'></script> <script
> src='slidy.js' type='text/javascript'></script> <script
> src='jquery.js' type='text/javascript'></script> <script
> src='org-slidy-slides.js' type='text/javascript'></script>"
> #+BIND: org-export-html-style-extra ""
> #+BIND: org-export-html-preamble org-htmlslidy-html-preamble-function
> #+BIND: org-export-html-postamble org-htmlslidy-html-postamble-function
> 
> 
> #+BIND: org-html-head-include-default-style: nil
> #+BIND: org-html-include-scripts nil
> #+HTML_HEAD:

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

end of thread, other threads:[~2013-10-25 14:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-24  3:12 org-slidy and other HTML slideshows in org 8.x? Jay Dixit
2013-10-24  9:41 ` Rasmus
2013-10-24 16:04 ` Rick Frankel
2013-10-24 23:41 ` Rick Frankel
2013-10-25  1:17 ` Rick Frankel
2013-10-25 14:19   ` Rick Frankel

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.