reveal.js/README.md in reveal-ck-0.1.3 vs reveal.js/README.md in reveal-ck-0.1.4
- old
+ new
@@ -50,14 +50,14 @@
</section>
```
#### External Markdown
-You can write your content as a separate file and have reveal.js load it at runtime. Note the separator arguments which determine how slides are delimited in the external file.
+You can write your content as a separate file and have reveal.js load it at runtime. Note the separator arguments which determine how slides are delimited in the external file. The ```data-charset``` attribute is optional and specifies which charset to use when loading the external file.
```html
-<section data-markdown="example.md" data-separator="^\n\n\n" data-vertical="^\n\n"></section>
+<section data-markdown="example.md" data-separator="^\n\n\n" data-vertical="^\n\n" data-notes="^Note:" data-charset="iso-8859-15"></section>
```
### Configuration
At the end of your page you need to initialize reveal by running the following code. Note that all config values are optional and will default as specified below.
@@ -98,21 +98,18 @@
autoSlide: 0,
// Enable slide navigation via mouse wheel
mouseWheel: false,
- // Apply a 3D roll to links on hover
- rollingLinks: true,
-
// Transition style
transition: 'default', // default/cube/page/concave/zoom/linear/fade/none
// Transition speed
transitionSpeed: 'default', // default/fast/slow
// Transition style for full page backgrounds
- backgroundTransition: 'default' // default/linear
+ backgroundTransition: 'default' // default/linear/none
});
```
Note that the new default vertical centering option will break compatibility with slides that were using transitions with backgrounds (`cube` and `page`). To restore the previous behavior, set `center` to `false`.
@@ -151,11 +148,14 @@
// Speaker notes
{ src: 'plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } },
// Remote control your reveal.js presentation using a touch device
- { src: 'plugin/remotes/remotes.js', async: true, condition: function() { return !!document.body.classList; } }
+ { src: 'plugin/remotes/remotes.js', async: true, condition: function() { return !!document.body.classList; } },
+
+ // MathJax
+ { src: 'plugin/math/math.js', async: true }
]
});
```
You can add your own extensions using the same syntax. The following properties are available for each dependency object:
@@ -368,10 +368,12 @@
### Fragment events
When a slide fragment is either shown or hidden reveal.js will dispatch an event.
+Some libraries, like MathJax (see #505), get confused by the initially hidden fragment elements. Often times this can be fixed by calling their update or render function from this callback.
+
```javascript
Reveal.addEventListener( 'fragmentshown', function( event ) {
// event.fragment = the fragment DOM element
} );
Reveal.addEventListener( 'fragmenthidden', function( event ) {
@@ -396,11 +398,11 @@
```
### Overview mode
-Press "Esc" key to toggle the overview mode on and off. While you're in this mode, you can still navigate between slides,
+Press "Esc" or "o" keys to toggle the overview mode on and off. While you're in this mode, you can still navigate between slides,
as if you were at 1,000 feet above your presentation. The overview mode comes with a few API hooks:
```javascript
Reveal.addEventListener( 'overviewshown', function( event ) { /* ... */ } );
Reveal.addEventListener( 'overviewhidden', function( event ) { /* ... */ } );
@@ -412,19 +414,34 @@
### Fullscreen mode
Just press »F« on your keyboard to show your presentation in fullscreen mode. Press the »ESC« key to exit fullscreen mode.
### Embedded media
-Embedded HTML5 `<video>`/`<audio>` and YouTube iframes are automatically paused when your navigate away from a slide. This can be disabled by decorating your element with a `data-ignore` attribute.
+Embedded HTML5 `<video>`/`<audio>` and YouTube iframes are automatically paused when you navigate away from a slide. This can be disabled by decorating your element with a `data-ignore` attribute.
Add `data-autoplay` to your media element if you want it to automatically start playing when the slide is shown:
```html
<video data-autoplay src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"></video>
```
+### Stretching elements
+Sometimes it's desirable to have an element, like an image or video, stretch to consume as much space as possible within a given slide. This can be done by adding the ```.stretch``` class to an element as seen below:
+
+```html
+<section>
+ <h2>This video will use up the remaining space on the slide</h2>
+ <video class="stretch" src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"></video>
+</section>
+```
+
+Limitations:
+- Only direct descendants of a slide section can be stretched
+- Only one descendant per slide section can be stretched
+
+
## PDF Export
Presentations can be exported to PDF via a special print stylesheet. This feature requires that you use [Google Chrome](http://google.com/chrome).
Here's an example of an exported presentation that's been uploaded to SlideShare: http://www.slideshare.net/hakimel/revealjs-13872948.
@@ -459,11 +476,11 @@
## Speaker Notes
reveal.js comes with a speaker notes plugin which can be used to present per-slide notes in a separate browser window. The notes window also gives you a preview of the next upcoming slide so it may be helpful even if you haven't written any notes. Press the 's' key on your keyboard to open the notes window.
-By default notes are written using standard HTML, see below, but you can add a ```data-markdown``` attribute to the ```<aside>``` to write them using Markdown.
+Notes are defined by appending an ```<aside>``` element to a slide as seen below. You can add the ```data-markdown``` attribute to the aside element if you prefer writing notes using Markdown.
```html
<section>
<h2>Some Slide</h2>
@@ -471,10 +488,24 @@
Oh hey, these are some notes. They'll be hidden in your presentation, but you can see them if you open the speaker notes window (hit 's' on your keyboard).
</aside>
</section>
```
+If you're using the external Markdown plugin, you can add notes with the help of a special delimiter:
+
+```html
+<section data-markdown="example.md" data-separator="^\n\n\n" data-vertical="^\n\n" data-notes="^Note:"></section>
+
+# Title
+## Sub-title
+
+Here is some content...
+
+Note:
+This will only display in the notes window.
+```
+
## Server Side Speaker Notes
In some cases it can be desirable to run notes on a separate device from the one you're presenting on. The Node.js-based notes plugin lets you do this using the same note definitions as its client side counterpart. Include the required scripts by adding the following dependencies:
```javascript
@@ -518,51 +549,53 @@
You can then access your master presentation at ```http://localhost:1947```
Example configuration:
```javascript
Reveal.initialize({
- // other options
+ // other options...
multiplex: {
- // Example values. Generate your own.
+ // Example values. To generate your own, see the socket.io server instructions.
secret: '13652805320794272084', // Obtained from the socket.io server. Gives this (the master) control of the presentation
id: '1ea875674b17ca76', // Obtained from socket.io server
url: 'revealjs.jit.su:80' // Location of socket.io server
},
- // Optional libraries used to extend on reveal.js
+ // Don't forget to add the dependencies
dependencies: [
- // other deps
{ src: '//cdnjs.cloudflare.com/ajax/libs/socket.io/0.9.10/socket.io.min.js', async: true },
{ src: 'plugin/multiplex/master.js', async: true },
// and if you want speaker notes
{ src: 'plugin/notes-server/client.js', async: true }
+
+ // other dependencies...
]
});
```
#### Client presentation
Served from a publicly accessible static file server. Examples include: GitHub Pages, Amazon S3, Dreamhost, Akamai, etc. The more reliable, the better. Your audience can then access the client presentation via ```http://example.com/path/to/presentation/client/index.html```, with the configuration below causing them to connect to the socket.io server as clients.
Example configuration:
```javascript
Reveal.initialize({
- // other options
+ // other options...
multiplex: {
- // Example values. Generate your own.
+ // Example values. To generate your own, see the socket.io server instructions.
secret: null, // null so the clients do not have control of the master presentation
id: '1ea875674b17ca76', // id, obtained from socket.io server
url: 'revealjs.jit.su:80' // Location of socket.io server
},
- // Optional libraries used to extend on reveal.js
+ // Don't forget to add the dependencies
dependencies: [
- // other deps
{ src: '//cdnjs.cloudflare.com/ajax/libs/socket.io/0.9.10/socket.io.min.js', async: true },
{ src: 'plugin/multiplex/client.js', async: true }
+
+ // other dependencies...
]
});
```
#### Socket.io server
@@ -582,54 +615,129 @@
The socket.io server can play the role of static file server for your client presentation, as in the example at [http://revealjs.jit.su](http://revealjs.jit.su). (Open [http://revealjs.jit.su](http://revealjs.jit.su) in two browsers. Navigate through the slides on one, and the other will update to match.)
Example configuration:
```javascript
Reveal.initialize({
- // other options
+ // other options...
multiplex: {
- // Example values. Generate your own.
+ // Example values. To generate your own, see the socket.io server instructions.
secret: null, // null so the clients do not have control of the master presentation
id: '1ea875674b17ca76', // id, obtained from socket.io server
url: 'example.com:80' // Location of your socket.io server
},
- // Optional libraries used to extend on reveal.js
+ // Don't forget to add the dependencies
dependencies: [
- // other deps
{ src: '//cdnjs.cloudflare.com/ajax/libs/socket.io/0.9.10/socket.io.min.js', async: true },
{ src: 'plugin/multiplex/client.js', async: true }
+
+ // other dependencies...
]
```
It can also play the role of static file server for your master presentation and client presentations at the same time (as long as you don't want to use speaker notes). (Open [http://revealjs.jit.su](http://revealjs.jit.su) in two browsers. Navigate through the slides on one, and the other will update to match. Navigate through the slides on the second, and the first will update to match.) This is probably not desirable, because you don't want your audience to mess with your slides while you're presenting. ;)
Example configuration:
```javascript
Reveal.initialize({
- // other options
+ // other options...
multiplex: {
- // Example values. Generate your own.
+ // Example values. To generate your own, see the socket.io server instructions.
secret: '13652805320794272084', // Obtained from the socket.io server. Gives this (the master) control of the presentation
id: '1ea875674b17ca76', // Obtained from socket.io server
url: 'example.com:80' // Location of your socket.io server
},
- // Optional libraries used to extend on reveal.js
+ // Don't forget to add the dependencies
dependencies: [
- // other deps
{ src: '//cdnjs.cloudflare.com/ajax/libs/socket.io/0.9.10/socket.io.min.js', async: true },
{ src: 'plugin/multiplex/master.js', async: true },
{ src: 'plugin/multiplex/client.js', async: true }
+
+ // other dependencies...
]
});
```
+## Leap Motion
+The Leap Motion plugin lets you utilize your [Leap Motion](https://www.leapmotion.com/) device to control basic navigation of your presentation. The gestures currently supported are:
+
+##### 1 to 2 fingers
+Pointer — Point to anything on screen. Move your finger past the device to expand the pointer.
+
+##### 1 hand + 3 or more fingers (left/right/up/down)
+Navigate through your slides. See config options to invert movements.
+
+##### 2 hands upwards
+Toggle the overview mode. Do it a second time to exit the overview.
+
+#### Config Options
+You can edit the following options:
+
+| Property | Default | Description
+| ----------------- |:-----------------:| :-------------
+| autoCenter | true | Center the pointer based on where you put your finger into the leap motions detection field.
+| gestureDelay | 500 | How long to delay between gestures in milliseconds.
+| naturalSwipe | true | Swipe as though you were touching a touch screen. Set to false to invert.
+| pointerColor | #00aaff | The color of the pointer.
+| pointerOpacity | 0.7 | The opacity of the pointer.
+| pointerSize | 15 | The minimum height and width of the pointer.
+| pointerTolerance | 120 | Bigger = slower pointer.
+
+
+Example configuration:
+```js
+Reveal.initialize({
+
+ // other options...
+
+ leap: {
+ naturalSwipe : false, // Invert swipe gestures
+ pointerOpacity : 0.5, // Set pointer opacity to 0.5
+ pointerColor : '#d80000' // Red pointer
+ },
+
+ dependencies: [
+ { src: 'plugin/leap/leap.js', async: true }
+ ]
+
+});
+```
+
+## MathJax
+
+If you want to display math equations in your presentation you can easily do so by including this plugin. The plugin is a very thin wrapper around the [MathJax](http://www.mathjax.org/) library. To use it you'll need to include it as a reveal.js dependency, [find our more about dependencies here](#dependencies).
+
+The plugin defaults to using [LaTeX](http://en.wikipedia.org/wiki/LaTeX) but that can be adjusted through the ```math``` configuration object. Note that MathJax is loaded from a remote server. If you want to use it offline you'll need to download a copy of the library and adjust the ```mathjax``` configuration value.
+
+Below is an example of how the plugin can be configured. If you don't intend to change these values you do not need to include the ```math``` config object at all.
+
+```js
+Reveal.initialize({
+
+ // other options ...
+
+ math: {
+ mathjax: 'http://cdn.mathjax.org/mathjax/latest/MathJax.js',
+ config: 'TeX-AMS_HTML-full' // See http://docs.mathjax.org/en/latest/config-files.html
+ },
+
+ dependencies: [
+ { src: 'plugin/math/math.js', async: true }
+ ]
+
+});
+```
+
+Read MathJax's documentation if you need [HTTPS delivery](http://docs.mathjax.org/en/latest/start.html#secure-access-to-the-cdn) or serving of [specific versions](http://docs.mathjax.org/en/latest/configuration.html#loading-mathjax-from-the-cdn) for stability.
+
+
## Installation
-The **basic setup** is for authoring presentations only. The **full setup** gives you access to all reveal.js features as well as the development tasks needed to make changes to the source.
+The **basic setup** is for authoring presentations only. The **full setup** gives you access to all reveal.js features and plugins such as speaker notes as well as the development tasks needed to make changes to the source.
### Basic setup
The core of reveal.js is very easy to install. You'll simply need to download a copy of this repository and open the index.html file directly in your browser.
@@ -646,25 +754,25 @@
1. Install [Node.js](http://nodejs.org/)
2. Install [Grunt](http://gruntjs.com/getting-started#installing-the-cli)
-4. Clone the reveal.js repository
+4. Clone the reveal.js repository
```
$ git clone git@github.com:hakimel/reveal.js.git
```
-5. Navigate to the reveal.js folder
+5. Navigate to the reveal.js folder
```
$ cd reveal.js
```
-6. Install dependencies
+6. Install dependencies
```
$ npm install
```
-7. Serve the presentation and monitor source files for changes
+7. Serve the presentation and monitor source files for changes
```
$ grunt serve
```
8. Open <http://localhost:8000> to view your presentation