markdown.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>reveal.js - Markdown Example</title>
  6. <link rel="stylesheet" href="../dist/reveal.css">
  7. <link rel="stylesheet" href="../dist/theme/white.css" id="theme">
  8. <link rel="stylesheet" href="../plugin/highlight/monokai.css">
  9. </head>
  10. <body>
  11. <div class="reveal">
  12. <div class="slides">
  13. <!-- Use external markdown resource, separate slides by three newlines; vertical slides by two newlines -->
  14. <section data-markdown="markdown.md" data-separator="^\n\n\n" data-separator-vertical="^\n\n"></section>
  15. <!-- Slides are separated by three dashes (the default) -->
  16. <section data-markdown>
  17. <script type="text/template">
  18. ## Demo 1
  19. Slide 1
  20. ---
  21. ## Demo 1
  22. Slide 2
  23. ---
  24. ## Demo 1
  25. Slide 3
  26. </script>
  27. </section>
  28. <!-- Slides are separated by regexp matching newline + three dashes + newline, vertical slides identical but two dashes -->
  29. <section data-markdown data-separator="^\n---\n$" data-separator-vertical="^\n--\n$">
  30. <script type="text/template">
  31. ## Demo 2
  32. Slide 1.1
  33. --
  34. ## Demo 2
  35. Slide 1.2
  36. ---
  37. ## Demo 2
  38. Slide 2
  39. </script>
  40. </section>
  41. <!-- No "extra" slides, since the separator can't be matched ("---" will become horizontal rulers) -->
  42. <section data-markdown data-separator="$x">
  43. <script type="text/template">
  44. A
  45. ---
  46. B
  47. ---
  48. C
  49. </script>
  50. </section>
  51. <!-- Slide attributes -->
  52. <section data-markdown>
  53. <script type="text/template">
  54. <!-- .slide: data-background="#000000" -->
  55. ## Slide attributes
  56. </script>
  57. </section>
  58. <!-- Element attributes -->
  59. <section data-markdown>
  60. <script type="text/template">
  61. ## Element attributes
  62. - Item 1 <!-- .element: class="fragment" data-fragment-index="2" -->
  63. - Item 2 <!-- .element: class="fragment" data-fragment-index="1" -->
  64. </script>
  65. </section>
  66. <!-- Code -->
  67. <section data-markdown>
  68. <script type="text/template">
  69. ```php [1|3-5]
  70. public function foo()
  71. {
  72. $foo = array(
  73. 'bar' => 'bar'
  74. )
  75. }
  76. ```
  77. </script>
  78. </section>
  79. <!-- Images -->
  80. <section data-markdown>
  81. <script type="text/template">
  82. ![Sample image](https://s3.amazonaws.com/static.slid.es/logo/v2/slides-symbol-512x512.png)
  83. </script>
  84. </section>
  85. <!-- Math -->
  86. <section data-markdown>
  87. ## The Lorenz Equations
  88. `\[\begin{aligned}
  89. \dot{x} &amp; = \sigma(y-x) \\
  90. \dot{y} &amp; = \rho x - y - xz \\
  91. \dot{z} &amp; = -\beta z + xy
  92. \end{aligned} \]`
  93. </section>
  94. </div>
  95. </div>
  96. <script src="../dist/reveal.js"></script>
  97. <script src="../plugin/markdown/markdown.js"></script>
  98. <script src="../plugin/highlight/highlight.js"></script>
  99. <script src="../plugin/notes/notes.js"></script>
  100. <script src="../plugin/math/math.js"></script>
  101. <script>
  102. Reveal.initialize({
  103. controls: true,
  104. progress: true,
  105. history: true,
  106. center: true,
  107. plugins: [ RevealMarkdown, RevealHighlight, RevealNotes, RevealMath.KaTeX ]
  108. });
  109. </script>
  110. </body>
  111. </html>