aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2013-08-20 20:14:22 -0700
committerHakim El Hattab <hakim.elhattab@gmail.com>2013-08-20 20:14:22 -0700
commit4164200474e2af27803dc7683054f5443743c8a9 (patch)
tree40dbf6bcb8ef828c060cd39adff0589e6d7822c9 /README.md
parentcb26ff62112df74beb6ade2b4d3721d965f09c5d (diff)
parent2da7c3eacfcd7cc59d9cdee97087b0e2feca625e (diff)
downloadfreenode-live-2017-presentation-4164200474e2af27803dc7683054f5443743c8a9.tar
freenode-live-2017-presentation-4164200474e2af27803dc7683054f5443743c8a9.tar.gz
Merge pull request #567 from hakimel/dev
2.5.0
Diffstat (limited to 'README.md')
-rw-r--r--README.md136
1 files changed, 102 insertions, 34 deletions
diff --git a/README.md b/README.md
index 56d4dee..a97546c 100644
--- a/README.md
+++ b/README.md
@@ -52,10 +52,10 @@ This is based on [data-markdown](https://gist.github.com/1343518) from [Paul Iri
#### 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
@@ -100,9 +100,6 @@ Reveal.initialize({
// 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
@@ -110,7 +107,7 @@ Reveal.initialize({
transitionSpeed: 'default', // default/fast/slow
// Transition style for full page backgrounds
- backgroundTransition: 'default' // default/linear
+ backgroundTransition: 'default' // default/linear/none
});
```
@@ -153,7 +150,10 @@ Reveal.initialize({
{ 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 }
]
});
```
@@ -370,6 +370,8 @@ The display order of fragments can be controlled using the ```data-fragment-inde
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
@@ -398,7 +400,7 @@ By default, Reveal is configured with [highlight.js](http://softwaremaniacs.org/
### 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
@@ -414,7 +416,7 @@ Just press »F« on your keyboard to show your presentation in 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:
@@ -423,6 +425,21 @@ Add `data-autoplay` to your media element if you want it to automatically start
```
+### 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).
@@ -461,7 +478,7 @@ If you want to add a theme of your own see the instructions here: [/css/theme/RE
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>
@@ -473,6 +490,20 @@ By default notes are written using standard HTML, see below, but you can add a `
</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:
@@ -520,23 +551,24 @@ 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...
]
});
```
@@ -547,20 +579,21 @@ Served from a publicly accessible static file server. Examples include: GitHub P
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...
]
});
```
@@ -584,20 +617,21 @@ The socket.io server can play the role of static file server for your client pre
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...
]
```
@@ -606,21 +640,22 @@ It can also play the role of static file server for your master presentation and
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...
]
});
```
@@ -658,17 +693,50 @@ You can edit the following options:
Example configuration:
```js
Reveal.initialize({
- // other options
+
+ // 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
+ },
- // Optional libraries used to extend on reveal.js
- { src: 'plugin/leap/leap.js', async: true }
+ dependencies: [
+ { src: 'plugin/math/math.js', async: true }
+ ]
+
+});
```
+Read MathJax's documentation if you want [secure delivery](http://docs.mathjax.org/en/latest/start.html#secure-access-to-the-cdn) or serve [specific versons](http://docs.mathjax.org/en/latest/configuration.html#loading-mathjax-from-the-cdn) for stabilty.
+
+
## Installation
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.
@@ -692,22 +760,22 @@ Some reveal.js features, like external markdown, require that presentations run
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
```