Mathjax - Scaling Options for Inline / Block

Hello, is it possible to have a different scale for the built-in equations and blocks of equations? I have a 150% scale due to the built-in equalizer. I need them big. But then the equations in the block are too large.

Can I adjust the scaling individually for embedded and blocks? For $ \ tech $ it will be more than for $$ \ tech $$

MathJax.Hub.Config({ "HTML-CSS": { scale: 150, }, tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ], displayMath: [ ['$$','$$'], ["\\[","\\]"] ], }, }); 
+4
source share
1 answer

Nothing has been created for this, but you can use something like

 <script type="text/x-mathjax-config"> MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { var TEX = MathJax.InputJax.TeX; var PREFILTER = TEX.prefilterMath; TEX.Augment({ prefilterMath: function (math,displaymode,script) { if (!displaymode) {math = "\\large{"+math+"}"} return PREFILTER.call(TEX,math,displaymode,script); } }); }); </script> 

add \large before each built-in math expression (and set the scaling to 100%).

If the built-in math is not large enough, then there might be something in your CSS or your font settings that cause this. For example, if you need to use <code> around math so that your math is not tampered with by any markup mechanism, the font associated with the <code> elements will be the one that controls the size of the math (rather than the text that surrounds it) . This can be controlled by CSS for code blocks, but it can also be installed in most browsers as a separate font. It seems that most browsers are configured with the fact that this font is smaller than a regular font (I really don’t understand why), and therefore it can cause your problem as well.

+1
source

Source: https://habr.com/ru/post/1386817/


All Articles