10 / MathJax.startup.document.outputJax.pxPerEm
MathJax = {startup: {ready() {MathJax.startup.defaultReady();const jax = MathJax.startup.document.outputJax;jax.options.linebreaks.lineleading = 10 / jax.pxPerEm;}}}
--
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/67d767f5-b743-488f-86b1-c9fab14fc40en%40googlegroups.com.
MathJax = {startup: {ready() {const {CHTML} = MathJax._.output.chtml_ts;const COMMON = CHTML.prototype.__proto__;Object.assign(COMMON, {_setScale_: COMMON.setScale,setScale(node, wrapper) {this.options.linebreaks.lineleading = 10 / this.pxPerEm;this._setScale_(node, wrapper);}});MathJax.startup.defaultReady();MathJax.startup.document.inputJax.tex.preFilters.add((data) => {
if (!data.math.display) {data.math.math = '\\displaystyle{' + data.math.math + '}';}});}}}
On May 17, 2024, at 3:58 PM, Prof. Caju <kuf...@gmail.com> wrote:
Thanks for the reply, Deivide.I just added to my configuration the code provided, and could not see any changes in the space between the lines. My config have the startup block like this:startup: {ready() {
MathJax.startup.defaultReady();
const jax = MathJax.startup.document.outputJax;
jax.options.linebreaks.lineleading = 10 / jax.pxPerEm;
console.log(jax);MathJax.startup.document.inputJax[0].preFilters.add((data) => {
if (!data.math.display) {
data.math.math = '\\displaystyle{' + data.math.math + '}';
}
});
},},And the result of the console.log line above is this:
To view this discussion on the web visit https://groups.google.com/d/msgid/mathjax-users/77897469-1c17-4e8a-bd62-851c650f915dn%40googlegroups.com.
<console.log.jpg>
mjx-linestrut:first-child {height: calc(1em + 10px)}
On May 17, 2024, at 8:53 PM, Prof. Caju <kuf...@gmail.com> wrote:
Hello, Davide.I could not do the trick :(Look how is my ready block:ready() {
const CHTML = MathJax._.output.chtml_ts.CHTML;
const COMMON = CHTML.prototype.__proto__;
Object.assign(COMMON, {
_setScale_: COMMON.setScale,
setScale(node, wrapper) {
this.options.linebreaks.lineleading = 10 / this.pxPerEm;
this._setScale_(node, wrapper);
console.log(this);
}
});
MathJax.startup.defaultReady();
MathJax.startup.document.inputJax[0].preFilters.add((data) => {
if (!data.math.display) {
data.math.math = '\\displaystyle{' + data.math.math + '}';
}
});
},And this is the result of the console.log that I introduce in the code:
<console.log.jpg>And the vertical height is still the same as before for the code $abc\\def$ (even changing 10 to 100 or 1000, no changes):
To view this discussion on the web visit https://groups.google.com/d/msgid/mathjax-users/61dc170d-7114-4166-90f3-cba9832f59ccn%40googlegroups.com.
<console.log.jpg><abcdef.jpg>
To view this discussion on the web visit https://groups.google.com/d/msgid/mathjax-users/e2904a16-69fb-4225-9d8a-96891e33fe70n%40googlegroups.com.