Mathjax 2.6 - Font Size in Hidden Elements -
<style> .s1{font-size:12px} </style> <div class="s1"> $\dfrac{1}{2}$ </div>
the above code works fine , mathjax (version 2.6) renders correctly. math getting scaled down expected.
suppose above div loaded style "display:none" , math displayed when clicking link changing display block.
in case, math not scaled down.
i see many have faced same issue. github page explains issue in detail. problem happens because browser not compute sizes of sub-elements if style "display:none". mathjax processes in seperate hidden elements.
the solution suggested make use of "position: absolute; top: 0, left:0; width:0, height:0, overflow: hidden; visibility: hidden;"
another approach reprocess math in such divs
but, there better approach address problem, possibly forcing browser calculate size of display:none elements or other means?
Comments
Post a Comment