Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
2
2015-12-uni-ffm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CmS
2015-12-uni-ffm
Commits
39019040
Commit
39019040
authored
11 years ago
by
Hakim El Hattab
Browse files
Options
Downloads
Patches
Plain Diff
comments and failesafes for #531
parent
69f7c0c6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/math.html
+5
-0
5 additions, 0 deletions
examples/math.html
plugin/math/math.js
+24
-14
24 additions, 14 deletions
plugin/math/math.js
with
29 additions
and
14 deletions
examples/math.html
+
5
−
0
View file @
39019040
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
<section>
<section>
<h3>
The Lorenz Equations
</h3>
<h3>
The Lorenz Equations
</h3>
\[\begin{aligned}
\[\begin{aligned}
\dot{x}
&
= \sigma(y-x) \\
\dot{x}
&
= \sigma(y-x) \\
\dot{y}
&
= \rho x - y - xz \\
\dot{y}
&
= \rho x - y - xz \\
...
@@ -104,6 +105,10 @@
...
@@ -104,6 +105,10 @@
Reveal
.
initialize
({
Reveal
.
initialize
({
transition
:
'
linear
'
,
transition
:
'
linear
'
,
math
:
{
mode
:
'
TeX-AMS_HTML-full
'
},
dependencies
:
[
dependencies
:
[
{
src
:
'
../lib/js/classList.js
'
,
condition
:
function
()
{
return
!
document
.
body
.
classList
;
}
},
{
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/marked.js
'
,
condition
:
function
()
{
return
!!
document
.
querySelector
(
'
[data-markdown]
'
);
}
},
...
...
This diff is collapsed.
Click to expand it.
plugin/math/math.js
+
24
−
14
View file @
39019040
...
@@ -4,7 +4,9 @@
...
@@ -4,7 +4,9 @@
*
*
* @author Hakim El Hattab
* @author Hakim El Hattab
*/
*/
(
function
(){
var
RevealMath
=
window
.
RevealMath
||
(
function
(){
var
loaded
=
false
;
var
config
=
Reveal
.
getConfig
().
math
||
{};
var
config
=
Reveal
.
getConfig
().
math
||
{};
config
.
mode
=
config
.
mode
||
'
TeX-AMS_HTML-full
'
;
config
.
mode
=
config
.
mode
||
'
TeX-AMS_HTML-full
'
;
...
@@ -16,32 +18,40 @@
...
@@ -16,32 +18,40 @@
// Detect when the script has loaded
// Detect when the script has loaded
script
.
onload
=
onScriptLoad
;
script
.
onload
=
onScriptLoad
;
// IE
script
.
onreadystatechange
=
function
()
{
script
.
onreadystatechange
=
function
()
{
if
(
this
.
readyState
===
'
loaded
'
)
{
if
(
this
.
readyState
===
'
loaded
'
)
{
onScriptLoad
.
call
();
onScriptLoad
.
call
();
}
}
}
}
// Normal browsers
head
.
appendChild
(
script
);
head
.
appendChild
(
script
);
function
onScriptLoad
()
{
function
onScriptLoad
()
{
MathJax
.
Hub
.
Config
({
// Conditioned just in case both onload and readystate fire
messageStyle
:
'
none
'
,
if
(
loaded
===
false
)
{
tex2jax
:
{
inlineMath
:
[[
'
$
'
,
'
$
'
],[
'
\\
(
'
,
'
\\
)
'
]]
}
loaded
=
true
;
});
// Process any math inside of the current slide when navigating,
MathJax
.
Hub
.
Config
({
// this is important since it's not possible to typeset
messageStyle
:
'
none
'
,
// equations within invisible elements (far future or past).
tex2jax
:
{
inlineMath
:
[[
'
$
'
,
'
$
'
],[
'
\\
(
'
,
'
\\
)
'
]]
}
Reveal
.
addEventListener
(
'
slidechanged
'
,
function
(
event
)
{
});
//
This will only typeset equations that have not yet been
//
Process any math inside of the current slide when navigating,
//
processed, as well as equations that have change since
//
this is needed since it's not possible to typeset equations
//
last being processed
.
//
within invisible elements (far future or past)
.
MathJax
.
Hub
.
Update
(
event
.
currentSlide
);
Reveal
.
addEventListener
(
'
slidechanged
'
,
function
(
event
)
{
}
);
// This will only typeset equations that have not yet been
// processed, as well as equations that have change since
// last being processed.
MathJax
.
Hub
.
Update
(
event
.
currentSlide
);
}
);
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment