I am writing equations in wikidocs using markdown and latex. I tried to align the equations along the equal sign but I can't find the solution. The following is the latex that I wrote currently.
$$\begin{align}
Then,\ (x+z)+t & = x+(z+t)\ (\because Rule2) \\
& = x+0_V \\
& = x\ (\because Rule3) \\
\end{align}$$
The following is the resulted equation on the wikidocs.
I found this link
R Markdown Math Equation Alignment, but I still don't know what the problem is. Could you help me please?
As $$...$$ establishes an equation math mode environment, as does \begin{align}, it is not possible to use the align environment inside $$...$$; it can only be used (in real LaTeX source, that is) outside math mode, because it wants to switch to math mode all by itself.
You should use \begin{aligned}...\end{aligned} — note ist's aligned, not align —, as that is an environment meant to be used inside math mode. As such it is suited for use inside the $$...$$ fencing.
I ran your code on my system and it aligns just fine.
Make sure you have the latest version of tools and packages installed. A minimal working example would be useful too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With