<script type="text/x-mathjax-config">
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
MathJax.InputJax.TeX.prefilterHooks.Add(function (data) {
if (!data.display) {data.math = "\\displaystyle{"+data.math+"}"}
});
});
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Register.StartupHook("mml Jax Ready", function () {
MathJax.ElementJax.mml.math.prototype.defaults.scriptsizemultiplier
= .8;
MathJax.ElementJax.mml.math.prototype.defaults.scriptminsize =
"12px";
});
</script>
I have not enough knowledges for transforming MathJax.Hub.Register.StartupHook. I have two functions. First of them is used for adding 'displaystyle' to all formulas:
The second function is used for making some elements larger:
<script>MathJax = {startup: {ready() {//// Adjust the default script scaling parameters//const math = MathJax._.core.MmlTree.MmlNodes.math.MmlMath;math.defaults.scriptminsize = '12px';math.defaults.scriptsizemultiplier = .8;//// Create the usual MathJax objects//MathJax.startup.defaultReady();//// Add a TeX jax pre-filter to add \displaystyle{...} around in-line material//MathJax.startup.document.inputJax[0].preFilters.add((data) => {if (!data.math.display) {data.math.math = '\\displaystyle{' + data.math.math + '}';}});}}};</script>
Another problem with MathJax 3.0.0 is line breaking. I used symbols '\\' for displaying formula in new line, but in MathJax 3.0.0 these symbols are ignored. May be I should add some additional component?
\displaylines{line1 \\line2}
Is it possible make local installation of new version of MathJax by simple copying files to the shared hosting without such terrible words as 'npm' and others? :)
<script>
MathJax = {
startup: {
ready() {
//
// Adjust the default script scaling parameters
//
const math = MathJax._.core.MmlTree.MmlNodes.math.MmlMath;
math.defaults.scriptminsize = '12px';
math.defaults.scriptsizemultiplier = .8;
//
// Create the usual MathJax objects
//
MathJax.startup.defaultReady();
//
// Add a TeX jax pre-filter to add \displaystyle{...} around in-line material
//
MathJax.startup.document.inputJax[0].preFilters.add((data) => {
if (!data.math.display) {
data.math.math = '\\displaystyle{' + data.math.math + '}';
}
});
}
}
};
</script>
<script>
window.MathJax = {
tex: {
inlineMath: [["$","$"],["\\(","\\)"]],
tags: "ams",
macros: {
arctg: '\\operatorname{arctg}',
arcctg: '\\operatorname{arcctg}',
tg: '\\operatorname{tg}',
ctg: '\\operatorname{ctg}',
rang: '\\operatorname{rang}',
Tr: '\\operatorname{Tr}',
Sp: '\\operatorname{Sp}',
lg: '\\operatorname{lg}',
sh: '\\operatorname{sh}',
ch: '\\operatorname{ch}',
th: '\\operatorname{th}',
cth: '\\operatorname{cth}',
Arsh: '\\operatorname{Arsh}',
Arch: '\\operatorname{Arch}',
Arth: '\\operatorname{Arth}',
Arcth: '\\operatorname{Arcth}',
sgn: '\\operatorname{sgn}',
boldred: ['\\color{red}{\\boldsymbol{#1}}', 1],
boldblue: ['\\color{blue}{\\boldsymbol{#1}}', 1],
boldgreen: ['\\color{green}{\\boldsymbol{#1}}', 1],
boldpurple: ['\\color{purple}{\\boldsymbol{#1}}', 1],
normred: ['\\color{red}{#1}', 1],
normblue: ['\\color{blue}{#1}', 1],
normgreen: ['\\color{green}{#1}', 1],
normpurple: ['\\color{purple}{#1}', 1]
}
},
options: {
ignoreHtmlClass: 'tex2jax_ignore',
processHtmlClass: 'tex2jax_process'
}
};
</script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" id="MathJax-script"></script>
<script>MathJax = {startup: {ready() {//// Adjust the default script scaling parameters//const math = MathJax._.core.MmlTree.MmlNodes.math.MmlMath;math.defaults.scriptminsize = '12px';math.defaults.scriptsizemultiplier = .8;//// Create the usual MathJax objects//MathJax.startup.defaultReady();//// Add a TeX jax pre-filter to add \displaystyle{...} around in-line material//MathJax.startup.document.inputJax[0].preFilters.add((data) => {if (!data.math.display) {data.math.math = '\\displaystyle{' + data.math.math + '}';}});}
},
<Отправка.png>
May be I inserted script in the wrong place?
--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mathjax-users/fd3dbd91-2145-4f96-af0c-be4d84f7968b%40googlegroups.com.
<Отправка.png>