I use pandoc
to convert Markdown to Latex. My problem is that pandoc
adds extra paragraph breaks around begin/end environments.
Source:
**First** phrase in a paragraph.
\begin{multline*}
some long formulae
\end{multline*}
Second phrase in a paragraph.
Doing pandoc my.md -o my.tex
yields:
\textbf{First} phrase in a paragraph.
\begin{multline*}
some long formulae
\end{multline*}
Second phrase in a paragraph.
Clearly this is inappropriate behavior due to extra vertical space put by latex in resulting PDF when it sees extra blank lines around multline
.
Is there a way to suppress extra blank lines in .tex output of pandoc
?
Pandoc does require this (except, of course, at the beginning of the document). The reason for the requirement is that it is all too easy for a > to end up at the beginning of a line by accident (perhaps through line wrapping).
For a more complete list, see the Pandoc Extras wiki page. PanWriter is a Markdown editor with live preview that can import and export using pandoc. Pandoc Mac OS X Services allows you to invoke pandoc from any text editor with the opened file as input.
if true, pandoc will use document class settings for indentation (the default LaTeX template otherwise removes indentation and adds space between paragraphs) adjusts line spacing using the setspace package, e.g. 1.25, 1.5
For docx output, styles will be defined in the output file as inheriting from normal text, if the styles are not yet in your reference.docx. If they are already defined, pandoc will not alter the definition. This feature allows for greatest customization in conjunction with pandoc filters.
Modification:
**First** phrase in a paragraph.
\empty{
\begin{multline*}
some long formulae
\end{multline*}
}
Second phrase in a paragraph.
parses to
\textbf{First} phrase in a paragraph. \empty{
\begin{multline*}
some long formulae
\end{multline*}
} Second phrase in a paragraph.
What about:
**First** phrase in a paragraph. \begin{multline*}
some long formulae
\end{multline*} Second phrase in a paragraph.
pandoc -t latex
with the above input and pandoc 2.2.1 gives:
\textbf{First} phrase in a paragraph. \begin{multline*}
some long formulae
\end{multline*} Second phrase in a paragraph.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With