Add MathJax support

This commit is contained in:
benweet 2013-05-14 00:26:55 +01:00
parent 6c83a8f67c
commit ae18740c52
4 changed files with 6 additions and 36 deletions

View File

@ -1 +1 @@
CACHE MANIFEST # v28 CACHE: index.html viewer.html css/main-min.css js/main-min.js js/require.js img/ajax-loader.gif img/glyphicons-halflings.png img/glyphicons-halflings-white.png img/icons.png img/stackedit-32.ico img/stackedit-promo.png lib/MathJax/config/TeX-AMS_HTML.js lib/MathJax/jax/output/HTML-CSS/jax.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/fontdata.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Arrows.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/BBBold.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/BoxDrawing.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/CombDiacritMarks.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Dingbats.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/EnclosedAlphanum.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/GeneralPunctuation.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/GeometricShapes.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/GreekAndCoptic.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Latin1Supplement.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/LatinExtendedA.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/LetterlikeSymbols.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Main.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MathOperators.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscMathSymbolsB.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscSymbols.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscTechnical.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/PUA.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/SpacingModLetters.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/SuppMathOperators.js NETWORK: * CACHE MANIFEST # v28 CACHE: index.html viewer.html css/main-min.css js/main-min.js js/require.js img/ajax-loader.gif img/glyphicons-halflings.png img/glyphicons-halflings-white.png img/icons.png img/stackedit-32.ico img/stackedit-promo.png lib/MathJax/MathJax.js lib/MathJax/config/TeX-AMS_HTML.js lib/MathJax/jax/output/HTML-CSS/jax.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/fontdata.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Arrows.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/BBBold.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/BoxDrawing.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/CombDiacritMarks.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Dingbats.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/EnclosedAlphanum.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/GeneralPunctuation.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/GeometricShapes.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/GreekAndCoptic.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Latin1Supplement.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/LatinExtendedA.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/LetterlikeSymbols.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Main.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MathOperators.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscMathSymbolsB.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscSymbols.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscTechnical.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/PUA.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/SpacingModLetters.js lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/SuppMathOperators.js NETWORK: *

26
js/main-min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,9 @@
// RequireJS configuration // RequireJS configuration
requirejs.config({ requirejs.config({
waitSeconds: 0, waitSeconds: 0,
paths: {
MathJax: '../lib/MathJax/MathJax.js?config=TeX-AMS_HTML'
},
shim: { shim: {
'jquery-ui': ['jquery'], 'jquery-ui': ['jquery'],
'bootstrap': ['jquery'], 'bootstrap': ['jquery'],
@ -11,15 +14,6 @@ requirejs.config({
} }
}); });
var load = requirejs.load;
requirejs.load = function (context, moduleId, url) {
// MathJax configuration
if(url.indexOf("MathJax.js") !== -1) {
url += "?config=TeX-AMS_HTML";
}
return load(context, moduleId, url);
};
require(["jquery", "file-manager", "synchronizer", "publisher"], function($) { require(["jquery", "file-manager", "synchronizer", "publisher"], function($) {
$(function() { $(function() {
// If browser has detected a new application cache. // If browser has detected a new application cache.

View File

@ -1,4 +1,4 @@
define([ "../lib/MathJax/MathJax" ], function() { define([ "MathJax" ], function() {
MathJax.Hub.Config({"HTML-CSS": {preferredFont: "TeX",availableFonts: ["STIX", "TeX"],linebreaks: {automatic: true},EqnChunk: (MathJax.Hub.Browser.isMobile ? 10 : 50), imageFont: null}, MathJax.Hub.Config({"HTML-CSS": {preferredFont: "TeX",availableFonts: ["STIX", "TeX"],linebreaks: {automatic: true},EqnChunk: (MathJax.Hub.Browser.isMobile ? 10 : 50), imageFont: null},
tex2jax: {inlineMath: [["$", "$"], ["\\\\(", "\\\\)"]],displayMath: [["$$", "$$"], ["\\[", "\\]"]],processEscapes: true,ignoreClass: "tex2jax_ignore|dno"}, tex2jax: {inlineMath: [["$", "$"], ["\\\\(", "\\\\)"]],displayMath: [["$$", "$$"], ["\\[", "\\]"]],processEscapes: true,ignoreClass: "tex2jax_ignore|dno"},