diff --git a/dist/arabic.css b/dist/arabic.css index e6c0f78..2e8c28c 100644 --- a/dist/arabic.css +++ b/dist/arabic.css @@ -7,5 +7,6 @@ .MJXc-stacked>.mjx-numerator>span>.mfliph.mar>.MJXc-TeX-unknown-R{padding-top:.45em;border:0} .MJXc-stacked>.mjx-denominator>span>.mfliph.mar>.MJXc-TeX-unknown-R{padding-bottom:.45em;border:0} .MJXc-stacked>.mjx-denominator>span>.mfliph>.mjx-char.MJXc-TeX-unknown-R{padding-bottom:.45em;border:0} +.MathJax_CHTML .mjx-mrow>.mjx-mtext .mjx-char.MJXc-TeX-unknown-R{border:solid transparent;border-width:.45em 0} .MathJax .mfliph{display:inline-block !important;-moz-transform:scaleX(-1);-webkit-transform:scaleX(-1);-o-transform:scaleX(-1);transform:scaleX(-1);-ms-filter:fliph;filter:fliph} .MathJax .mar{font-style:normal !important}.MathJax .mar>span{font-style:normal !important} \ No newline at end of file diff --git a/dist/arabic.js b/dist/arabic.js index 97087b6..c014cef 100644 --- a/dist/arabic.js +++ b/dist/arabic.js @@ -21,4 +21,4 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -!function(){var a=["mfrac","mi","mn","mo","mroot","mrow","ms","msqrt","mstyle","msubsup","mtext"];MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function(){var t=MathJax.OutputJax.CommonHTML,r=t.unknownChar;t.Augment({unknownChar:function(){var a=MathJax.Hub.config.Arabic.arabicUnicodeStart,t=MathJax.Hub.config.Arabic.arabicUnicodeEnd,n=r.apply(this,arguments),e=n.n,i=a<=e&&e<=t;return i&&(n.type="char"),n}}),MathJax.Hub.Register.StartupHook("Arabic TeX Ready",function(){var t=MathJax.ElementJax.mml,r=function(a){var r=t[a].prototype.toCommonHTML;t[a].Augment({toCommonHTML:function(){var a=r.apply(this,arguments);if(this.arabicFlipH){var t=document.createElement("span");for(t.className="mfliph","ar"===this.arabicFontLang&&(t.className+=" mar");a.firstChild;)t.appendChild(a.firstChild);a.appendChild(t)}return a}})};["mtr","mtd"].concat(a).forEach(r),MathJax.Hub.Register.StartupHook("CommonHTML multiline Ready",function(){var a=t.mbase.prototype.CHTMLaddLine;t.mbase.Augment({CHTMLaddLine:function(){var t=arguments[0];t&&t.querySelector(".mfliph")&&(t.className="mfliph"),a.apply(this,arguments)}}),MathJax.Hub.Startup.signal.Post("Arabic CommonHTML multiline Ready")}),MathJax.Hub.Register.StartupHook("CommonHTML mtable Ready",function(){r("mtable"),MathJax.Hub.Startup.signal.Post("Arabic CommonHTML mtable Ready")}),MathJax.Hub.Startup.signal.Post("Arabic CommonHTML Ready")})}),MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function(){MathJax.Hub.Register.StartupHook("Arabic TeX Ready",function(){var t=MathJax.ElementJax.mml,r=function(a){var r=t[a].prototype.toHTML;t[a].Augment({toHTML:function(){var a=r.apply(this,arguments);if(this.arabicFlipH){var t=document.createElement("span");for(t.className="mfliph","ar"===this.arabicFontLang&&(t.className+=" mar");a.firstChild;)t.appendChild(a.firstChild);a.appendChild(t)}return a}})};a.forEach(r),MathJax.Hub.Register.StartupHook("HTML-CSS multiline Ready",function(){var a=t.mbase.prototype.HTMLaddLine;t.mbase.Augment({HTMLaddLine:function(){var t=arguments[0];t&&t.querySelector(".mfliph")&&(t.className="mfliph"),a.apply(this,arguments)}}),MathJax.Hub.Startup.signal.Post("Arabic HTML-CSS multiline Ready")}),MathJax.Hub.Register.StartupHook("HTML-CSS mtable Ready",function(){r("mtable"),MathJax.Hub.Startup.signal.Post("Arabic HTML-CSS mtable Ready")}),MathJax.Hub.Startup.signal.Post("Arabic HTML-CSS Ready")})})}(),MathJax.Extension.Arabic={version:"2.1.0",config:MathJax.Hub.CombineConfig("Arabic",{dict:{Zero:["zero","Text",["0","\u0635\u0641\u0631"]],Radius:["radius","Text",["r","\u0646\u0642"]],Area:["Area","Text",["A","\u0645"]],Charge:["charge","TeX",["C","\\fliph{\\text{\u069b}}"]]},identifiersMap:{a:"\u0623",b:"\u0628",c:"\u062c\u0640",x:"\u0633",y:"\u0635",z:"\u0639",n:"\u0646",f:"\u0642",g:"\u062c\u0640",h:"\u0647\u0640",k:"\u0643",r:"\u0631",t:"\u062a",d:"\u062f",e:"\u0647\u0640",m:"\u0645",l:"\u0644",sin:"\u062c\u0627",cos:"\u062c\u062a\u0627",tan:"\u0638\u0627",cot:"\u0638\u062a\u0627",sec:"\u0642\u0627",csc:"\u0642\u062a\u0627",log:"\u0644\u0648"},numbersMap:{0:"\u0660",1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669"},arabicUnicodeStart:1536,arabicUnicodeEnd:1791,arabicLanguageRegExp:/([\u0600-\u06FF]+)/g,arabicDecimalSplitter:"\u066b",operatorsMap:{",":"\u060c",";":"\u061b",lim:"\u0646\u0647\u0640\u0640\u0627"},isArabicPage:function(){return"ar"===document.documentElement.lang}}),TeX:function(a,t){return function(r){var n,e=MathJax.InputJax.TeX;n="ar"===this.stack.env.lang?t:a,this.Push(e.Parse(n).mml())}},Text:function(a,t){return MathJax.Extension.Arabic.TeX(a,"\\fliph{\\text{"+t+"}}")},Symbols:function(a,t){var r=t.replace(MathJax.Hub.config.Arabic.arabicLanguageRegExp,"\\fliph{\\text{$1}}");return MathJax.Extension.Arabic.TeX(a,r)},MapNumbers:function(a){var t=MathJax.Hub.config.Arabic.numbersMap,r=function(a){return t[a]};return a.replace(/[0-9]/g,r)}},MathJax.Hub.Startup.signal.Post("Arabic TeX Startup"),MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var a=MathJax.InputJax.TeX,t=MathJax.Extension.Arabic,r=a.Parse.prototype.mmlToken,n=MathJax.Hub.config.Arabic.dict,e=function(){var a=/[\\^$.*+?()[\]{}|]/g;return function(t){return t.replace(a,"\\$&")}}(),i=function(a){var t=Object.keys(a).sort(function(a,t){return t.length-a.length});return new RegExp(t.map(e).join("|"),"gi")};a.Definitions.Add({macros:{ar:"HandleArabic",alwaysar:"MarkAsArabic",fliph:"HandleFlipHorizontal",transn:"TranslateNumbers",tmfrac:"TranslateMixedFraction",transx:"TranslateTeX",transt:"TranslateText",transs:"TranslateSymbols"}});var o=a.Stack.Item.array,c=o.prototype.clearEnv,u=o.prototype.Init;o.Augment({Init:function(){u.apply(this,arguments),this.copyEnv=!0},clearEnv:function(){var a=this.env.lang;c.apply(this,arguments),a&&(this.env.lang=a)}}),a.Definitions.Add({macros:function(){var a={};return Object.keys(n).forEach(function(t){var r=n[t][0];a[r]=t}),a}()}),a.Parse.Augment(function(){var a={};return Object.keys(n).forEach(function(r){var e=n[r][1],i=n[r][2];a[r]=t[e].apply(null,i)}),a}()),a.Parse.Augment({flipHorizontal:function(a){return a.arabicFlipH=!a.arabicFlipH,a},arabicNumber:function(a){var r=a.data[0].data[0],n=t.MapNumbers(r);return n!==r&&(a.data[0].data[0]=n,a.arabicFontLang="ar"),this.flipHorizontal(a)},arabicIdentifier:function(){var a=MathJax.Hub.config.Arabic.identifiersMap,t=i(a),r=function(t){return a[t.toLowerCase()]};return function(a){var n=a.data[0].data[0];if("chars"===a.data[0].type){var e=n.replace(t,r);e!==n&&(a.data[0].data[0]=e,a.arabicFontLang="ar")}return this.flipHorizontal(a)}}(),arabicOperator:function(){var a=MathJax.Hub.config.Arabic.operatorsMap,t=i(a),r=function(t){return a[t]};return function(a){var n=a.data[0].data[0],e=n.replace(t,r);return e!==n&&(a=this.flipHorizontal(a),a.arabicFontLang="ar",a.data[0].data[0]=e),a}}(),_getArgumentMML:function(a){var t=this.ParseArg(a);return t.inferred&&1===t.data.length?t=t.data[0]:delete t.inferred,t},mmlToken:function(a){var t=r.call(this,a);return"ar"===this.stack.env.lang&&this.markArabicToken(t),t},markArabicToken:function(a){return"mn"===a.type?this.arabicNumber(a):"mi"===a.type?this.arabicIdentifier(a):"mo"===a.type?this.arabicOperator(a):a},HandleArabic:function(a){MathJax.Hub.config.Arabic.isArabicPage&&this.MarkAsArabic(a)},TranslateTeX:function(a){var r=this.GetArgument(a),n=this.GetArgument(a),e=t.TeX(r,n);return e.call(this,a)},TranslateText:function(a){var r=this.GetArgument(a),n=this.GetArgument(a),e=t.Text(r,n);return e.call(this,a)},TranslateNumbers:function(a){var r=this.GetArgument(a),n=MathJax.Hub.config.Arabic.arabicDecimalSplitter,e=t.MapNumbers(r,!0).replace(/,/g,"").replace(/\./g,n),i=MathJax.Extension.Arabic.TeX(r,"\\fliph{\\text{"+e+"}}");return i.call(this,a)},TranslateSymbols:function(a){var r=this.GetArgument(a),n=this.GetArgument(a),e=t.Symbols(r,n);return e.call(this,a)},TranslateMixedFraction:function(){var a=this.GetArgument(name),t=this.GetArgument(name),r=this.GetArgument(name),n=MathJax.Extension.Arabic.TeX(a+"\\frac{"+t+"}{"+r+"}","\\alwaysar{\\fliph{\\frac{"+t+"}{"+r+"}"+a+"}}");return n.call(this,name)},MarkAsArabic:function(a){var t=this.stack.env.lang;this.stack.env.lang="ar";var r=this._getArgumentMML(a);this.stack.env.lang=t,this.Push(this.flipHorizontal(r))},HandleFlipHorizontal:function(a){var t=this._getArgumentMML(a);this.Push(this.flipHorizontal(t))}}),MathJax.Hub.Startup.signal.Post("Arabic TeX Ready")}),MathJax.Ajax.loadComplete("[arabic]/arabic.js"); \ No newline at end of file +!function(){var a=["mfrac","mi","mn","mo","mroot","mrow","ms","msqrt","mstyle","msubsup","mtext"];MathJax.Hub.Register.StartupHook("CommonHTML Jax Ready",function(){var t=MathJax.OutputJax.CommonHTML,r=t.unknownChar;t.Augment({unknownChar:function(){var a=MathJax.Hub.config.Arabic.arabicUnicodeStart,t=MathJax.Hub.config.Arabic.arabicUnicodeEnd,n=r.apply(this,arguments),e=n.n,i=a<=e&&e<=t;return i&&(n.type="char"),n}}),MathJax.Hub.Register.StartupHook("Arabic TeX Ready",function(){var t=MathJax.ElementJax.mml,r=function(a){var r=t[a].prototype.toCommonHTML;t[a].Augment({toCommonHTML:function(){var a=r.apply(this,arguments);if(this.arabicFlipH){var t=document.createElement("span");for(t.className="mfliph","ar"===this.arabicFontLang&&(t.className+=" mar");a.firstChild;)t.appendChild(a.firstChild);a.appendChild(t)}return a}})};["mtr","mtd"].concat(a).forEach(r),MathJax.Hub.Register.StartupHook("CommonHTML multiline Ready",function(){var a=t.mbase.prototype.CHTMLaddLine;t.mbase.Augment({CHTMLaddLine:function(){var t=arguments[0];t&&t.querySelector(".mfliph")&&(t.className="mfliph"),a.apply(this,arguments)}}),MathJax.Hub.Startup.signal.Post("Arabic CommonHTML multiline Ready")}),MathJax.Hub.Register.StartupHook("CommonHTML mtable Ready",function(){r("mtable"),MathJax.Hub.Startup.signal.Post("Arabic CommonHTML mtable Ready")}),MathJax.Hub.Startup.signal.Post("Arabic CommonHTML Ready")})}),MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function(){MathJax.Hub.Register.StartupHook("Arabic TeX Ready",function(){var t=MathJax.ElementJax.mml,r=function(a){var r=t[a].prototype.toHTML;t[a].Augment({toHTML:function(){var a=r.apply(this,arguments);if(this.arabicFlipH){var t=document.createElement("span");for(t.className="mfliph","ar"===this.arabicFontLang&&(t.className+=" mar");a.firstChild;)t.appendChild(a.firstChild);a.appendChild(t)}return a}})};a.forEach(r),MathJax.Hub.Register.StartupHook("HTML-CSS multiline Ready",function(){var a=t.mbase.prototype.HTMLaddLine;t.mbase.Augment({HTMLaddLine:function(){var t=arguments[0];t&&t.querySelector(".mfliph")&&(t.className="mfliph"),a.apply(this,arguments)}}),MathJax.Hub.Startup.signal.Post("Arabic HTML-CSS multiline Ready")}),MathJax.Hub.Register.StartupHook("HTML-CSS mtable Ready",function(){r("mtable"),MathJax.Hub.Startup.signal.Post("Arabic HTML-CSS mtable Ready")}),MathJax.Hub.Startup.signal.Post("Arabic HTML-CSS Ready")})})}(),MathJax.Extension.Arabic={version:"2.1.1",config:MathJax.Hub.CombineConfig("Arabic",{dict:{Zero:["zero","Text",["0","\u0635\u0641\u0631"]],Radius:["radius","Text",["r","\u0646\u0642"]],Area:["Area","Text",["A","\u0645"]],Charge:["charge","TeX",["C","\\fliph{\\text{\u069b}}"]]},identifiersMap:{a:"\u0623",b:"\u0628",c:"\u062c\u0640",x:"\u0633",y:"\u0635",z:"\u0639",n:"\u0646",f:"\u0642",g:"\u062c\u0640",h:"\u0647\u0640",k:"\u0643",r:"\u0631",t:"\u062a",d:"\u062f",e:"\u0647\u0640",m:"\u0645",l:"\u0644",sin:"\u062c\u0627",cos:"\u062c\u062a\u0627",tan:"\u0638\u0627",cot:"\u0638\u062a\u0627",sec:"\u0642\u0627",csc:"\u0642\u062a\u0627",log:"\u0644\u0648"},numbersMap:{0:"\u0660",1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669"},arabicUnicodeStart:1536,arabicUnicodeEnd:1791,arabicLanguageRegExp:/([\u0600-\u06FF]+)/g,arabicDecimalSplitter:"\u066b",operatorsMap:{",":"\u060c",";":"\u061b",lim:"\u0646\u0647\u0640\u0640\u0627"},isArabicPage:function(){return"ar"===document.documentElement.lang}}),TeX:function(a,t){return function(r){var n,e=MathJax.InputJax.TeX;n="ar"===this.stack.env.lang?t:a,this.Push(e.Parse(n).mml())}},Text:function(a,t){return MathJax.Extension.Arabic.TeX(a,"\\fliph{\\text{"+t+"}}")},Symbols:function(a,t){var r=t.replace(MathJax.Hub.config.Arabic.arabicLanguageRegExp,"\\fliph{\\text{$1}}");return MathJax.Extension.Arabic.TeX(a,r)},MapNumbers:function(a){var t=MathJax.Hub.config.Arabic.numbersMap,r=function(a){return t[a]};return a.replace(/[0-9]/g,r)}},MathJax.Hub.Startup.signal.Post("Arabic TeX Startup"),MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var a=MathJax.InputJax.TeX,t=MathJax.Extension.Arabic,r=a.Parse.prototype.mmlToken,n=MathJax.Hub.config.Arabic.dict,e=function(){var a=/[\\^$.*+?()[\]{}|]/g;return function(t){return t.replace(a,"\\$&")}}(),i=function(a){var t=Object.keys(a).sort(function(a,t){return t.length-a.length});return new RegExp(t.map(e).join("|"),"gi")};a.Definitions.Add({macros:{ar:"HandleArabic",alwaysar:"MarkAsArabic",fliph:"HandleFlipHorizontal",transn:"TranslateNumbers",tmfrac:"TranslateMixedFraction",transx:"TranslateTeX",transt:"TranslateText",transs:"TranslateSymbols"}});var o=a.Stack.Item.array,c=o.prototype.clearEnv,u=o.prototype.Init;o.Augment({Init:function(){u.apply(this,arguments),this.copyEnv=!0},clearEnv:function(){var a=this.env.lang;c.apply(this,arguments),a&&(this.env.lang=a)}}),a.Definitions.Add({macros:function(){var a={};return Object.keys(n).forEach(function(t){var r=n[t][0];a[r]=t}),a}()}),a.Parse.Augment(function(){var a={};return Object.keys(n).forEach(function(r){var e=n[r][1],i=n[r][2];a[r]=t[e].apply(null,i)}),a}()),a.Parse.Augment({flipHorizontal:function(a){return a.arabicFlipH=!a.arabicFlipH,a},arabicNumber:function(a){var r=a.data[0].data[0],n=t.MapNumbers(r);return n!==r&&(a.data[0].data[0]=n,a.arabicFontLang="ar"),this.flipHorizontal(a)},arabicIdentifier:function(){var a=MathJax.Hub.config.Arabic.identifiersMap,t=i(a),r=function(t){return a[t.toLowerCase()]};return function(a){var n=a.data[0].data[0];if("chars"===a.data[0].type){var e=n.replace(t,r);e!==n&&(a.data[0].data[0]=e,a.arabicFontLang="ar")}return this.flipHorizontal(a)}}(),arabicOperator:function(){var a=MathJax.Hub.config.Arabic.operatorsMap,t=i(a),r=function(t){return a[t]};return function(a){var n=a.data[0].data[0],e=n.replace(t,r);return e!==n&&(a=this.flipHorizontal(a),a.arabicFontLang="ar",a.data[0].data[0]=e),a}}(),_getArgumentMML:function(a){var t=this.ParseArg(a);return t.inferred&&1===t.data.length?t=t.data[0]:delete t.inferred,t},mmlToken:function(a){var t=r.call(this,a);return"ar"===this.stack.env.lang&&this.markArabicToken(t),t},markArabicToken:function(a){return"mn"===a.type?this.arabicNumber(a):"mi"===a.type?this.arabicIdentifier(a):"mo"===a.type?this.arabicOperator(a):a},HandleArabic:function(a){MathJax.Hub.config.Arabic.isArabicPage&&this.MarkAsArabic(a)},TranslateTeX:function(a){var r=this.GetArgument(a),n=this.GetArgument(a),e=t.TeX(r,n);return e.call(this,a)},TranslateText:function(a){var r=this.GetArgument(a),n=this.GetArgument(a),e=t.Text(r,n);return e.call(this,a)},TranslateNumbers:function(a){var r=this.GetArgument(a),n=MathJax.Hub.config.Arabic.arabicDecimalSplitter,e=t.MapNumbers(r,!0).replace(/,/g,"").replace(/\./g,n),i=MathJax.Extension.Arabic.TeX(r,"\\fliph{\\text{"+e+"}}");return i.call(this,a)},TranslateSymbols:function(a){var r=this.GetArgument(a),n=this.GetArgument(a),e=t.Symbols(r,n);return e.call(this,a)},TranslateMixedFraction:function(){var a=this.GetArgument(name),t=this.GetArgument(name),r=this.GetArgument(name),n=MathJax.Extension.Arabic.TeX(a+"\\frac{"+t+"}{"+r+"}","\\alwaysar{\\fliph{\\frac{"+t+"}{"+r+"}"+a+"}}");return n.call(this,name)},MarkAsArabic:function(a){var t=this.stack.env.lang;this.stack.env.lang="ar";var r=this._getArgumentMML(a);this.stack.env.lang=t,this.Push(this.flipHorizontal(r))},HandleFlipHorizontal:function(a){var t=this._getArgumentMML(a);this.Push(this.flipHorizontal(t))}}),MathJax.Hub.Startup.signal.Post("Arabic TeX Ready")}),MathJax.Ajax.loadComplete("[arabic]/arabic.js"); \ No newline at end of file diff --git a/dist/unpacked/arabic.css b/dist/unpacked/arabic.css index d89602e..f7f335a 100644 --- a/dist/unpacked/arabic.css +++ b/dist/unpacked/arabic.css @@ -59,6 +59,12 @@ border: none; } +/* Fixing \transn to give it a reserved space using boarder */ +.MathJax_CHTML .mjx-mrow > .mjx-mtext .mjx-char.MJXc-TeX-unknown-R { + border: solid transparent; + border-width: 0.45em 0; +} + /* HTML-CSS Output Jax CSS */ .MathJax .mfliph { display: inline-block !important; diff --git a/dist/unpacked/arabic.js b/dist/unpacked/arabic.js index 9134d20..be64013 100644 --- a/dist/unpacked/arabic.js +++ b/dist/unpacked/arabic.js @@ -183,7 +183,7 @@ }()); MathJax.Extension.Arabic = { - version: '2.1.0', + version: '2.1.1', config: MathJax.Hub.CombineConfig("Arabic", { dict: { // A macros to force English zero in both languages diff --git a/package-lock.json b/package-lock.json index 1621b11..de40d43 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2058,7 +2058,7 @@ }, "readable-stream": { "version": "1.0.34", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", "dev": true, "requires": { @@ -2070,13 +2070,13 @@ }, "string_decoder": { "version": "0.10.31", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", "dev": true }, "through2": { "version": "0.6.5", - "resolved": "http://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", "dev": true, "requires": { @@ -2152,7 +2152,7 @@ }, "graceful-fs": { "version": "1.2.3", - "resolved": "http://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz", "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=", "dev": true }, @@ -2164,7 +2164,7 @@ }, "lodash": { "version": "1.0.2", - "resolved": "http://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz", "integrity": "sha1-j1dWDIO1n8JwvT1WG2kAQ0MOJVE=", "dev": true }, @@ -2218,7 +2218,7 @@ "dependencies": { "semver": { "version": "4.3.6", - "resolved": "http://registry.npmjs.org/semver/-/semver-4.3.6.tgz", + "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=", "dev": true } @@ -2517,9 +2517,9 @@ } }, "homedir-polyfill": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", - "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", "dev": true, "requires": { "parse-passwd": "^1.0.0" @@ -2605,9 +2605,9 @@ "dev": true }, "interpret": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", - "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", + "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", "dev": true }, "invert-kv": { @@ -3318,7 +3318,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -3327,7 +3327,7 @@ "dependencies": { "minimist": { "version": "0.0.8", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true } @@ -3586,7 +3586,7 @@ }, "os-homedir": { "version": "1.0.2", - "resolved": "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true }, @@ -3800,7 +3800,7 @@ }, "pretty-hrtime": { "version": "1.0.3", - "resolved": "http://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", "dev": true }, @@ -4021,9 +4021,9 @@ "dev": true }, "resolve": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.9.0.tgz", - "integrity": "sha512-TZNye00tI67lwYvzxCxHGjwTNlUV70io54/Ed4j6PscB8xVfuBJpRenI/o6dVk0cY0PYTY27AgCoGGxRnYuItQ==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", + "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", "dev": true, "requires": { "path-parse": "^1.0.6" @@ -4890,7 +4890,7 @@ }, "unique-stream": { "version": "1.0.0", - "resolved": "http://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz", "integrity": "sha1-1ZpKdUJ0R9mqbJHnAmP40mpLEEs=", "dev": true }, @@ -5042,7 +5042,7 @@ }, "graceful-fs": { "version": "3.0.11", - "resolved": "http://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz", "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=", "dev": true, "requires": { @@ -5057,7 +5057,7 @@ }, "readable-stream": { "version": "1.0.34", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", "dev": true, "requires": { @@ -5069,7 +5069,7 @@ }, "string_decoder": { "version": "0.10.31", - "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", "dev": true }, @@ -5085,7 +5085,7 @@ }, "through2": { "version": "0.6.5", - "resolved": "http://registry.npmjs.org/through2/-/through2-0.6.5.tgz", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", "dev": true, "requires": { diff --git a/package.json b/package.json index 6da2e99..1dcb92f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "arabic-mathjax", - "version": "2.1.0", + "version": "2.1.1", "description": "A docker container for developing my MathJax plugins.", "main": "gulpfile.js", "scripts": { diff --git a/src/css/common-html.css b/src/css/common-html.css index 96572cd..fbb235f 100644 --- a/src/css/common-html.css +++ b/src/css/common-html.css @@ -58,3 +58,9 @@ padding-bottom: 0.45em; border: none; } + +/* Fixing \transn to give it a reserved space using boarder */ +.MathJax_CHTML .mjx-mrow > .mjx-mtext .mjx-char.MJXc-TeX-unknown-R { + border: solid transparent; + border-width: 0.45em 0; +} diff --git a/src/tex.js b/src/tex.js index a4f69a8..4239e7b 100644 --- a/src/tex.js +++ b/src/tex.js @@ -1,5 +1,5 @@ MathJax.Extension.Arabic = { - version: '2.1.0', + version: '2.1.1', config: MathJax.Hub.CombineConfig("Arabic", { dict: { // A macros to force English zero in both languages