Skip to content

Commit

Permalink
Adds MathJax init code
Browse files Browse the repository at this point in the history
  • Loading branch information
jbasdf committed Oct 6, 2016
1 parent 26930a6 commit f4079ac
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 75 deletions.
Empty file modified bin/nginx.sh 100644 → 100755
Empty file.
14 changes: 13 additions & 1 deletion client/html/layouts/application.html
Expand Up @@ -23,7 +23,19 @@
};
window.DEFAULT_JWT = null;
</script>
<script src="MathJax/MathJax.js?config=default"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX", "output/HTML-CSS"],
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
processEscapes: true
},
"HTML-CSS": { availableFonts: ["TeX"] }
});
</script>
<script src="MathJax/MathJax.js?config=TeX-MML-AM_HTMLorMML.js"></script>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
Expand Down
3 changes: 3 additions & 0 deletions client/js/components/assessments/item.jsx
Expand Up @@ -43,6 +43,9 @@ export default class Item extends React.Component{
};

componentDidMount(){

MathJax.Hub.Queue(new Array('Typeset', MathJax.Hub));

if(!_.isFunction(videojs)){return;}
// Look for videos that should be using videojs.
var videoJSElements = document.querySelectorAll('video.video-js');
Expand Down
74 changes: 0 additions & 74 deletions client/js/utils/mathjax_init.js

This file was deleted.

0 comments on commit f4079ac

Please sign in to comment.