title: How to use latex equation environment in Pandoc Markdown?
body: <p>In Pandoc markdown, I can use '$$' to start a display math environment. However, these equations are not numbered in latex so I hope to use the equation environment instead, like this:</p>
  
  <pre><code>\begin{equation}
  x+1 = 2 \\
  y+2 = 3 
  \end{equation}
  </code></pre>
  
  <p>That's fine if I convert markdown to latex. But it does't work when I convert it to HTML with Mathjax because Pandoc treats these lines as raw_latex ignores them in HTML.</p>
  
  <p>I tried to forbid the raw_latex extension</p>
  
  <pre><code>pandoc -f markdown-raw_latex ...
  </code></pre>
  
  <p>This time the two equations are displayed in the same line because the backslashes are escaped by Pandoc so the "\" doesn't produce a newline correctly.</p>
  
  <p>Note that the following code works fine when converted to HTML but produces compilation error in latex.</p>
  
  <pre><code>$$    
  \begin{equation}
      x+1 = 2 \\
      y+2 = 3 
  \end{equation}
  $$
  </code></pre>
  
  <p>Is there any way to handle this problem?</p>