So, by default MathJax equations are centered, but I want to left align certain equations. I know how to make ALL equations left aligned with MathJax.Hub.Config, but this is not what I want.
I've tried other code found on the web, such as the following:
<script type="text/javascript">
MathJax.Hub.Queue(function () {
MathJax.Hub.Config({displayAlign:"left"});
MathJax.Hub.Typeset(["leqn"]);
});
</script>then wrapped a div around the equation with an id of leqn, like so:
<div id="leqn">$$e^{\pi i} - 1 = 0$$</div>This does not work and I don't know enough about MathJax or even JS to have any idea as to what I'm doing wrong. Any ideas?
Hi,
As mentioned in the User Group guidelines, please mark double-posts to avoid duplicated efforts.
I've posted an answer at http://stackoverflow.com/questions/30077862/how-to-left-align-certain-equations-in-mathjax/.
Regards,
Peter.
$$e^{\pi i} - 1 = 0$$
\( e^{\pi i} - 1 = 0 \)
$$e^{\pi i} - 1 = 0$$$$e^{\pi i} - 1 = 0$$
<p>\( e^{\pi i} - 1 = 0 \)</p>
$$e^{\pi i} - 1 = 0$$$$e^{\pi i} - 1 = 0$$
<p>\( \displaystyle{\sum_{n=1}^{10}{\frac{1}{n}}=1+\frac{1}{2}+\frac{1}{3}+\dots}\)</p>
$$e^{\pi i} - 1 = 0$$Ah, very sorry about that, Michael!
Thanks for correcting me, Murray.
Yes, using displaystyle and styling a surrounding element is of course another alternative. As I wrote on SO it depends on the use case. E.g., whether you can control the TeX content or just the html.
Again, sorry for missing the SO mention earlier.
Best,
Peter.
--
You received this message because you are subscribed to a topic in the Google Groups "MathJax Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mathjax-users/Y3SEX4-P9XI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mathjax-user...@googlegroups.com.