Changing mathjax's font size

后端 未结 10 1442
孤城傲影
孤城傲影 2020-12-08 19:32

I am using mathjax on my page, and i have read that this:



        
相关标签:
10条回答
  • 2020-12-08 19:58

    Use \tiny{ }, \scriptsize{ }, \small{ }, \normal{ }, \large{ }, \Large{ }, \LARGE{ }, \huge{ }, \Huge{ }.

    0 讨论(0)
  • 2020-12-08 19:59

    You should add this to your CSS.

    .MathJax_CHTML {
        font-size: 25px !important;
    }
    
    0 讨论(0)
  • 2020-12-08 20:00

    I tried numerous things, including modifying config/default.js

    http://docs.mathjax.org/en/latest/options/index.html

    or mathjax.js, none of them worked (I use Drupal 6 and therefore had to revert to MathJax 1.1)

    Finally, based on Wojciech's answer, I found something that worked. Simply surround the Math code with a div like that:

    <div style="font-size: 133%;">
    <p>\begin{equation} \frac{\partial e_b}{\partial x^b} = &nbsp;&nbsp;\Gamma_{ab}^k &nbsp;e_k &nbsp; \end{equation}</p>
    </div>
    
    0 讨论(0)
  • 2020-12-08 20:08

    Well if you need a global re-size, here's how I did it through CSS.

    .MathJax {
    font-size: 1.3em;
    }
    

    I used 1.3 em, you can change it to better suit your needs.

    0 讨论(0)
  • 2020-12-08 20:09

    Seems like the <span> tag works for inline font adjustment:

    <span style="font-size:2.1em; line-height:0%">$a-b$</span>

    should nicely render "a-b" for Times font-family at 14px font-size.

    0 讨论(0)
  • 2020-12-08 20:11

    You can change the size of the formulas globally if you load mathjax/latex in this way:

    <script type="text/x-mathjax-config">
    MathJax.Hub.Config({
      CommonHTML: {
        scale: 130
      }
    });
    </script>
    <script type="text/javascript" async
    src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
    </script>
    
    0 讨论(0)
提交回复
热议问题