GitbookIO / plugin-mathjax

MathJAX plugin for GitBook
Apache License 2.0
89 stars 51 forks source link

How to enable MathaJax configurations? #7

Open adslibre opened 9 years ago

adslibre commented 9 years ago

Hi guys!

How to enable MathJax configurations for TeX/LaTeX?

robjhyndman commented 8 years ago

Any progress on this? I'd like to be able to use the amsmath extension.

ropeonfire commented 8 years ago

This is important to me as well. Specifically, I'd like to have (auto) numbered equations with the \label syntax so that I could reference them in the text body; for example the LaTeX would be:

\begin{equation}\label{eq:eq1}
E=mc^2
\end{equation}

The equation could then be referenced within the text using $$\eqref{eq:eq1}$$. Or is this already possible and I just haven't figured out the secret GitBook handshake? :)

thundergolfer commented 7 years ago

I'm also interested in having this functionality. I'm need this line to work with Gitbooks Mathjax so that I can use the /qed symbol.

\usepackage{amsmath,amsthm}

cben commented 7 years ago

Untested workaround: try writing \require{AMSmath}\require{AMSsymbols} somewhere inside your math. This is MathJax's internal counterpart of \usepackage for loading optional MathJax extensions without having to change the MathJax config [http://docs.mathjax.org/en/latest/tex.html#tex-and-latex-extensions]

EDIT: I don't think it will give you \qed, AFAICT MJ doesn't implement it [https://github.com/mathjax/MathJax/issues/1052]. You can try $\square$ or $\blacksquare$; see http://meta.math.stackexchange.com/questions/3582/qed-for-mathjax-here-on-stackexchange for a hack to right-align it.

thundergolfer commented 7 years ago

Thanks @cben, I'll try that workaround