2
votes

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. enter image description here I found this link R Markdown Math Equation Alignment, but I still don't know what the problem is. Could you help me please?

2
What is wikidocs?mb21

2 Answers

2
votes

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.

1
votes

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.