mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-12-23 21:02:51 +00:00
277663b822
When collecting user feedback regarding the native rendering option on the German Wikipedia (T346795) it became apparent that some power users aim for bigger and bolder fonts and a more LaTeX-like layout. MathML, however, aims to format math as an integral part of the text with uniform fonts and spacing. To match both user needs, this patch adds a new rendering option that uses client-side MathJax (without a need for restbase or mathoid). * Adjust MathJax`s loader to be compatible with the mw loader * Add new rendering mode * Copy MathJax source to resource module as foreign repo Bug: T354136 Change-Id: I1ecf9c77fefc3b0f717107d81979276023f6cb84
1 line
1.8 KiB
JavaScript
1 line
1.8 KiB
JavaScript
!function(){"use strict";var n,o,e,t={667:function(n,o){o.q=void 0,o.q="3.2.2"},999:function(n,o,e){var t=this&&this.__values||function(n){var o="function"==typeof Symbol&&Symbol.iterator,e=o&&n[o],t=0;if(e)return e.call(n);if(n&&"number"==typeof n.length)return{next:function(){return n&&t>=n.length&&(n=void 0),{value:n&&n[t++],done:!n}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(o,"__esModule",{value:!0}),o.NoUndefinedConfiguration=void 0;var r=e(251);o.NoUndefinedConfiguration=r.Configuration.create("noundefined",{fallback:{macro:function(n,o){var e,r,i=n.create("text","\\"+o),a=n.options.noundefined||{},u={};try{for(var f=t(["color","background","size"]),l=f.next();!l.done;l=f.next()){var c=l.value;a[c]&&(u["math"+c]=a[c])}}catch(n){e={error:n}}finally{try{l&&!l.done&&(r=f.return)&&r.call(f)}finally{if(e)throw e.error}}n.Push(n.create("node","mtext",[],u,i))}},options:{noundefined:{color:"red",background:"",size:""}},priority:3})},955:function(n,o){MathJax._.components.global.isObject,MathJax._.components.global.combineConfig,MathJax._.components.global.combineDefaults,o.r8=MathJax._.components.global.combineWithMathJax,MathJax._.components.global.MathJax},251:function(n,o){Object.defineProperty(o,"__esModule",{value:!0}),o.Configuration=MathJax._.input.tex.Configuration.Configuration,o.ConfigurationHandler=MathJax._.input.tex.Configuration.ConfigurationHandler,o.ParserConfiguration=MathJax._.input.tex.Configuration.ParserConfiguration}},r={};function i(n){var o=r[n];if(void 0!==o)return o.exports;var e=r[n]={exports:{}};return t[n].call(e.exports,e,e.exports,i),e.exports}n=i(955),o=i(667),e=i(999),MathJax.loader&&MathJax.loader.checkVersion("[tex]/noundefined",o.q,"tex-extension"),(0,n.r8)({_:{input:{tex:{noundefined:{NoUndefinedConfiguration:e}}}}})}(); |