This commit is contained in:
Ladd Hoffman 2024-06-21 16:59:16 -05:00
parent 9459c25a38
commit 120a6ea805
5 changed files with 64 additions and 4 deletions

23
mathjax.html Normal file
View File

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<title>MathJax AsciiMath Test Page</title>
<script>
MathJax = {
loader: {load: ['input/asciimath', 'output/chtml']}
}
</script>
<!-- <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script> -->
<script type="text/javascript" id="MathJax-script" async
src="./node_modules/mathjax/es5/startup.js">
</script>
<body>
<p>When `a != 0`, there are two solutions to `ax^2 + bx + c = 0` and
they are</p>
<p style="text-align:center">
`x = (-b +- sqrt(b^2-4ac))/(2a) .`
</p>
</body>
</html>

6
package-lock.json generated
View File

@ -9,9 +9,15 @@
"version": "1.0.0",
"license": "Unlicense",
"dependencies": {
"mathjax": "^3.2.2",
"reveal.js": "^5.1.0"
}
},
"node_modules/mathjax": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/mathjax/-/mathjax-3.2.2.tgz",
"integrity": "sha512-Bt+SSVU8eBG27zChVewOicYs7Xsdt40qm4+UpHyX7k0/O9NliPc+x77k1/FEsPsjKPZGJvtRZM1vO+geW0OhGw=="
},
"node_modules/reveal.js": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/reveal.js/-/reveal.js-5.1.0.tgz",

View File

@ -8,6 +8,7 @@
"author": "Ladd Hoffman",
"license": "Unlicense",
"dependencies": {
"mathjax": "^3.2.2",
"reveal.js": "^5.1.0"
}
}

View File

@ -16,8 +16,28 @@
<body>
<div class="reveal">
<div class="slides">
<section>Slide 1</section>
<section>Slide 2</section>
<section>
<h2>Slide 1</h2>
<p>Content... `a = b / c`</p>
</section>
<section data-markdown>
<textarea data-template>
## Slide 2
- Item 1
- Item 2
<div id="d1"></div>
<script>
{
const d = new Drawing('d1');
d.setTitle('Test Drawing');
d.line([0, 0], [100, 100]);
d.render();
}
</script>
</textarea>
</section>
<section data-markdown="test.md"></section>
</div>
</div>
@ -25,15 +45,22 @@
<script src="./node_modules/reveal.js/plugin/notes/notes.js"></script>
<script src="./node_modules/reveal.js/plugin/markdown/markdown.js"></script>
<script src="./node_modules/reveal.js/plugin/highlight/highlight.js"></script>
<script src="./node_modules/reveal.js/plugin/math/math.js"></script>
<script src="./draw.js"></script>
<script>
// More info about initialization & config:
// - https://revealjs.com/initialization/
// - https://revealjs.com/config/
Reveal.initialize({
hash: true,
mathjax3: {
mathjax: './node_modules/mathjax/es5/startup.js',
loader: {
load: ['input/asciimath', 'output/chtml'],
},
},
// Learn about plugins: https://revealjs.com/plugins/
plugins: [ RevealMarkdown, RevealHighlight, RevealNotes ]
plugins: [ RevealMarkdown, RevealHighlight, RevealNotes, RevealMath.MathJax3 ]
});
</script>
</body>

3
test.md Normal file
View File

@ -0,0 +1,3 @@
## Slide 3
Testing