Skip to content

Instantly share code, notes, and snippets.

@akaron
Forked from aaronwolen/slides.md
Last active October 2, 2015 21:40
Show Gist options
  • Save akaron/f7620d95bd4b2ed863bb to your computer and use it in GitHub Desktop.
Save akaron/f7620d95bd4b2ed863bb to your computer and use it in GitHub Desktop.

% Title % Name % Date

My first slide

write markdown, use pandoc to convert to reveal.js slides.

List

  • this
  • is
  • cool

Variables

The following variables can be defined from the command line:

  • theme
  • transition
pandoc -t html5 --template=template-revealjs.html \
	--standalone --section-divs \
  --variable theme="beige" \
  --variable transition="linear" \
  slides.md -o slides.html

tests

math works? $E = mc^2$

embed code:

#!/usr/bin/env python
import matplotlib.pyplot as plt 
import numpy as np
x = np.linspace(0, 10, 30) 

press s for speaker note

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).

images

cat1

and

cat2

images 2 (embed html <img> tag)

boss

cute

images 3 (markdown table + embed html <img> tag)

boss cute
cute boss
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>$title$</title>
<meta name="description" content="$title$">
$for(author)$
<meta name="author" content="$author$" />
$endfor$
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="css/reveal.css">
$if(theme)$
<link rel="stylesheet" href="css/theme/$theme$.css" id="theme">
$else$
<link rel="stylesheet" href="css/theme/default.css" id="theme">
$endif$
<!-- For syntax highlighting -->
$if(highlight-style)$
<link rel="stylesheet" href="lib/css/$highlight-style$.css">
$else$
<link rel="stylesheet" href="lib/css/zenburn.css">
$endif$
<!-- If the query includes 'print-pdf', use the PDF print sheet -->
<script>
document.write( '<link rel="stylesheet" href="css/print/' +
( window.location.search.match( /print-pdf/gi ) ? 'pdf' : 'paper' ) +
'.css" type="text/css" media="print">' );
</script>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
$for(header-includes)$
$header-includes$
$endfor$
</head>
<body>
$for(include-before)$
$include-before$
$endfor$
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<section>
<h1>$title$</h1>
$for(author)$<h3>$author$</h3>$endfor$
<p>
<h4>$date$</h4>
</p>
</section>
$if(toc)$
<section>
<h2>Outline</h2>
<nav id="$idprefix$TOC">
$toc$
</nav>
</section>
$endif$
$body$
</div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.js"></script>
<script>
// Full list of configuration options available here:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: false,
// available themes are in /css/theme
$if(theme)$
theme: Reveal.getQueryHash().theme || '$theme$',
$else$
theme: Reveal.getQueryHash().theme || 'default',
$endif$
// default/cube/page/concave/zoom/linear/fade/none
$if(transition)$
transition: Reveal.getQueryHash().transition || '$transition$',
$else$
transition: Reveal.getQueryHash().transition || 'default',
$endif$
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
dependencies: [
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'plugin/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } },
{ src: 'plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } },
{ src: 'plugin/math/math.js', async: true }
// { src: 'plugin/remotes/remotes.js', async: true, condition: function() { return !!document.body.classList; } }
// { src: 'plugin/markdown/showdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
]
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment