vim-pandoc / vim-pandoc-legacy

[UNSUPPORTED/use vim-pandoc/vim-pandoc] vim bundle for pandoc users
143 stars 23 forks source link

Indentation incorrect for aligned math in $$ #51

Closed pengyu closed 11 years ago

pengyu commented 12 years ago

The following code can not be correctly indented (the code in align* should be indented).

$$
\begin{align*}
y&=x\\
u&=v
\end{align*}
$$
dsanson commented 12 years ago

Not sure what you mean. You mean when you use equalprg or MarkdownTidy to clean up the text? Those functions just pass the markdown through pandoc, so the indentation is up to pandoc.

pengyu commented 12 years ago

No. If I just type the latex code in tmp.tex, vim can indent it as the following.

\begin{align*}
  y&=x\\
  u&=v
\end{align*}

But if I type the following code in tmp.mkd, vim will not indent it and you see the following.

$$
\begin{align*}
y&=x\\
u&=v
\end{align*}
$$

So I think that latex code in between the $$ pair should be indented just as if they are in a tex file.

dsanson commented 12 years ago

Ah, got it.

fmoralesc commented 12 years ago

I don't know any way to do this. Indenting settings work at the buffer level, don't they? LaTeX in pandoc files is a mayor issue, and vim doesn't help much here.