2013-04-28 09:45:05 +02:00
|
|
|
#+Title: Introduction to Org-Reveal
|
|
|
|
#+Author: Yujie Wen
|
|
|
|
#+Email: yjwen.ty@gmail.com
|
|
|
|
|
2013-06-19 11:02:03 +02:00
|
|
|
#+OPTIONS: reveal_center:t reveal_progress:t reveal_history:nil reveal_control:t
|
|
|
|
#+OPTIONS: reveal_mathjax:t reveal_rolling_links:t reveal_keyboard:t reveal_overview:t num:nil
|
|
|
|
#+OPTIONS: reveal_width:1200 reveal_height:800
|
2013-10-10 07:04:02 +02:00
|
|
|
#+OPTIONS: toc:1
|
2013-06-19 11:02:03 +02:00
|
|
|
#+REVEAL_MARGIN: 0.1
|
|
|
|
#+REVEAL_MIN_SCALE: 0.5
|
|
|
|
#+REVEAL_MAX_SCALE: 2.5
|
2013-04-28 09:45:05 +02:00
|
|
|
#+REVEAL_TRANS: cube
|
|
|
|
#+REVEAL_THEME: moon
|
|
|
|
#+REVEAL_HLEVEL: 2
|
2013-06-19 06:11:11 +02:00
|
|
|
#+REVEAL_HEAD_PREAMBLE: <meta name="description" content="Org-Reveal Introduction.">
|
2013-06-19 05:51:33 +02:00
|
|
|
#+REVEAL_POSTAMBLE: <p> Created by yjwen. </p>
|
2014-12-02 16:38:26 +01:00
|
|
|
#+REVEAL_PLUGINS: (highlight markdown notes)
|
2015-03-19 09:46:05 +01:00
|
|
|
#+REVEAL_EXTRA_CSS: ./local.css
|
2013-06-17 12:04:27 +02:00
|
|
|
|
2013-04-28 09:45:05 +02:00
|
|
|
* Reveal.js and Org-Reveal
|
|
|
|
|
2013-04-28 10:02:48 +02:00
|
|
|
- *Reveal.js* is a tool for creating good-looking HTML presentations,
|
2015-06-05 18:08:26 +02:00
|
|
|
authored by [[http://hakim.se/][Hakim El Hattab]]. \\
|
2015-01-29 15:38:11 +01:00
|
|
|
For an example of a reveal.js presentation, see [[http://lab.hakim.se/reveal-js/#/][here]].
|
2014-06-23 22:08:55 +02:00
|
|
|
- *Org-Reveal* exports your [[http://orgmode.org/][Org]] documents to reveal.js
|
2013-04-28 09:45:05 +02:00
|
|
|
presentations.\\
|
2013-04-28 10:02:48 +02:00
|
|
|
With Org-reveal, you can create beautiful presentations with 3D
|
|
|
|
effects from simple but powerful Org contents.
|
2013-04-28 09:45:05 +02:00
|
|
|
|
|
|
|
* Requirements and Installation
|
|
|
|
|
|
|
|
- Reveal.js.
|
|
|
|
- Latest org-mode.
|
|
|
|
- ox-reveal.el.
|
2014-05-14 14:24:06 +02:00
|
|
|
- htmlize.el (optional, for syntax highlighting).
|
2013-04-28 09:45:05 +02:00
|
|
|
- And, of course, emacs.
|
|
|
|
|
|
|
|
** Obtain Reveal.js
|
|
|
|
|
|
|
|
Download Reveal.js packages from [[https://github.com/hakimel/reveal.js/][here]].
|
|
|
|
|
2013-04-28 10:02:48 +02:00
|
|
|
Extract Reveal.js folders from the downloaded zip file.
|
2013-04-28 09:45:05 +02:00
|
|
|
|
2015-01-29 15:38:11 +01:00
|
|
|
If you do not wish to download reveal.js yourself and would rather get a copy from a CDN,
|
|
|
|
see the section /Set the location of Reveal.js/
|
2013-11-10 13:13:45 +01:00
|
|
|
|
2013-04-28 09:45:05 +02:00
|
|
|
** Obtain org-mode
|
|
|
|
|
2013-04-28 10:02:48 +02:00
|
|
|
*Note*: Org-reveal relies on the Org-mode 8.0 export frame work.
|
2013-04-28 09:45:05 +02:00
|
|
|
Pre-packaged org-mode may be out-of-date.
|
|
|
|
|
2015-01-29 15:38:11 +01:00
|
|
|
If in doubt, use the latest development version from the repository.
|
2014-02-11 08:04:00 +01:00
|
|
|
#+BEGIN_SRC sh
|
2013-04-28 09:45:05 +02:00
|
|
|
$ git clone git://orgmode.org/org-mode.git
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
Follow the [[http://orgmode.org/worg/dev/org-build-system.html][online instruction]] to build and install Org-mode.
|
|
|
|
|
2013-04-28 10:02:48 +02:00
|
|
|
** Obtain Org-reveal
|
2013-04-28 09:45:05 +02:00
|
|
|
|
2015-01-29 15:38:11 +01:00
|
|
|
Download the latest Org-reveal package from [[https://github.com/yjwen/org-reveal][the Org-reveal GitHub page]].
|
2013-04-28 09:45:05 +02:00
|
|
|
|
2013-04-28 10:02:48 +02:00
|
|
|
Or clone the GitHub repository:
|
|
|
|
#+BEGIN_SRC sh
|
|
|
|
$ git clone https://github.com/yjwen/org-reveal.git
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
Copy =ox-reveal.el= to the Org-mode installation directory.
|
2013-04-28 09:45:05 +02:00
|
|
|
|
|
|
|
Add the following statement to your =.emacs= file.
|
2014-02-11 08:04:00 +01:00
|
|
|
#+BEGIN_SRC lisp
|
2013-04-28 09:45:05 +02:00
|
|
|
(require 'ox-reveal)
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
* Configuration
|
|
|
|
|
|
|
|
** Set the location of Reveal.js
|
|
|
|
|
2013-04-28 10:02:48 +02:00
|
|
|
Org-reveal must know where Reveal.js is on your computer before
|
2013-07-23 08:10:32 +02:00
|
|
|
exporting Org contents. The location of Reveal.js is the path to
|
2015-01-29 15:38:11 +01:00
|
|
|
the top directory of the Reveal.js packages, the directory which contains
|
|
|
|
file *README.md*, but *not* the one that contains the file reveal.js.
|
2013-04-28 09:45:05 +02:00
|
|
|
|
2013-04-28 10:02:48 +02:00
|
|
|
The default location is =./reveal.js=, relative to the Org file.
|
2013-04-28 09:45:05 +02:00
|
|
|
|
2015-01-29 15:38:11 +01:00
|
|
|
Changing =org-reveal-root= 's value will change the location
|
2013-04-28 09:45:05 +02:00
|
|
|
globally. For example, add the following statement to your .emacs
|
|
|
|
file:
|
2014-02-11 08:04:00 +01:00
|
|
|
#+BEGIN_SRC lisp
|
2013-05-15 03:48:34 +02:00
|
|
|
(setq org-reveal-root "file:///d:/reveal.js")
|
2013-04-28 09:45:05 +02:00
|
|
|
#+END_SRC
|
2013-05-15 03:48:34 +02:00
|
|
|
*IMPORTANT*: the absolute path to Reveal.js should be in URL form,
|
2014-11-27 19:44:09 +01:00
|
|
|
"file:///path_to_reveal.js", as illustrated above. By setting
|
|
|
|
option =REVEAL_ROOT=, the location is only affected within the Org
|
|
|
|
file.
|
|
|
|
|
|
|
|
** Url form for file location
|
|
|
|
|
|
|
|
For example if you cloned this repository to your home directory,
|
2015-01-29 15:38:11 +01:00
|
|
|
this file in Mac OS X would be referred to as
|
2014-11-27 19:44:09 +01:00
|
|
|
"file:///Users/username/org-reveal/readme.org". This file in
|
|
|
|
Ubuntu would be "file:///home/username/org-reveal/readme.org" and
|
|
|
|
in Windows this file would be
|
|
|
|
"file:///c:/Users/username/org-reveal/readme.org". For more detail
|
2015-06-05 18:19:24 +02:00
|
|
|
on this standard please refer to
|
2014-11-27 19:44:09 +01:00
|
|
|
[[http://en.wikipedia.org/wiki/File_URI_scheme]]
|
2013-04-28 09:45:05 +02:00
|
|
|
|
2015-10-09 05:40:43 +02:00
|
|
|
#+BEGIN_SRC org
|
|
|
|
,#+REVEAL_ROOT: file:///d:/reveal.js
|
|
|
|
#+END_SRC
|
2013-04-28 09:45:05 +02:00
|
|
|
|
2015-01-29 15:38:11 +01:00
|
|
|
Set your =REVEAL_ROOT= to the following URL to download reveal.js from
|
|
|
|
a CDN instead of downloading a local copy.
|
2013-11-10 13:13:45 +01:00
|
|
|
|
|
|
|
#+BEGIN_SRC org
|
2015-10-09 05:40:43 +02:00
|
|
|
,#+REVEAL_ROOT: http://cdn.jsdelivr.net/reveal.js/3.0.0/
|
2013-11-10 13:13:45 +01:00
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
|
2013-04-28 09:45:05 +02:00
|
|
|
** First Try
|
|
|
|
|
2015-01-29 15:38:11 +01:00
|
|
|
To load Org-reveal, type "M-x load-library", then type
|
2013-04-28 09:45:05 +02:00
|
|
|
"ox-reveal".
|
|
|
|
|
|
|
|
Now you can export this manual into Reveal.js presentation by
|
|
|
|
typing "C-c C-e R R".
|
|
|
|
|
|
|
|
Open the generated "Readme.html" in your browser and enjoy the
|
|
|
|
cool slides.
|
|
|
|
|
|
|
|
** The HLevel
|
|
|
|
|
|
|
|
Org-reveal maps each heading and its contents to one Reveal.js
|
2015-01-29 15:38:11 +01:00
|
|
|
slide. Since Reveal.js arranges slides into a 2-dimensional matrix,
|
|
|
|
Org-reveal use a *HLevel* value to decide whether to map headings to horizontal
|
2013-04-28 09:45:05 +02:00
|
|
|
or vertical slides.
|
|
|
|
|
2015-06-05 18:19:24 +02:00
|
|
|
* Headings of level less than or equal to *HLevel* are mapped to horizontal
|
2013-04-28 09:45:05 +02:00
|
|
|
slides.
|
2015-01-29 15:38:11 +01:00
|
|
|
* Headings with a deeper level are mapped to vertical slides.
|
2014-02-11 16:00:43 +01:00
|
|
|
|
2013-04-28 09:45:05 +02:00
|
|
|
HLevel's default value is 1, means only level 1 headings are arranged
|
2015-01-29 15:38:11 +01:00
|
|
|
horizontally. Deeper headings are mapped to vertical slides below their
|
2013-04-28 09:45:05 +02:00
|
|
|
parent level 1 heading.
|
|
|
|
|
2015-10-10 23:49:16 +02:00
|
|
|
*** HLevel's Effects on Slides Layout
|
2013-04-28 09:45:05 +02:00
|
|
|
|
|
|
|
Assume we have a simple Org file as below:
|
2014-02-11 08:04:00 +01:00
|
|
|
#+BEGIN_SRC org
|
2013-04-28 09:45:05 +02:00
|
|
|
,* H1
|
|
|
|
,* H2
|
|
|
|
,** H2.1
|
|
|
|
,*** H2.1.1
|
|
|
|
,* H3
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
If HLevel is 1, the default value, headings H2.1 and H2.1.1 will
|
2015-01-29 15:38:11 +01:00
|
|
|
be mapped to vertical slides below the slides of heading H2.
|
2013-04-28 09:45:05 +02:00
|
|
|
|
|
|
|
[[./images/hlevel.png]]
|
|
|
|
|
2015-01-29 15:38:11 +01:00
|
|
|
If HLevel is changed to 2, slides of heading H2.1 will be changed
|
|
|
|
to the main horizontal queue, and slides of heading H2.1.1 will be
|
2013-04-28 09:45:05 +02:00
|
|
|
a vertical slide below it.
|
|
|
|
|
|
|
|
[[./images/hlevel2.png]]
|
|
|
|
|
|
|
|
*** Configure HLevel's Value
|
|
|
|
|
|
|
|
* Change variable =org-reveal-hlevel='s value to set HLevel globally.\\
|
|
|
|
For example, add the following statement to your =.emacs= file.
|
2014-02-11 08:04:00 +01:00
|
|
|
#+BEGIN_SRC lisp
|
2013-04-28 09:45:05 +02:00
|
|
|
(setq org-reveal-hlevel 2)
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
* Setting Org files local HLevel to option =REVEAL_HLEVEL=.
|
2014-02-11 08:04:00 +01:00
|
|
|
#+BEGIN_SRC org
|
2013-04-28 09:45:05 +02:00
|
|
|
,#+REVEAL_HLEVEL 2
|
|
|
|
#+END_SRC
|
|
|
|
|
2013-05-26 06:15:35 +02:00
|
|
|
** Force Split
|
|
|
|
|
2015-01-29 15:38:11 +01:00
|
|
|
If one heading has too many things to fit into one slide, you can
|
2013-05-26 06:15:35 +02:00
|
|
|
split the contents into multiple vertical slides manually, by inserting
|
|
|
|
|
|
|
|
#+BEGIN_SRC org
|
2013-06-19 05:51:33 +02:00
|
|
|
,#+REVEAL: split
|
2013-05-26 06:15:35 +02:00
|
|
|
#+END_SRC
|
|
|
|
|
2013-06-19 11:02:03 +02:00
|
|
|
#+REVEAL: split
|
2013-05-26 06:15:35 +02:00
|
|
|
|
2013-06-19 05:51:33 +02:00
|
|
|
Now a new slide begins after =#+REVEAL= keyword.
|
2013-05-26 06:15:35 +02:00
|
|
|
|
2013-04-28 09:45:05 +02:00
|
|
|
** Select Theme and Transition
|
|
|
|
|
2013-04-28 10:02:48 +02:00
|
|
|
Themes and transition styles are set globally throughout the whole
|
2013-06-08 01:36:41 +02:00
|
|
|
file by setting options =REVEAL_THEME=, =REVEAL_TRANS=, and =REVEAL_SPEED=.
|
2013-04-28 09:45:05 +02:00
|
|
|
|
2013-04-28 10:02:48 +02:00
|
|
|
For an example, please check the heading part of this document.
|
2013-04-28 09:45:05 +02:00
|
|
|
|
2013-04-28 10:02:48 +02:00
|
|
|
Available themes can be found in "css/theme/" in the reveal.js directory.
|
2013-04-28 09:45:05 +02:00
|
|
|
|
|
|
|
Available transitions are: default|cube|page|concave|zoom|linear|fade|none.
|
|
|
|
|
2013-08-12 08:23:43 +02:00
|
|
|
** Set Slide Background
|
|
|
|
|
|
|
|
Slide background can be set to a color, an image or a repeating image
|
|
|
|
array by setting heading properties.
|
|
|
|
|
|
|
|
*** Single Colored Background
|
|
|
|
:PROPERTIES:
|
|
|
|
:reveal_background: #543210
|
|
|
|
:END:
|
|
|
|
|
|
|
|
Set property =reveal_background= to either an RGB color value, or any
|
|
|
|
supported CSS color format.
|
|
|
|
|
|
|
|
#+BEGIN_SRC org
|
|
|
|
,*** Single Colored Background
|
|
|
|
:PROPERTIES:
|
|
|
|
:reveal_background: #123456
|
|
|
|
:END:
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
*** Single Image Background
|
|
|
|
:PROPERTIES:
|
|
|
|
:reveal_background: ./images/whale.jpg
|
|
|
|
:reveal_background_trans: slide
|
|
|
|
:END:
|
|
|
|
|
|
|
|
Set property =reveal_background= to an URL of background image.
|
|
|
|
Set property =reveal_background_trans= to =slide= to make background image
|
|
|
|
sliding rather than fading.
|
|
|
|
#+BEGIN_SRC org
|
|
|
|
,*** Single Image Background
|
|
|
|
:PROPERTIES:
|
|
|
|
:reveal_background: ./images/whale.jpg
|
|
|
|
:reveal_background_trans: slide
|
|
|
|
:END:
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
*** Repeating Image Background
|
|
|
|
:PROPERTIES:
|
|
|
|
:reveal_background: ./images/whale.jpg
|
|
|
|
:reveal_background_size: 200px
|
|
|
|
:reveal_background_repeat: repeat
|
|
|
|
:END:
|
|
|
|
|
|
|
|
Resize background image by setting property
|
|
|
|
=reveal_background_size= to a number.
|
|
|
|
|
|
|
|
Set property =reveal_background_repeat= to =repeat= to repeat
|
|
|
|
image on the background.
|
|
|
|
#+BEGIN_SRC org
|
|
|
|
,*** Repeating Image Background
|
|
|
|
:PROPERTIES:
|
|
|
|
:reveal_background: ./images/whale.jpg
|
|
|
|
:reveal_background_size: 200px
|
|
|
|
:reveal_background_repeat: repeat
|
|
|
|
:END:
|
|
|
|
#+END_SRC
|
|
|
|
|
2015-02-03 17:36:54 +01:00
|
|
|
*** Title Slide Background Image
|
|
|
|
|
|
|
|
To set the title slide's background image, please specify the
|
|
|
|
following options:
|
|
|
|
|
|
|
|
* =REVEAL_TITLE_SLIDE_BACKGROUND=: A URL to the background image.
|
|
|
|
* =REVEAL_TITLE_SLIDE_BACKGROUND_SIZE=: HTML size specification, e.g. ~200px~.
|
|
|
|
* =REVEAL_TITLE_SLIDE_BACKGROUND_REPEAT=: set to ~repeat~ to repeat the image.
|
|
|
|
|
2013-06-19 11:02:03 +02:00
|
|
|
** Slide Size
|
|
|
|
|
2015-01-29 15:38:11 +01:00
|
|
|
Reveal.js scales slides to best fit the display resolution, but you can
|
|
|
|
also specify the desired size by settings the option tags =width= and =height=.
|
2013-06-19 11:02:03 +02:00
|
|
|
|
2015-01-29 15:38:11 +01:00
|
|
|
The scaling behavior can also be constrained by setting following
|
2013-06-19 11:02:03 +02:00
|
|
|
options:
|
|
|
|
* =#+REVEAL_MARGIN:= :: a float number, the factor of empty area
|
|
|
|
surrounding slide contents.
|
2015-06-05 18:19:24 +02:00
|
|
|
* =#+REVEAL_MIN_SCALE:= :: a float number, the minimum scaling down
|
2013-06-19 11:02:03 +02:00
|
|
|
ratio.
|
|
|
|
* =#+REVEAL_MAX_SCALE:= :: a float number, the maximum scaling up
|
|
|
|
ratio.
|
2014-02-11 16:00:43 +01:00
|
|
|
|
|
|
|
** Slide Numbering
|
2015-03-25 10:25:17 +01:00
|
|
|
Activate slide numbers by setting =#+REVEAL_SLIDE_NUMBER:= to =t= (true).
|
|
|
|
|
|
|
|
** Slide Header/Footer
|
|
|
|
Specify Slide header/footer by =#+REVEAL_SLIDE_HEADER:= and
|
|
|
|
=#+REVEAL_SLIDE_FOOTER:=. The option content will be put into
|
|
|
|
divisions of class =slide-header= and =slide-footer=, so you can
|
|
|
|
control their appearance in custom CSS file(see [[Extra Stylesheets]]).
|
2014-02-11 16:00:43 +01:00
|
|
|
|
2013-04-28 09:45:05 +02:00
|
|
|
** Fragmented Contents
|
|
|
|
|
2015-03-07 15:11:56 +01:00
|
|
|
Make contents fragmented (show up one-by-one) by setting option
|
|
|
|
=ATTR_REVEAL= with property ":frag frag-style", as illustrated
|
|
|
|
below.
|
2014-02-11 16:00:43 +01:00
|
|
|
|
2013-04-28 09:45:05 +02:00
|
|
|
#+ATTR_REVEAL: :frag roll-in
|
|
|
|
Paragraphs can be fragmented.
|
|
|
|
|
|
|
|
#+ATTR_REVEAL: :frag roll-in
|
2015-02-21 16:51:24 +01:00
|
|
|
- Lists can
|
|
|
|
- be fragmented.
|
2013-04-28 09:45:05 +02:00
|
|
|
|
2015-02-21 16:51:24 +01:00
|
|
|
#+ATTR_REVEAL: :frag roll-in
|
|
|
|
Pictures, tables and many other HTML elements can be fragmented.
|
|
|
|
|
|
|
|
*** Fragment Styles
|
2015-04-02 12:15:04 +02:00
|
|
|
Available fragment styles are:
|
2015-02-22 16:01:14 +01:00
|
|
|
#+ATTR_REVEAL: :frag t
|
2013-04-28 09:45:05 +02:00
|
|
|
* grow
|
|
|
|
* shrink
|
|
|
|
* roll-in
|
|
|
|
* fade-out
|
|
|
|
* highlight-red
|
|
|
|
* highlight-green
|
|
|
|
* highlight-blue
|
2015-04-09 09:00:14 +02:00
|
|
|
* appear
|
2014-11-04 11:38:40 +01:00
|
|
|
|
2015-04-02 12:15:04 +02:00
|
|
|
Setting ~:frag t~ will use Reveal.js default fragment style, which
|
2015-06-05 18:19:24 +02:00
|
|
|
can be overridden by local option ~#+REVEAL_DEFAULT_FRAG_STYLE~ or
|
2015-04-02 12:15:04 +02:00
|
|
|
global variable ~org-reveal-default-frag-style~.
|
|
|
|
|
2015-03-07 15:11:56 +01:00
|
|
|
*** Fragment Index
|
|
|
|
Fragment sequence can be changed by assigning adding ~:frag_idx~
|
|
|
|
property to each fragmented element.
|
|
|
|
|
|
|
|
#+ATTR_REVEAL: :frag t :frag_idx 3
|
|
|
|
And, this paragraph shows at last.
|
|
|
|
|
|
|
|
#+ATTR_REVEAL: :frag t :frag_idx 2
|
|
|
|
This paragraph shows secondly.
|
|
|
|
|
|
|
|
#+ATTR_REVEAL: :frag t :frag_idx 1
|
|
|
|
This paragraph shows at first.
|
|
|
|
|
2015-02-22 16:01:14 +01:00
|
|
|
*** List Fragments
|
|
|
|
|
|
|
|
~#+ATTR_REVEAL: :frag frag-style~ above a list defines fragment
|
|
|
|
style for the list as a whole.
|
|
|
|
#+ATTR_REVEAL: :frag grow
|
|
|
|
1. All items grow.
|
|
|
|
2. As a whole.
|
|
|
|
|
|
|
|
To define fragment styles for every list item, please enumerate
|
2015-04-09 09:00:14 +02:00
|
|
|
each item's style in a lisp list.
|
2015-03-07 15:11:56 +01:00
|
|
|
|
|
|
|
~none~ in the style list will disable fragment for the
|
|
|
|
corresponding list item.
|
|
|
|
|
|
|
|
Custom fragment sequence should also be enumerated for each list
|
|
|
|
item.
|
|
|
|
|
|
|
|
#+REVEAL: split
|
|
|
|
An example:
|
|
|
|
|
2015-02-22 16:01:14 +01:00
|
|
|
#+BEGIN_SRC org
|
2015-03-07 15:11:56 +01:00
|
|
|
,#+ATTR_REVEAL: :frag (grow shrink roll-in fade-out none) :frag_idx (4 3 2 1 -)
|
2015-02-22 16:01:14 +01:00
|
|
|
* I will grow.
|
|
|
|
* I will shrink.
|
|
|
|
* I rolled in.
|
|
|
|
* I will fade out.
|
2015-02-25 15:42:28 +01:00
|
|
|
* I don't fragment.
|
2015-02-22 16:01:14 +01:00
|
|
|
#+END_SRC
|
|
|
|
|
2015-03-07 15:11:56 +01:00
|
|
|
#+ATTR_REVEAL: :frag (grow shrink roll-in fade-out none) :frag_idx (4 3 2 1 -)
|
2015-02-22 16:01:14 +01:00
|
|
|
* I will grow.
|
|
|
|
* I will shrink.
|
|
|
|
* I rolled in.
|
|
|
|
* I will fade out.
|
2015-02-25 15:42:28 +01:00
|
|
|
* I don't fragment.
|
2015-04-09 09:00:14 +02:00
|
|
|
#+REVEAL: split
|
|
|
|
When there is ~:frag_idx~ specified, insufficient fragment style
|
|
|
|
list will be extended by its last element. So a ~:frag (appear)~
|
|
|
|
assigns each item of a list the ~appear~ fragment style.
|
|
|
|
#+BEGIN_SRC org
|
|
|
|
,#+ATTR_REVEAL: :frag (appear)
|
|
|
|
* I appear.
|
|
|
|
* I appear.
|
|
|
|
* I appear.
|
|
|
|
#+END_SRC
|
|
|
|
#+ATTR_REVEAL: :frag (appear)
|
|
|
|
* I appear.
|
|
|
|
* I appear.
|
|
|
|
* I appear.
|
2015-03-07 15:11:56 +01:00
|
|
|
|
|
|
|
|
2013-04-28 09:45:05 +02:00
|
|
|
** Data State
|
|
|
|
:PROPERTIES:
|
|
|
|
:reveal_data_state: alert
|
|
|
|
:END:
|
|
|
|
|
|
|
|
Set property =reveal_data_state= to headings to change this slide's
|
2013-04-28 10:02:48 +02:00
|
|
|
display style, as illustrated above.
|
|
|
|
|
2015-06-05 18:19:24 +02:00
|
|
|
Available data states are: alert|blackout|soothe.
|
2013-04-28 09:45:05 +02:00
|
|
|
|
|
|
|
** Plug-ins
|
|
|
|
|
|
|
|
Reveal.js provides several plug-in functions.
|
|
|
|
|
2013-04-28 10:02:48 +02:00
|
|
|
- reveal-control : Show/hide browsing control pad.
|
2013-04-28 09:45:05 +02:00
|
|
|
- reveal-progress : Show/hide progress bar.
|
|
|
|
- reveal-history : Enable/disable slide history track.
|
|
|
|
- reveal-center : Enable/disable slide centering.
|
2014-11-04 11:38:40 +01:00
|
|
|
- multiplex : Enable audience to view presentation on secondary devices.
|
2015-01-12 09:00:37 +01:00
|
|
|
|
2013-04-28 09:45:05 +02:00
|
|
|
*** Configure Plug-ins
|
|
|
|
|
2015-01-29 15:38:11 +01:00
|
|
|
Each plugin can be toggled on/off by adding =#+OPTIONS= tags or
|
|
|
|
by setting custom variables.
|
2013-04-28 09:45:05 +02:00
|
|
|
|
|
|
|
- =#+OPTIONS= tags:\\
|
|
|
|
=reveal_control=, =reveal_progress=, =reveal_history=,
|
2013-06-08 01:36:41 +02:00
|
|
|
=reveal_center=, =reveal_rolling_links=, =reveal_keyboard=, =reveal_overview=
|
2013-04-28 09:45:05 +02:00
|
|
|
- Custom variables:\\
|
|
|
|
=org-reveal-control=, =org-reveal-progress=,
|
2015-04-12 13:14:44 +02:00
|
|
|
=org-reveal-history=, =org-reveal-center=, =org-reveal-rolling-links=, =org-reveal-keyboard=, =org-reveal-overview=
|
2013-04-28 09:45:05 +02:00
|
|
|
|
2013-04-28 10:02:48 +02:00
|
|
|
For an example, please refer to the heading part of this document.
|
2013-04-28 09:45:05 +02:00
|
|
|
** Source Codes
|
|
|
|
|
|
|
|
Org-reveal use Org-Babel to highlight source codes.
|
|
|
|
|
|
|
|
Codes copied from [[http://www.haskell.org/haskellwiki/The_Fibonacci_sequence][Haskell Wiki]].
|
|
|
|
#+BEGIN_SRC haskell
|
|
|
|
|
2014-02-11 08:04:00 +01:00
|
|
|
fibs = 0 : 1 : next fibs
|
|
|
|
where next (a : t@(b:_)) = (a+b) : next t
|
2013-04-28 09:45:05 +02:00
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
If you saw odd indentation, please set variable =org-html-indent=
|
2013-04-28 10:02:48 +02:00
|
|
|
to =nil= and export again.
|
2013-04-28 09:45:05 +02:00
|
|
|
|
2015-01-29 15:38:11 +01:00
|
|
|
If code is not highlighted, please make sure =htmlize.el= is installed.
|
2014-06-12 15:38:35 +02:00
|
|
|
|
2013-05-06 05:49:58 +02:00
|
|
|
** MathJax
|
2013-05-31 04:39:56 +02:00
|
|
|
:PROPERTIES:
|
|
|
|
:CUSTOM_ID: my-heading
|
|
|
|
:END:
|
|
|
|
|
2013-05-06 05:49:58 +02:00
|
|
|
|
|
|
|
${n! \over k!(n-k)!} = {n \choose k}$
|
|
|
|
|
2015-06-05 18:19:24 +02:00
|
|
|
LateX equation are rendered in native HTML5 contents.
|
2013-05-06 05:49:58 +02:00
|
|
|
|
|
|
|
*IMPORTANT*: Displaying equations requires internet connection to
|
2015-06-05 18:08:26 +02:00
|
|
|
[[http://mathjax.org/][mathjax.org]] or local MathJax installation.
|
2013-05-06 05:49:58 +02:00
|
|
|
|
|
|
|
*IMPORTANT 2*: MathJax is disabled by default to reduce internet
|
|
|
|
traffic. Set =#+OPTIONS= tag =reveal_mathjax= or variable
|
|
|
|
=org-reveal-mathjax= to true to enable it. For local MathJax
|
2014-04-04 11:53:38 +02:00
|
|
|
installation, set option =REVEAL_MATHJAX_URL= to the URL pointing
|
2013-05-15 03:48:34 +02:00
|
|
|
to the local MathJax location.
|
2014-02-11 16:00:43 +01:00
|
|
|
|
2013-06-17 12:04:27 +02:00
|
|
|
** Preamble and Postamble
|
|
|
|
|
|
|
|
You can define preamble and postamble contents which will not be
|
|
|
|
shown as slides, but will be exported into the body part of the
|
|
|
|
generated HTML file, at just before and after the slide contents.
|
|
|
|
|
|
|
|
Change preamble and postamble contents globally by setting variable
|
|
|
|
=org-reveal-preamble= and =org-reveal-postamble=.
|
|
|
|
|
|
|
|
Change preamble and postamble contents locally by setting options
|
|
|
|
=REVEAL_PREAMBLE= and =REVEAL_POSTAMBLE=, as illustrated at the
|
|
|
|
heading part of this document.
|
|
|
|
|
2013-06-19 06:11:11 +02:00
|
|
|
To add custom contents into HTML =<head>= parts, set contents to
|
|
|
|
variable =org-reveal-head-preamble= or option
|
|
|
|
=REVEAL_HEAD_PREAMBLE=.
|
|
|
|
|
2013-06-17 12:04:27 +02:00
|
|
|
*** Generating Pre/Postamble by Emacs-Lisp Functions
|
|
|
|
|
|
|
|
If the contents of pre/postamble is the name of an evaluated
|
2015-01-29 15:38:11 +01:00
|
|
|
Emacs-Lisp function, which must accept an argument of Org-mode
|
2013-06-17 12:04:27 +02:00
|
|
|
info and return a string, the returned string will be taken
|
|
|
|
as pre/postamble contents.
|
|
|
|
|
|
|
|
So you can embed the Emacs-Lisp function as an Org-Babel source
|
2015-01-29 15:38:11 +01:00
|
|
|
block and mark it to be evaluated when exporting the document.
|
2013-06-17 12:04:27 +02:00
|
|
|
|
2013-06-19 05:51:33 +02:00
|
|
|
** Raw HTML in Slides
|
|
|
|
|
|
|
|
Besides the Org contents, you can embed raw HTML contents
|
|
|
|
into slides by placing a =#+REVEAL_HTML= keyword.
|
|
|
|
|
2015-03-09 08:47:26 +01:00
|
|
|
The famous cat jump fail:
|
|
|
|
#+REVEAL_HTML: <iframe width="560" height="315" src="https://www.youtube.com/embed/OQzJR3BqS7o" frameborder="0" allowfullscreen></iframe>
|
|
|
|
|
2013-07-23 08:10:32 +02:00
|
|
|
** Speaker Notes
|
2015-06-05 18:19:24 +02:00
|
|
|
Reveal.js supports speaker notes, which are displayed in a separate
|
2015-01-29 15:38:11 +01:00
|
|
|
browser window. Pressing 's' on slide's windows will pop up a window
|
|
|
|
displaying the current slide, the next slide and the speaker notes on the current
|
2013-07-23 08:10:32 +02:00
|
|
|
slide.
|
|
|
|
|
|
|
|
Org-reveal recognize texts between =#+BEGIN_NOTES= and =#+END_NOTES=
|
|
|
|
as speaker notes. See the example below.
|
|
|
|
|
|
|
|
#+BEGIN_SRC org
|
|
|
|
,* Heading 1
|
|
|
|
Some contents.
|
|
|
|
,#+BEGIN_NOTES
|
|
|
|
Enter speaker notes here.
|
|
|
|
,#+END_NOTES
|
|
|
|
#+END_SRC
|
2013-10-15 05:06:38 +02:00
|
|
|
|
2014-12-02 16:38:26 +01:00
|
|
|
#+REVEAL: split
|
|
|
|
Speaker notes requires the ~notes~ plug-in. If you changed default
|
|
|
|
plug-in setting by specifying =#+REVEAL_PLUGINS= or by setting
|
|
|
|
variable =org-reveal-plugins=, please make sure ~notes~ is in the
|
|
|
|
plug-in list to enable speaker notes.
|
|
|
|
|
2013-10-15 05:06:38 +02:00
|
|
|
#+REVEAL: split
|
|
|
|
|
|
|
|
Due to a bug in Reveal.js, sometimes the speaker notes window
|
|
|
|
shows only blank screens. A workaround to this issue is to put
|
|
|
|
the presentation HTML file into the Reveal.js root directory and
|
2015-06-05 18:19:24 +02:00
|
|
|
reopen it in the browser.
|
2013-10-15 05:06:38 +02:00
|
|
|
|
2015-09-16 09:50:42 +02:00
|
|
|
*** Easy-Template for Speaker Notes
|
|
|
|
|
|
|
|
Org-reveal registers 'n' as the key for speaker notes easy-template.
|
|
|
|
So you can press '<' followed by 'n' and then press TAB, the ~#+BEGIN_NOTES~
|
|
|
|
and ~#+END_NOTES~ pair is inserted automatically.
|
|
|
|
|
|
|
|
Customize ~org-reveal-note-key-char~ to change the default key
|
|
|
|
'n'. set it to nil will forbid the auto-completion for speaker notes.
|
|
|
|
|
2014-11-04 11:38:40 +01:00
|
|
|
** Multiplexing
|
|
|
|
Reveal.js supports multiplexing, which allows allows your audience to view
|
|
|
|
the slides of the presentation you are controlling on their own phone, tablet
|
|
|
|
or laptop. As the master presentation navigates the slides, all client
|
|
|
|
presentations will update in real time. See a demo at
|
|
|
|
http://revealjs.jit.su/.
|
|
|
|
|
|
|
|
You can enable multiplexing for your slide generation by including the
|
|
|
|
following options:
|
|
|
|
#+BEGIN_SRC org
|
2014-11-04 16:38:43 +01:00
|
|
|
#+REVEAL_MULTIPLEX_ID: [Obtained from the socket.io server. ]
|
|
|
|
#+REVEAL_MULTIPLEX_SECRET: [Obtained from socket.io server. Gives the master control of the presentation.]
|
2014-11-04 11:38:40 +01:00
|
|
|
#+REVEAL_MULTIPLEX_URL: http://revealjs.jit.su:80 [Location of socket.io server]
|
|
|
|
#+REVEAL_MULTIPLEX_SOCKETIO_URL: http://cdnjs.cloudflare.com/ajax/libs/socket.io/0.9.10/socket.io.min.js
|
|
|
|
#+REVEAL_PLUGINS: ([any other plugins you are using] multiplex)
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
You must generate unique values for the =REVEAL_MULTIPLEX_ID= and
|
|
|
|
=REVEAL_MULTIPLEX_SECRET= options, obtaining these from the socket.io server
|
|
|
|
you are using.
|
|
|
|
|
|
|
|
If you include these options in your .org file, reveal-org will enable your
|
|
|
|
.html file as the master file for multiplexing and will generate a file named
|
2014-12-02 16:38:26 +01:00
|
|
|
in the form =[filename]_client.html= in the same directory as the client
|
2014-11-04 11:38:40 +01:00
|
|
|
.html file. Provide your audience with a link to the client file to allow
|
|
|
|
them to track your presentation on their own device.
|
|
|
|
|
2013-10-11 08:18:22 +02:00
|
|
|
** Extra Stylesheets
|
|
|
|
|
|
|
|
Set =REVEAL_EXTRA_CSS= to a stylesheet file path in order to load extra custom
|
|
|
|
styles after loading a theme.
|
|
|
|
|
|
|
|
#+BEGIN_SRC org
|
2014-02-11 08:04:00 +01:00
|
|
|
,#+REVEAL_EXTRA_CSS: url-to-custom-stylesheet.css
|
2013-10-11 08:18:22 +02:00
|
|
|
#+END_SRC
|
|
|
|
|
2014-06-12 15:38:35 +02:00
|
|
|
** Select Built-In Scripts
|
|
|
|
|
|
|
|
Set option =REVEAL_PLUGINS= or variable =org-reveal-plugins= to a
|
|
|
|
lisp list to select built-in scripts.
|
|
|
|
|
|
|
|
Available built-in scripts are:
|
|
|
|
classList/markdown/highlight/zoom/notes/search/remotes.
|
2014-11-04 11:38:40 +01:00
|
|
|
|
|
|
|
Default built-ins are: classList/markdown/highlight/zoom/notes/multiplex.
|
2014-06-12 15:38:35 +02:00
|
|
|
|
|
|
|
The following examples select /markdown/ and /highlight/ only.
|
|
|
|
#+BEGIN_SRC org
|
|
|
|
,#+REVEAL_PLUGINS: (markdown highlight)
|
|
|
|
#+END_SRC
|
2014-11-04 11:38:40 +01:00
|
|
|
|
2013-10-11 08:18:22 +02:00
|
|
|
** Extra Dependent Script
|
|
|
|
|
|
|
|
Set =REVEAL_EXTRA_JS= to the url of extra reveal.js dependent
|
|
|
|
script if necessary.
|
|
|
|
#+BEGIN_SRC org
|
2014-02-11 08:04:00 +01:00
|
|
|
,#+REVEAL_EXTRA_JS: url-to-custom-script.js
|
2013-10-11 08:18:22 +02:00
|
|
|
#+END_SRC
|
|
|
|
|
2015-07-27 09:48:41 +02:00
|
|
|
** Extra Slide Attribute
|
2013-10-11 08:18:22 +02:00
|
|
|
|
|
|
|
Set property =reveal_extra_attr= to headings to add any necessary attributes
|
|
|
|
to slides.
|
2013-07-23 08:10:32 +02:00
|
|
|
|
2015-07-27 09:48:41 +02:00
|
|
|
** Export into Single File
|
|
|
|
|
|
|
|
By setting option =reveal_single_file= to ~t~, images and necessary
|
|
|
|
Reveal.js scripts will be embedded into the exported HTML file, to make
|
|
|
|
an portable HTML.
|
2015-09-08 15:42:39 +02:00
|
|
|
Attention: This needs locally available reveal.js files!
|
2015-07-27 09:48:41 +02:00
|
|
|
|
|
|
|
#+BEGIN_SRC org
|
|
|
|
,#+OPTIONS: reveal_single_file:t
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
When exporting into single file, functions provided by Reveal.js
|
|
|
|
libraries will be disabled due to limitation, including PDF export,
|
|
|
|
Markdown support, zooming, speaker notes and remote control.
|
|
|
|
|
|
|
|
Code highlight by highlight.js is also disabled. But *code
|
|
|
|
highlight by Emacs is not effected.*
|
|
|
|
|
2015-09-28 10:53:50 +02:00
|
|
|
** Export Current Subtree
|
|
|
|
|
|
|
|
Use menu entry " C-c C-e R S" to export only current subtree,
|
|
|
|
without the title slide and the table of content, for a quick preview
|
|
|
|
of your current edition.
|
|
|
|
|
2013-05-21 15:27:34 +02:00
|
|
|
* Tips
|
2013-05-31 04:39:56 +02:00
|
|
|
|
2013-05-21 15:27:34 +02:00
|
|
|
** Disable Heading Numbers
|
|
|
|
|
|
|
|
Add =num:nil= to =#+OPTIONS=
|
|
|
|
#+BEGIN_SRC org
|
2014-02-11 08:04:00 +01:00
|
|
|
,#+OPTIONS: num:nil
|
2013-05-21 15:27:34 +02:00
|
|
|
#+END_SRC
|
2013-05-31 04:39:56 +02:00
|
|
|
|
|
|
|
** Internal Links
|
|
|
|
|
|
|
|
Reveal.js supports only jump between slides, but not between
|
|
|
|
elements on slides. Thus, we can only link to headlines in an Org
|
|
|
|
document.
|
|
|
|
|
2015-06-05 18:19:24 +02:00
|
|
|
You can create links pointing to a headline's text, or its
|
2013-05-31 04:39:56 +02:00
|
|
|
custom-id, as the examples below:
|
|
|
|
|
|
|
|
* [[Tips]].
|
|
|
|
* [[#my-heading][Heading]] with a =CUSTOM_ID= property.
|
|
|
|
|
2013-04-28 09:45:05 +02:00
|
|
|
* Thanks
|
|
|
|
|
|
|
|
Courtesy to:
|
|
|
|
|
|
|
|
#+ATTR_REVEAL: :frag roll-in
|
2014-02-11 16:00:43 +01:00
|
|
|
The powerful Org-mode,
|
2013-05-06 05:49:58 +02:00
|
|
|
#+ATTR_REVEAL: :frag roll-in
|
|
|
|
the impressive Reveal.js
|
2013-04-28 09:45:05 +02:00
|
|
|
#+ATTR_REVEAL: :frag roll-in
|
2013-05-06 05:49:58 +02:00
|
|
|
and the precise MathJax
|