Skip to content

There should be no new line after equation block in tex document #2171

Open
iarkhanhelsky opened this Issue · 2 comments

3 participants

@iarkhanhelsky

Assuming following code part in md file :

Some equation here
\begin{equation}
x = y
\end{equation}
where $x$ is something important

In tex file I should get same result without any new line after equation block. Because it's breaking identation rules used in latex. And no, \noindent[ #894] is not a solution, because it ridiculous.

@nick-ulle

Even worse:

The formula
\begin{math}
x = y
\end{math}
should be inline.

This gets output as 3 paragraphs. The math environment is equivalent to \( or $ in Latex documents.

It seems like Pandoc has a general problem with handling new lines when translating Markdown to Latex. If I recall correctly, this is a limitation of the current Pandoc AST, so it can't be fixed using a filter. Perhaps an attribute could be added to Block elements?

@jgm
Owner
@c-forster c-forster pushed a commit to c-forster/pandoc that referenced this issue
@jgm Properly handle LaTeX "math" environment as inline math.
See #2171.
0fd83b1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.