mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-11 13:18:21 -04:00
Add some MathJax checks and AMSmath support
Former-commit-id: 0aa283e8a81ccef805a5291ce542fadcd046cf5b [formerly 8035fadee8e63ab5cc921bbdc36305b0f10bffd8] Former-commit-id: a9c67045928e431a5b849de4c68ce589c8069564
This commit is contained in:
parent
3a2b534399
commit
f8917dec6d
@ -21,6 +21,6 @@
|
|||||||
<WindowsPhoneEmulatorID>F0AB49D8-754C-4531-A635-E6B4395FD39A;Mobile Emulator 10.0.15063.0 QHD 5.2 inch 3GB</WindowsPhoneEmulatorID>
|
<WindowsPhoneEmulatorID>F0AB49D8-754C-4531-A635-E6B4395FD39A;Mobile Emulator 10.0.15063.0 QHD 5.2 inch 3GB</WindowsPhoneEmulatorID>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||||
<DebuggerFlavor>AppHostDeviceDebugger</DebuggerFlavor>
|
<DebuggerFlavor>AppHostLocalDebugger</DebuggerFlavor>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
@ -32,7 +32,7 @@
|
|||||||
<AppXManifest Include="C:\Users\geoff\Source\Repos\kiwix-js-windows\bin\Release\AppxManifest.xml">
|
<AppXManifest Include="C:\Users\geoff\Source\Repos\kiwix-js-windows\bin\Release\AppxManifest.xml">
|
||||||
<PackagePath>AppxManifest.xml</PackagePath>
|
<PackagePath>AppxManifest.xml</PackagePath>
|
||||||
<ReRegisterAppIfChanged>true</ReRegisterAppIfChanged>
|
<ReRegisterAppIfChanged>true</ReRegisterAppIfChanged>
|
||||||
<Modified>2017-08-07T05:59:43.248</Modified>
|
<Modified>2017-08-07T07:17:46.496</Modified>
|
||||||
</AppXManifest>
|
</AppXManifest>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@ -531,7 +531,7 @@
|
|||||||
</AppxPackagedFile>
|
</AppxPackagedFile>
|
||||||
<AppxPackagedFile Include="C:\Users\geoff\Source\Repos\kiwix-js-windows\www\js\app.js">
|
<AppxPackagedFile Include="C:\Users\geoff\Source\Repos\kiwix-js-windows\www\js\app.js">
|
||||||
<PackagePath>www\js\app.js</PackagePath>
|
<PackagePath>www\js\app.js</PackagePath>
|
||||||
<Modified>2017-08-07T05:50:10.176</Modified>
|
<Modified>2017-08-07T06:45:19.435</Modified>
|
||||||
</AppxPackagedFile>
|
</AppxPackagedFile>
|
||||||
<AppxPackagedFile Include="C:\Users\geoff\Source\Repos\kiwix-js-windows\www\js\init.js">
|
<AppxPackagedFile Include="C:\Users\geoff\Source\Repos\kiwix-js-windows\www\js\init.js">
|
||||||
<PackagePath>www\js\init.js</PackagePath>
|
<PackagePath>www\js\init.js</PackagePath>
|
||||||
@ -603,7 +603,7 @@
|
|||||||
</AppxPackagedFile>
|
</AppxPackagedFile>
|
||||||
<AppxPackagedFile Include="C:\Users\geoff\Source\Repos\kiwix-js-windows\www\js\MathJax\config\config.js">
|
<AppxPackagedFile Include="C:\Users\geoff\Source\Repos\kiwix-js-windows\www\js\MathJax\config\config.js">
|
||||||
<PackagePath>www\js\MathJax\config\config.js</PackagePath>
|
<PackagePath>www\js\MathJax\config\config.js</PackagePath>
|
||||||
<Modified>2017-08-05T18:18:34.635</Modified>
|
<Modified>2017-08-07T07:17:27.329</Modified>
|
||||||
</AppxPackagedFile>
|
</AppxPackagedFile>
|
||||||
<AppxPackagedFile Include="C:\Users\geoff\Source\Repos\kiwix-js-windows\www\js\MathJax\extensions\a11y\accessibility-menu.js">
|
<AppxPackagedFile Include="C:\Users\geoff\Source\Repos\kiwix-js-windows\www\js\MathJax\extensions\a11y\accessibility-menu.js">
|
||||||
<PackagePath>www\js\MathJax\extensions\a11y\accessibility-menu.js</PackagePath>
|
<PackagePath>www\js\MathJax\extensions\a11y\accessibility-menu.js</PackagePath>
|
||||||
@ -1456,7 +1456,7 @@
|
|||||||
<AppxPackagedFile Include="C:\Users\geoff\Source\Repos\kiwix-js-windows\bin\Release\ReverseMap\resources.pri">
|
<AppxPackagedFile Include="C:\Users\geoff\Source\Repos\kiwix-js-windows\bin\Release\ReverseMap\resources.pri">
|
||||||
<PackagePath>resources.pri</PackagePath>
|
<PackagePath>resources.pri</PackagePath>
|
||||||
<ReRegisterAppIfChanged>true</ReRegisterAppIfChanged>
|
<ReRegisterAppIfChanged>true</ReRegisterAppIfChanged>
|
||||||
<Modified>2017-08-07T05:58:16.299</Modified>
|
<Modified>2017-08-07T06:40:52.194</Modified>
|
||||||
</AppxPackagedFile>
|
</AppxPackagedFile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
MathJax.Hub.Config({
|
MathJax.Hub.Config({
|
||||||
extensions: ["tex2jax.js"],
|
extensions: ["tex2jax.js"],
|
||||||
jax: ["input/TeX", "output/HTML-CSS"],
|
jax: ["input/TeX", "output/HTML-CSS"],
|
||||||
|
TeX: {
|
||||||
|
extensions: ["AMSmath.js", "AMSsymbols.js"]
|
||||||
|
},
|
||||||
"HTML-CSS": {
|
"HTML-CSS": {
|
||||||
availableFonts: ["TeX"],
|
availableFonts: ["TeX"],
|
||||||
imageFont: null
|
imageFont: null
|
||||||
@ -11,9 +14,3 @@ MathJax.Hub.Config({
|
|||||||
showLocale: false
|
showLocale: false
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
function Typeset(element) {
|
|
||||||
MathJax.Hub.Queue(["Typeset", MathJax.Hub, element]);
|
|
||||||
}
|
|
||||||
function Configured() {
|
|
||||||
MathJax.Hub.Configured();
|
|
||||||
}
|
|
||||||
|
@ -1320,8 +1320,9 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies','abstractFiles
|
|||||||
//TESTING
|
//TESTING
|
||||||
if (countImages <= maxVisibleSliceSize + prefetchSliceSize) { console.timeEnd("Time to Document Ready"); }
|
if (countImages <= maxVisibleSliceSize + prefetchSliceSize) { console.timeEnd("Time to Document Ready"); }
|
||||||
|
|
||||||
|
if (svgSlice.length) {
|
||||||
//Use the MathJax method of typesetting formulae if user has requested this
|
//Use the MathJax method of typesetting formulae if user has requested this
|
||||||
if (params['useMathJax']) {
|
if (params['useMathJax'] && window.frames[0].MathJax) {
|
||||||
var counter = 0;
|
var counter = 0;
|
||||||
$(svgSlice).each(function () {
|
$(svgSlice).each(function () {
|
||||||
var node = this;
|
var node = this;
|
||||||
@ -1340,6 +1341,7 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies','abstractFiles
|
|||||||
});
|
});
|
||||||
window.frames[0].MathJax.Hub.Queue(["Typeset", window.frames[0].MathJax.Hub]);
|
window.frames[0].MathJax.Hub.Queue(["Typeset", window.frames[0].MathJax.Hub]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//If there are any SVGs left which were not dealt with by MathJax, process fallback images
|
//If there are any SVGs left which were not dealt with by MathJax, process fallback images
|
||||||
if (svgSlice.length) {
|
if (svgSlice.length) {
|
||||||
console.log("** Slicing " + svgSlice.length + " SVG images...");
|
console.log("** Slicing " + svgSlice.length + " SVG images...");
|
||||||
|
9
www/js/MathJax/config/config.js
vendored
9
www/js/MathJax/config/config.js
vendored
@ -1,6 +1,9 @@
|
|||||||
MathJax.Hub.Config({
|
MathJax.Hub.Config({
|
||||||
extensions: ["tex2jax.js"],
|
extensions: ["tex2jax.js"],
|
||||||
jax: ["input/TeX", "output/HTML-CSS"],
|
jax: ["input/TeX", "output/HTML-CSS"],
|
||||||
|
TeX: {
|
||||||
|
extensions: ["AMSmath.js", "AMSsymbols.js"]
|
||||||
|
},
|
||||||
"HTML-CSS": {
|
"HTML-CSS": {
|
||||||
availableFonts: ["TeX"],
|
availableFonts: ["TeX"],
|
||||||
imageFont: null
|
imageFont: null
|
||||||
@ -11,9 +14,3 @@ MathJax.Hub.Config({
|
|||||||
showLocale: false
|
showLocale: false
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
function Typeset(element) {
|
|
||||||
MathJax.Hub.Queue(["Typeset", MathJax.Hub, element]);
|
|
||||||
}
|
|
||||||
function Configured() {
|
|
||||||
MathJax.Hub.Configured();
|
|
||||||
}
|
|
||||||
|
@ -1322,7 +1322,7 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies','abstractFiles
|
|||||||
|
|
||||||
if (svgSlice.length) {
|
if (svgSlice.length) {
|
||||||
//Use the MathJax method of typesetting formulae if user has requested this
|
//Use the MathJax method of typesetting formulae if user has requested this
|
||||||
if (params['useMathJax']) {
|
if (params['useMathJax'] && window.frames[0].MathJax) {
|
||||||
var counter = 0;
|
var counter = 0;
|
||||||
$(svgSlice).each(function () {
|
$(svgSlice).each(function () {
|
||||||
var node = this;
|
var node = this;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user