2

I would like to align the 2 below equations on the same line with MathJax :

\begin{equation}
  H_{x}=
\begin{pmatrix} 
 1 & 2 & 1 \\ 
 0 & 0 & 0\\ 
 -1 & -2 & -1 
\end{pmatrix}
\end{equation}

\begin{equation}
  H_{y}=
\begin{pmatrix} 
 -1 & 0 & 1 \\ 
 -2 & 0 & 2\\ 
 -1 & 0 & 1 
\end{pmatrix}
\end{equation}

I tried with \begin{align} and \begin{multicols}{2} but none works with MathJax.

Anyone could have a solution ?

Thanks in advance.

  • 2
    While mathjax uses LaTeX syntax, it uses Javascript and HTML's DOM model rather than TeX technology, making it mostly off topic for this site. You might try instead searching among the questions tagged with mathjax on Stack Overflow, or in the official mathjax-users Google group. – Dai Bowen Oct 10 '16 at 22:40
  • 2
    as in latex just delete the middle \end{equation}\begin{equation} – David Carlisle Oct 10 '16 at 22:44
  • 1
    See this... – Werner Oct 10 '16 at 22:53
  • 3
    close voters: I see no reason to close a question off topic just because it mentions mathjax if the question and answer apply equally to latex – David Carlisle Oct 10 '16 at 23:06
5

mathjax-specific questions are off topic but the markup here is just as in latex, and the answer is the same, you want one equation environment not two

\begin{equation}
  H_{x}=
\begin{pmatrix} 
 1 & 2 & 1 \\ 
 0 & 0 & 0\\ 
 -1 & -2 & -1 
\end{pmatrix}
%\end{equation}
\qquad
%\begin{equation}
  H_{y}=
\begin{pmatrix} 
 -1 & 0 & 1 \\ 
 -2 & 0 & 2\\ 
 -1 & 0 & 1 
\end{pmatrix}
\end{equation}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.