From b2d532ea28eaaf0b7b2cf225c713c8a8d3f4a3bf Mon Sep 17 00:00:00 2001 From: Benjamin Tan Date: Thu, 8 Feb 2018 20:54:21 +0800 Subject: Allow users to customise MathJax options. Ref. #1856, #2006, #2045. This is a more open approach to allow customisation of all MathJax options instead of select options only. --- test/examples/math.html | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'test/examples/math.html') diff --git a/test/examples/math.html b/test/examples/math.html index d35e827..73484d7 100644 --- a/test/examples/math.html +++ b/test/examples/math.html @@ -82,6 +82,14 @@ \] +
+

TeX Macros

+ + Here is a common vector space: + \[L^2(\R) = \set{u : \R \to \R}{\int_\R |u|^2 < +\infty}\] + used in functional analysis. +
+

The Lorenz Equations

@@ -153,6 +161,14 @@ \]
+ +
+

TeX Macros

+ + Here is a common vector space: + \[L^2(\R) = \set{u : \R \to \R}{\int_\R |u|^2 < +\infty}\] + used in functional analysis. +
@@ -170,7 +186,13 @@ math: { // mathjax: 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js', - config: 'TeX-AMS_HTML-full' + config: 'TeX-AMS_HTML-full', + TeX: { + Macros: { + R: '\\mathbb{R}', + set: [ '\\left\\{#1 \\; ; \\; #2\\right\\}', 2 ] + } + } }, dependencies: [ -- cgit v1.2.3 From 29b0e86089eb3ec0d4bb5811c9b723dfcf36703c Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 4 Oct 2018 14:48:01 +0200 Subject: remove head.min.js in favor of simple built-in script loader --- demo.html | 1 - index.html | 1 - js/reveal.js | 90 ++++++++++++++++++++++-------- lib/js/head.min.js | 6 -- plugin/markdown/example.html | 1 - test/assets/external-script-a.js | 1 + test/assets/external-script-b.js | 1 + test/assets/external-script-c.js | 1 + test/assets/external-script-d.js | 1 + test/examples/embedded-media.html | 1 - test/examples/math.html | 1 - test/examples/slide-backgrounds.html | 1 - test/examples/slide-transitions.html | 1 - test/test-async-dependencies.html | 74 ++++++++++++++++++++++++ test/test-dependencies.html | 54 ++++++++++++++++++ test/test-markdown-element-attributes.html | 1 - test/test-markdown-external.html | 1 - test/test-markdown-options.html | 1 - test/test-markdown-slide-attributes.html | 1 - test/test-markdown.html | 1 - test/test-pdf.html | 1 - test/test.html | 1 - 22 files changed, 200 insertions(+), 42 deletions(-) delete mode 100644 lib/js/head.min.js create mode 100644 test/assets/external-script-a.js create mode 100644 test/assets/external-script-b.js create mode 100644 test/assets/external-script-c.js create mode 100644 test/assets/external-script-d.js create mode 100644 test/test-async-dependencies.html create mode 100644 test/test-dependencies.html (limited to 'test/examples/math.html') diff --git a/demo.html b/demo.html index 8aa4aba..04b47d2 100644 --- a/demo.html +++ b/demo.html @@ -384,7 +384,6 @@ Reveal.addEventListener( 'customevent', function() { - + + + + + + diff --git a/test/test-dependencies.html b/test/test-dependencies.html new file mode 100644 index 0000000..49aaf60 --- /dev/null +++ b/test/test-dependencies.html @@ -0,0 +1,54 @@ + + + + + + + reveal.js - Test Dependencies + + + + + + + +
+
+ + + + + + + + + + diff --git a/test/test-markdown-element-attributes.html b/test/test-markdown-element-attributes.html index 4a09272..409d068 100644 --- a/test/test-markdown-element-attributes.html +++ b/test/test-markdown-element-attributes.html @@ -122,7 +122,6 @@ - diff --git a/test/test-markdown-external.html b/test/test-markdown-external.html index d4912b0..76c6ae6 100644 --- a/test/test-markdown-external.html +++ b/test/test-markdown-external.html @@ -23,7 +23,6 @@ - diff --git a/test/test-markdown-options.html b/test/test-markdown-options.html index 598243a..5391a19 100644 --- a/test/test-markdown-options.html +++ b/test/test-markdown-options.html @@ -31,7 +31,6 @@ - diff --git a/test/test-markdown-slide-attributes.html b/test/test-markdown-slide-attributes.html index e90a9cf..ba9e710 100644 --- a/test/test-markdown-slide-attributes.html +++ b/test/test-markdown-slide-attributes.html @@ -116,7 +116,6 @@ - diff --git a/test/test-markdown.html b/test/test-markdown.html index 00f7e7a..e1e5926 100644 --- a/test/test-markdown.html +++ b/test/test-markdown.html @@ -40,7 +40,6 @@ - diff --git a/test/test-pdf.html b/test/test-pdf.html index 5ab8578..1455fb9 100644 --- a/test/test-pdf.html +++ b/test/test-pdf.html @@ -73,7 +73,6 @@ - diff --git a/test/test.html b/test/test.html index f0a5050..67932b7 100644 --- a/test/test.html +++ b/test/test.html @@ -76,7 +76,6 @@ - -- cgit v1.2.3 From 196d2a39712760b7671fa2feb54e1883a97796e5 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 4 Oct 2018 14:54:35 +0200 Subject: remove classlist polyfill, cross browser support is good enough now --- README.md | 3 --- demo.html | 1 - lib/js/classList.js | 2 -- plugin/markdown/example.html | 1 - test/examples/math.html | 1 - 5 files changed, 8 deletions(-) delete mode 100644 lib/js/classList.js (limited to 'test/examples/math.html') diff --git a/README.md b/README.md index 67c9654..02b570a 100644 --- a/README.md +++ b/README.md @@ -423,9 +423,6 @@ Reveal.js doesn't _rely_ on any third party scripts to work but a few optional l ```javascript Reveal.initialize({ dependencies: [ - // Cross-browser shim that fully implements classList - https://github.com/eligrey/classList.js/ - { src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } }, - // Interpret Markdown in
elements { src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, { src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, diff --git a/demo.html b/demo.html index 04b47d2..71f0c4c 100644 --- a/demo.html +++ b/demo.html @@ -399,7 +399,6 @@ Reveal.addEventListener( 'customevent', function() { // More info https://github.com/hakimel/reveal.js#dependencies dependencies: [ - { src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } }, { src: 'plugin/markdown/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(); } }, diff --git a/lib/js/classList.js b/lib/js/classList.js deleted file mode 100644 index 44f2b4c..0000000 --- a/lib/js/classList.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js*/ -if(typeof document!=="undefined"&&!("classList" in document.createElement("a"))){(function(j){var a="classList",f="prototype",m=(j.HTMLElement||j.Element)[f],b=Object,k=String[f].trim||function(){return this.replace(/^\s+|\s+$/g,"")},c=Array[f].indexOf||function(q){var p=0,o=this.length;for(;p