Wowchemy-hugo-modules: Multiple lines Mathjax formulas flattened to one line

Created on 5 Oct 2017  路  4Comments  路  Source: wowchemy/wowchemy-hugo-modules

I'm trying to write a two lines formula using using the academic theme. The formula is printed in one line in academic, while correctly printed by Mathjax outside academic.

Let's consider, for example, the following LaTeX formula:

$$\begin{eqnarray} 
y &=& 1+1   \\
&=& 2
\end{eqnarray}$$

On the MathJax Live Demo the formula is correctly generated:
mathjax_demo

But on my hugo website with academic, the formula is generated like this:
academic

I'm not sure what's the source of the problem.
Thanks a lot for your time.

Most helpful comment

It's an issue with how Hugo's Markdown parser works. The workaround is to use 6 backslashes for a Mathjax linebreak:

$$\begin{eqnarray} 
y &=& 1+1   \\\\\\
&=& 2
\end{eqnarray}$$

All 4 comments

It's an issue with how Hugo's Markdown parser works. The workaround is to use 6 backslashes for a Mathjax linebreak:

$$\begin{eqnarray} 
y &=& 1+1   \\\\\\
&=& 2
\end{eqnarray}$$

Thanks a lot for your help. That's very useful :+1: I tried with 2 to 4 backslashes, but I didn't thought about 6.

I made a PR to add this solution to the documentation, thinking of future new users (and to reduce the number of issues related to this problem).

This could really be in the documentation on Hugo too - unfortunately that seems to be dead.

\\\ (3 backslashes) works for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

netw0rkf10w picture netw0rkf10w  路  4Comments

brianguay picture brianguay  路  4Comments

JOduMonT picture JOduMonT  路  4Comments

anirbanbasu picture anirbanbasu  路  3Comments

ivlis picture ivlis  路  4Comments