This is an automated email from the ASF dual-hosted git repository.

placave pushed a commit to branch mathjax
in repository https://gitbox.apache.org/repos/asf/datasketches-website.git

commit a957f33215232b0839b196b54f04d21c75439c20
Author: Pierre Lacave <[email protected]>
AuthorDate: Sun Mar 24 21:01:35 2024 +0100

    Fix MatJax setup
---
 _includes/site_head.html                      |  6 ++-
 js/config/TeX-AMS_HTML.js                     | 53 +++++++++++++++++++++++++++
 js/extensions/MathMenu.js                     | 19 ++++++++++
 js/extensions/MathZoom.js                     | 19 ++++++++++
 js/jax/output/HTML-CSS/fonts/STIX/fontdata.js | 19 ++++++++++
 js/jax/output/HTML-CSS/jax.js                 | 19 ++++++++++
 6 files changed, 134 insertions(+), 1 deletion(-)

diff --git a/_includes/site_head.html b/_includes/site_head.html
index 9264eece..37981c7e 100644
--- a/_includes/site_head.html
+++ b/_includes/site_head.html
@@ -21,8 +21,12 @@
 <link rel="stylesheet" href="/css/syntax.css">
 <link rel="stylesheet" href="/css/docs.css">
 
+<script type="text/x-mathjax-config">
+  MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
+</script>
+
 <!-- original source: 
https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMX_HTML-full
 -->
-<script type="text/javascript" src="/js/MathJax.js"></script>
+<script type="text/javascript" 
src="/js/MathJax.js?config=TeX-AMS_HTML"></script>
 
 <!-- original source: https://code.jquery.com/jquery.min.js -->
 <script src="/js/jquery.min.js"></script>
