mathjax重叠在<a> element

时间:2015-12-02 13:24:32

标签: css mathjax

I want to write some basic mathematical formulas which I handle using mathjax as below:

<html>
<head>
<style>
body a {
    float: left;
    margin: 0 2px 20px 0;
    border: 1px solid #ddd;
    padding: 1px;
    -moz-border-radius: 4px;
    border-radius: 4px; 
    height:36px;
    width: 36px;
}
</style>
<script type="text/x-mathjax-config">
      MathJax.Hub.Config({tex2jax: {
        inlineMath: [['$','$'], ['\\(','\\)']]}});
    </script>
    <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
    </script>

</head>
<body>

<a title="\sqrt{a}">
$\sqrt{a}$</a>
<a title="\frac ab">
$\frac ab$</a>
<a title="\begin{bmatrix}a&b\\ c&d\end{bmatrix}">
$\begin{bmatrix}a&b\\ c&d\end{bmatrix}$</a>


</body>
</html>

The problem is the overlapping of big formulas. You can see the demo here: https://jsfiddle.net/ev6wf0rd/

有没有办法配置Mathjax以避免此问题?

1 个答案:

答案 0 :(得分:2)

你可以: