summaryrefslogtreecommitdiff
path: root/deck.js/samples/deck-simplemath.html
blob: 9e7693a4d6c5873586713a31feb7f0327cd58242 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie6" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8" lang="en"> <![endif]-->
<!--[if gt IE 8]><!-->  <html class="no-js" lang="en"> <!--<![endif]-->
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
            
        <title>deck.simplemath.js test/demo</title>
            
        <meta name="description" content="deck.*.js">
        <meta name="author" content="Rémi Emonet">
        <!--meta name="viewport" content="width=1024, user-scalable=no"/-->
            
        <!-- Core and extension CSS files -->
        <link rel="stylesheet" href="../core/deck.core.css">
        <link rel="stylesheet" href="../extensions/status/deck.status.css">
        <link rel="stylesheet" href="../extensions/hash/deck.hash.css">
            
        <!-- Style theme. More available in /themes/style/ or create your own. -->
        <link rel="stylesheet" href="../themes/style/neon.css">
            
        <!-- Transition theme. More available in /themes/transition/ or create your own. -->
        <!--link rel="stylesheet" href="../themes/transition/horizontal-slide.css"-->
            
        <script src="../modernizr.custom.js"></script>
            
        <!-- Grab CDN jQuery, with a protocol relative URL; fall back to local if offline -->
        <script src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js"></script>
        <script>window.jQuery || document.write('<script src="../jquery-1.7.2.min.js"><\/script>')</script>
            
        <!-- Deck Core and extensions -->
        <script src="../core/deck.core.js"></script>
        <script src="../extensions/hash/deck.hash.js"></script>
        <script src="../extensions/status/deck.status.js"></script>
        <script src="../extensions/fit/deck.fit.js"></script>
        <link rel="stylesheet" href="../extensions/fit/deck.fit-fs.css">

        <script src="../libs/display-latex2.user.js"></script>
        <script src="../extensions/simplemath/deck.simplemath.js"></script>

            
        <style type="text/css">
            .deck-container .slide {border: 1px dashed #333;} /* for the demo */
            .slide h1 {font-size: 3em;}
            .slide h1 b {color: #0F0;}
            .slide h1 em {color: #445; text-shadow: none; font-size: .3em;}
        </style>
    </head>

<!-- for the demo, the body is not the container so it can be resized by the user -->
<body>

This page surely has a purpose.<br/>
Use left/right arrow keys to browse the presentation.<br/>

<!-- for the demo, a resizeable wrapper around the container -->
<div class="deck-container">

<!-- Begin slides -->
<section class="slide" id="title-slide">
	<h1 title="use arrow keys to navigate">Getting started with deck.js:<br/><b>simplemath</b> extension
            <br/><em>use right arrow to move on</em>
        </h1>
</section>

<section class="slide">
    <h2>“simplemath”: What?</h2>
    <ul>
        <li>Add math equations in your slides</li>
        <li>Use latex syntax</li>
        <li>Just wrap your maths in a "span" element</li>
        <li>Wants to learn latex syntax?</li>
        <ul>
            <li>view the source of this page</li>
            <li>view <a href="http://www.andy-roberts.net/writing/latex/mathematics_1">online resources</a> (there are a lot)</li>
        </ul>
        <li>… examples on the next slide</li>
    </ul>
</section>
<section class="slide">
    <h2>“simplemath” in action</h2>
    <ul>
        <li>
            <span class="latex">e=mc^2</span>
                      <span class="latex">(\frac{x^2}{y^3})</span>
                      <span class="latex">[\begin{array}{cc} \sqrt{x} & 2 \\ 3 & x^4 \end{array}]</span>
        </li>
        <li><span class="latex">
                f(n) = \left\{
                \begin{array}{l l}
                   n/2      & \mbox{if } n \mbox{ is even}\\
                   -(n+1)/2 & \mbox{if } n \mbox{ is odd}
                \end{array}
        </span></li>
        <li><span class="latex">a^2 + \frac{1}{\sqrt{a^2 + \frac{1}{\sqrt{a^2 + \frac{1}{\sqrt{a^2 + b^{\infty}}}}}}}</span></li>
        <br/>
    </ul>
</section>
<section class="slide">
    <h2>Principle</h2>
    <ul>
        <li>Written in Javascript</li>
        <li>Interprets latex syntax</li>
        <li>Generates MathML (web standard for maths)</li>
        <li>Lets your browser render the MathML</li>
        <br/>
        <li>Works fully offline</li>
        <ul style="list-style-type:none">
            <li>− depends on browser support for MathML</li>
            <li>+ works offline :)</li>

        </ul>
    </ul>
</section>
<section class="slide">
    <h2>Browser support</h2>
    <ul>
        <li>Did it work for you? :)</li>
        <li>See <a href="https://en.wikipedia.org/wiki/MathML#Web_browsers">the wikipedia page on MathML</a></li>
    </ul>
</section>
<!-- DEMO: simplemath -->

<!-- deck.navigation snippet -->
<!--a href="#" class="deck-prev-link" title="Previous">&#8592;</a>
<a href="#" class="deck-next-link" title="Next">&#8594;</a-->

<!-- deck.status snippet -->
<!--p class="deck-status">
	<span class="deck-status-current"></span>
	/
	<span class="deck-status-total"></span>
</p-->

<!-- deck.hash snippet -->
<a href="." title="Permalink to this slide" class="deck-permalink">#</a>

<!-- Initialize the deck -->
<script>
$(function() {
	$.deck('.slide', {
            // fitMarginX:100, fitMarginY:100,
            // fitMode: "stretched" //"center middle" //"bottom right" //"top left"
        });
});
</script>
</div>
</body>
</html>