How to change the size of a MathJax rendered symbol in JQuery ?

17 views
Skip to first unread message

ause...@gmail.com

unread,
Jul 21, 2016, 2:12:38 AM7/21/16
to MathJax Users
I'm trying to build a mathematical equation using MathJax. The equation is being build dynamically as the user drags and drops symbols into a HTML box. I want to know if it possible to change the size (make smaller) of one symbol within the equation and another bigger in the same equation. Can this be done ? I am using JQuery to do this which is building the equation. This is just part of the code. I can post the entire code here if needed. Thanks

function drop(ev) {
   
    ev.preventDefault();
    var data = ev.dataTransfer.getData("text");
   
    //ev.target.appendChild(document.getElementById(data));

    switch(data)
    {
           case("drag1"):
             
             $('#second').append('$$\\sum$$');
             break;

       case("drag2"):

         $('#second').append('$$\\int$$');
             break;

           case("drag3"):

         $('#second').append('$$\\alpha$$');
             break;

           case("drag4"):
        
             $('#second').append('$$\\beta$$');
             break;
         
           default:
        }
        MathJax.Hub.Queue(["Typeset",MathJax.Hub,"second"]);

}

Thanks

ause...@gmail.com

unread,
Jul 22, 2016, 1:29:44 AM7/22/16
to MathJax Users, ause...@gmail.com
Thanks anyhow everyone I was able to find a solution to size MathJax rendered symbols as follows:

$('#second').append('$$\\beta$$').css("font-size","150%");
Reply all
Reply to author
Forward
0 new messages