diff --git a/js/config/TeX-AMS_HTML.js b/js/config/TeX-AMS_HTML.js
new file mode 100644
index 00000000..1cf9606c
--- /dev/null
+++ b/js/config/TeX-AMS_HTML.js
@@ -0,0 +1,53 @@
+/*
+ *  /MathJax/config/TeX-AMS_HTML.js
+ *  
+ *  Copyright (c) 2010-2017 The MathJax Consortium
+ *
+ *  Part of the MathJax library.
+ *  See http://www.mathjax.org for details.
+ * 
+ *  Licensed under the Apache License, Version 2.0;
+ *  you may not use this file except in compliance with the License.
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ */
+
+MathJax.Ajax.Preloading(
+  "[MathJax]/jax/input/TeX/config.js",
+  "[MathJax]/jax/output/HTML-CSS/config.js",
+  "[MathJax]/jax/output/PreviewHTML/config.js",
+  "[MathJax]/extensions/tex2jax.js",
+  "[MathJax]/extensions/MathEvents.js",
+  "[MathJax]/extensions/MathZoom.js",
+  "[MathJax]/extensions/MathMenu.js",
+  "[MathJax]/jax/element/mml/jax.js",
+  "[MathJax]/extensions/toMathML.js",
+  "[MathJax]/extensions/TeX/noErrors.js",
+  "[MathJax]/extensions/TeX/noUndefined.js",
+  "[MathJax]/jax/input/TeX/jax.js",
+  "[MathJax]/extensions/TeX/AMSmath.js",
+  "[MathJax]/extensions/TeX/AMSsymbols.js",
+  "[MathJax]/jax/output/PreviewHTML/jax.js",
+  "[MathJax]/extensions/fast-preview.js",
+  "[MathJax]/extensions/AssistiveMML.js",
+  "[MathJax]/extensions/a11y/accessibility-menu.js"
+);
+
+MathJax.InputJax.TeX=MathJax.InputJax({id:"TeX",version:"2.7.1",directory:MathJax.InputJax.directory+"/TeX",extensionDir:MathJax.InputJax.extensionDir+"/TeX",config:{TagSide:"right",TagIndent:"0.8em",MultLineWidth:"85%",equationNumbers:{autoNumber:"none",formatNumber:function(a){return
 
a},formatTag:function(a){return"("+a+")"},formatID:function(a){return"mjx-eqn-"+String(a).replace(/[:"'<>&]/g,"")},formatURL:function(b,a){return
 a+"#"+escape(b)},useLabelIds:true}},resetEquationNumbers:fu [...]
+MathJax.OutputJax["HTML-CSS"]=MathJax.OutputJax({id:"HTML-CSS",version:"2.7.1",directory:MathJax.OutputJax.directory+"/HTML-CSS",extensionDir:MathJax.OutputJax.extensionDir+"/HTML-CSS",autoloadDir:MathJax.OutputJax.directory+"/HTML-CSS/autoload",fontDir:MathJax.OutputJax.directory+"/HTML-CSS/fonts",webfontDir:MathJax.OutputJax.fontDir+"/HTML-CSS",config:{noReflows:true,matchFontHeight:true,scale:100,minScaleAdjust:50,availableFonts:["STIX","TeX"],preferredFont:"TeX",webFont:"TeX",imageFo
 [...]
+MathJax.OutputJax.PreviewHTML=MathJax.OutputJax({id:"PreviewHTML",version:"2.7.1",directory:MathJax.OutputJax.directory+"/PreviewHTML",extensionDir:MathJax.OutputJax.extensionDir+"/PreviewHTML",noFastPreview:true,config:{scale:100,minScaleAdjust:50,mtextFontInherit:false,linebreaks:{automatic:false,width:"container"}}});if(!MathJax.Hub.config.delayJaxRegistration){MathJax.OutputJax.PreviewHTML.Register("jax/mml")}MathJax.OutputJax.PreviewHTML.loadComplete("config.js");
+MathJax.Extension.tex2jax={version:"2.7.1",config:{inlineMath:[["\\(","\\)"]],displayMath:[["$$","$$"],["\\[","\\]"]],balanceBraces:true,skipTags:["script","noscript","style","textarea","pre","code","annotation","annotation-xml"],ignoreClass:"tex2jax_ignore",processClass:"tex2jax_process",processEscapes:false,processEnvironments:true,processRefs:true,preview:"TeX"},ignoreTags:{br:(MathJax.Hub.Browser.isMSIE&&document.documentMode<9?"\n":"
 "),wbr:"","#comment":""},PreProcess:function(a){i [...]
+(function(d,h,l,g,m,b,j){var p="2.7.1";var i=MathJax.Extension;var 
c=i.MathEvents={version:p};var k=d.config.menuSettings;var 
o={hover:500,frame:{x:3.5,y:5,bwidth:1,bcolor:"#A6D",hwidth:"15px",hcolor:"#83A"},button:{x:-6,y:-3,wx:-2},fadeinInc:0.2,fadeoutInc:0.05,fadeDelay:50,fadeoutStart:400,fadeoutDelay:15*1000,styles:{".MathJax_Hover_Frame":{"border-radius":".25em","-webkit-border-radius":".25em","-moz-border-radius":".25em","-khtml-border-radius":".25em","box-shadow":"0px
 0px 15px #83 [...]
+(function(a,d,f,c,j){var k="2.7.1";var 
i=a.CombineConfig("MathZoom",{styles:{"#MathJax_Zoom":{position:"absolute","background-color":"#F0F0F0",overflow:"auto",display:"block","z-index":301,padding:".5em",border:"1px
 solid 
black",margin:0,"font-weight":"normal","font-style":"normal","text-align":"left","text-indent":0,"text-transform":"none","line-height":"normal","letter-spacing":"normal","word-spacing":"normal","word-wrap":"normal","white-space":"nowrap","float":"none","-webkit-box-sizi
 [...]
+(function(f,o,q,e,r){var p="2.7.1";var 
d=MathJax.Callback.Signal("menu");MathJax.Extension.MathMenu={version:p,signal:d};var
 t=function(u){return 
MathJax.Localization._.apply(MathJax.Localization,[["MathMenu",u]].concat([].slice.call(arguments,1)))};var
 i=MathJax.Object.isArray;var 
a=f.Browser.isPC,l=f.Browser.isMSIE,m=((document.documentMode||0)>8);var 
j=(a?null:"5px");var 
s=f.CombineConfig("MathMenu",{delay:150,showRenderer:true,showMathPlayer:true,showFontMenu:false,showContext:false,
 [...]
+MathJax.ElementJax.mml=MathJax.ElementJax({mimeType:"jax/mml"},{id:"mml",version:"2.7.1",directory:MathJax.ElementJax.directory+"/mml",extensionDir:MathJax.ElementJax.extensionDir+"/mml",optableDir:MathJax.ElementJax.directory+"/mml/optable"});MathJax.ElementJax.mml.Augment({Init:function(){if(arguments.length===1&&arguments[0].type==="math"){this.root=arguments[0]}else{this.root=MathJax.ElementJax.mml.math.apply(this,arguments)}if(this.root.attr&&this.root.attr.mode){if(!this.root.displ
 [...]
+MathJax.Hub.Register.LoadHook("[MathJax]/jax/element/mml/jax.js",function(){var
 c="2.7.1";var 
a=MathJax.ElementJax.mml,b=MathJax.Hub.config.menuSettings;a.mbase.Augment({toMathML:function(l){var
 h=(this.inferred&&this.parent.inferRow);if(l==null){l=""}var 
f=this.type,e=this.toMathMLattributes();if(f==="mspace"){return l+"<"+f+e+" 
/>"}var k=[],j=(this.isToken?"":l+(h?"":"  "));for(var 
g=0,d=this.data.length;g<d;g++){if(this.data[g]){k.push(this.data[g].toMathML(j))}else{if(!this.isToken&&
 [...]
+(function(b,e){var d="2.7.1";var 
a=b.CombineConfig("TeX.noErrors",{disabled:false,multiLine:true,inlineDelimiters:["",""],style:{"font-size":"90%","text-align":"left",color:"black",padding:"1px
 3px",border:"1px solid"}});var 
c="\u00A0";MathJax.Extension["TeX/noErrors"]={version:d,config:a};b.Register.StartupHook("TeX
 Jax Ready",function(){var 
f=MathJax.InputJax.TeX.formatError;MathJax.InputJax.TeX.Augment({formatError:function(j,i,k,g){if(a.disabled){return
 f.apply(this,arguments)}var h= [...]
+MathJax.Extension["TeX/noUndefined"]={version:"2.7.1",config:MathJax.Hub.CombineConfig("TeX.noUndefined",{disabled:false,attributes:{mathcolor:"red"}})};MathJax.Hub.Register.StartupHook("TeX
 Jax Ready",function(){var b=MathJax.Extension["TeX/noUndefined"].config;var 
a=MathJax.ElementJax.mml;var 
c=MathJax.InputJax.TeX.Parse.prototype.csUndefined;MathJax.InputJax.TeX.Parse.Augment({csUndefined:function(d){if(b.disabled){return
 c.apply(this,arguments)}MathJax.Hub.signal.Post(["TeX Jax - und [...]
+(function(d,c,j){var i,h="\u00A0";var k=function(m){return 
MathJax.Localization._.apply(MathJax.Localization,[["TeX",m]].concat([].slice.call(arguments,1)))};var
 f=MathJax.Object.isArray;var 
e=MathJax.Object.Subclass({Init:function(n,m){this.global={isInner:m};this.data=[b.start(this.global)];if(n){this.data[0].env=n}this.env=this.data[0].env},Push:function(){var
 
o,n,p,q;for(o=0,n=arguments.length;o<n;o++){p=arguments[o];if(!p){continue}if(p 
instanceof i.mbase){p=b.mml(p)}p.global=this.g [...]
+MathJax.Extension["TeX/AMSmath"]={version:"2.7.1",number:0,startNumber:0,IDs:{},eqIDs:{},labels:{},eqlabels:{},refs:[]};MathJax.Hub.Register.StartupHook("TeX
 Jax Ready",function(){var 
b=MathJax.ElementJax.mml,h=MathJax.InputJax.TeX,g=MathJax.Extension["TeX/AMSmath"];var
 d=h.Definitions,f=h.Stack.Item,a=h.config.equationNumbers;var 
c=function(k){var n=[];for(var 
l=0,j=k.length;l<j;l++){n[l]=h.Parse.prototype.Em(k[l])}return n.join(" ")};var 
e=(document.getElementsByTagName("base").length= [...]
+MathJax.Extension["TeX/AMSsymbols"]={version:"2.7.1"};MathJax.Hub.Register.StartupHook("TeX
 Jax Ready",function(){var 
a=MathJax.ElementJax.mml,b=MathJax.InputJax.TeX.Definitions;b.Add({mathchar0mi:{digamma:"03DD",varkappa:"03F0",varGamma:["0393",{mathvariant:a.VARIANT.ITALIC}],varDelta:["0394",{mathvariant:a.VARIANT.ITALIC}],varTheta:["0398",{mathvariant:a.VARIANT.ITALIC}],varLambda:["039B",{mathvariant:a.VARIANT.ITALIC}],varXi:["039E",{mathvariant:a.VARIANT.ITALIC}],varPi:["03A0",{mathv
 [...]
+(function(i,b,e,g){var h;var j,a,d;var f="'Times New 
Roman',Times,STIXGeneral,serif";var 
m={".MJXp-script":{"font-size":".8em"},".MJXp-right":{"-webkit-transform-origin":"right","-moz-transform-origin":"right","-ms-transform-origin":"right","-o-transform-origin":"right","transform-origin":"right"},".MJXp-bold":{"font-weight":"bold"},".MJXp-italic":{"font-style":"italic"},".MJXp-scr":{"font-family":"MathJax_Script,"+f},".MJXp-frak":{"font-family":"MathJax_Fraktur,"+f},".MJXp-sf":{"font-fa
 [...]
+(function(b,g,f){var c=b.config.menuSettings;var e=MathJax.OutputJax;var 
a=f.isMSIE&&(document.documentMode||0)<8;var 
d=MathJax.Extension["fast-preview"]={version:"2.7.1",enabled:true,config:b.CombineConfig("fast-preview",{Chunks:{EqnChunk:10000,EqnChunkFactor:1,EqnChunkDelay:0},color:"inherit!important",updateTime:30,updateDelay:6,messageStyle:"none",disabled:f.isMSIE&&!f.versionAtLeast("8.0")}),Config:function(){if(b.config["CHTML-preview"]){MathJax.Hub.Config({"fast-preview":b.config[
 [...]
+(function(a,e,b,f){var c=b.config.menuSettings;var 
d=MathJax.Extension.AssistiveMML={version:"2.7.1",config:b.CombineConfig("AssistiveMML",{disabled:false,styles:{".MJX_Assistive_MathML":{position:"absolute!important",top:0,left:0,clip:(b.Browser.isMSIE&&(document.documentMode||0)<8?"rect(1px
 1px 1px 1px)":"rect(1px, 1px, 1px, 1px)"),padding:"1px 0 0 
0!important",border:"0!important",height:"1px!important",width:"1px!important",overflow:"hidden!important",display:"block!important","-webk
 [...]
+!function(a,b){var 
c,d,e=a.config.menuSettings,f=Function.prototype.bind?function(a,b){return 
a.bind(b)}:function(a,b){return 
function(){a.apply(b,arguments)}},g=Object.keys||function(a){var b=[];for(var c 
in a)a.hasOwnProperty(c)&&b.push(c);return 
b},h=MathJax.Ajax.config.path;h.a11y||(h.a11y=a.config.root+"/extensions/a11y");var
 
i=b["accessibility-menu"]={version:"1.2.0",prefix:"",default:{},modules:[],MakeOption:function(a){return
 i.prefix+a},GetOption:function(a){return e[i.MakeOptio [...]
diff --git a/js/extensions/MathMenu.js b/js/extensions/MathMenu.js
new file mode 100644
index 00000000..fd886bc1
--- /dev/null
+++ b/js/extensions/MathMenu.js
@@ -0,0 +1,19 @@
+/*
+ *  /MathJax/extensions/MathMenu.js
+ *
+ *  Copyright (c) 2009-2017 The MathJax Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+(function(f,o,q,e,r){var p="2.7.1";var 
d=MathJax.Callback.Signal("menu");MathJax.Extension.MathMenu={version:p,signal:d};var
 t=function(u){return 
MathJax.Localization._.apply(MathJax.Localization,[["MathMenu",u]].concat([].slice.call(arguments,1)))};var
 i=MathJax.Object.isArray;var 
a=f.Browser.isPC,l=f.Browser.isMSIE,m=((document.documentMode||0)>8);var 
j=(a?null:"5px");var 
s=f.CombineConfig("MathMenu",{delay:150,showRenderer:true,showMathPlayer:true,showFontMenu:false,showContext:false,
 [...]
diff --git a/js/extensions/MathZoom.js b/js/extensions/MathZoom.js
new file mode 100644
index 00000000..396c8feb
--- /dev/null
+++ b/js/extensions/MathZoom.js
@@ -0,0 +1,19 @@
+/*
+ *  /MathJax/extensions/MathZoom.js
+ *
+ *  Copyright (c) 2009-2017 The MathJax Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+(function(a,d,f,c,j){var k="2.7.1";var 
i=a.CombineConfig("MathZoom",{styles:{"#MathJax_Zoom":{position:"absolute","background-color":"#F0F0F0",overflow:"auto",display:"block","z-index":301,padding:".5em",border:"1px
 solid 
black",margin:0,"font-weight":"normal","font-style":"normal","text-align":"left","text-indent":0,"text-transform":"none","line-height":"normal","letter-spacing":"normal","word-spacing":"normal","word-wrap":"normal","white-space":"nowrap","float":"none","-webkit-box-sizi
 [...]
diff --git a/js/jax/output/HTML-CSS/fonts/STIX/fontdata.js 
b/js/jax/output/HTML-CSS/fonts/STIX/fontdata.js
new file mode 100644
index 00000000..4039dfd3
--- /dev/null
+++ b/js/jax/output/HTML-CSS/fonts/STIX/fontdata.js
@@ -0,0 +1,19 @@
+/*
+ *  /MathJax/jax/output/HTML-CSS/fonts/STIX/fontdata.js
+ *
+ *  Copyright (c) 2009-2017 The MathJax Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+(function(j,b,s){var t="2.7.1";j.allowWebFonts=false;var 
m="STIXGeneral",u="STIXGeneral-bold",q="STIXGeneral-italic",v="STIXGeneral-bold-italic",r="STIXNonUnicode",p="STIXNonUnicode-italic",i="STIXSizeOneSym",h="STIXSizeTwoSym",g="STIXSizeThreeSym",d="STIXSizeFourSym",c="STIXSizeFiveSym";var
 l="H",a="V",n={load:"extra",dir:l},f={load:"extra",dir:a};var 
k=[8722,m,0,0,0,-0.26,-0.26];j.Augment({FONTDATA:{version:t,STIXversion:"1.1",TeX_factor:1.125,baselineskip:1.2,lineH:0.8,lineD:0.2,FONTS
 [...]
diff --git a/js/jax/output/HTML-CSS/jax.js b/js/jax/output/HTML-CSS/jax.js
new file mode 100644
index 00000000..49897ede
--- /dev/null
+++ b/js/jax/output/HTML-CSS/jax.js
@@ -0,0 +1,19 @@
+/*
+ *  /MathJax/jax/output/HTML-CSS/jax.js
+ *
+ *  Copyright (c) 2009-2017 The MathJax Consortium
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+(function(j,b,d){var i,k=b.Browser.isMobile;var h=MathJax.Object.isArray;var 
e=function(){var 
m=[].slice.call(arguments,0);m[0][0]=["HTML-CSS",m[0][0]];return 
MathJax.Message.Set.apply(MathJax.Message,m)};var 
f=MathJax.Object.Subclass({timeout:(k?15:8)*1000,comparisonFont:["sans-serif","monospace","script","Times","Courier","Arial","Helvetica"],testSize:["40px","50px","60px","30px","20px"],FedoraSTIXcheck:{family:"STIXSizeOneSym",testString:"abcABC",noStyleChar:true},Init:function(){this
 [...]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to