From: "'SBJ' via pandoc-discuss" <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Markdown to LaTeX: unwanted newlines around LaTeX environment
Date: Tue, 3 Oct 2017 09:51:14 -0700 (PDT) [thread overview]
Message-ID: <8729b9a5-1aff-4d3a-a17f-06d8a63beefa@googlegroups.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1889 bytes --]
It appears that the Markdown reader, as a rule, treats any unknown
environment as block-level content (rather than inline). While this seems
to be the desired behaviour, it has side effects when the output format is
(newline-sensitive) LaTeX. This was previously reported here:
- https://github.com/jgm/pandoc/issues/3309#issuecomment-284679731
-
https://groups.google.com/forum/#!searchin/pandoc-discuss/latex$20environment|sort:relevance/pandoc-discuss/P3fV_0jw9-U/DUpSrWYxaAkJ
This affects users wanting to create LaTeX documents in a convenient
fashion by first writing a Markdown file containing occasional LaTeX
environments, then converting to LaTeX and feeding the resulting LaTeX into
a pdflatex workflow. The extra newlines produced in this process affect the
LaTeX parsing, leading to unwanted (and inconsistent) vertical space in the
final document (see simple example below).
Is there a way to make Pandoc omit the newlines?
$ cat test.md
Testing environment
\begin{equation}
i^2=-1
\end{equation}
for whitespace.
$ pandoc -f markdown -t latex -o test.tex test.md
$ cat test.tex
Testing environment
\begin{equation}
i^2=-1
\end{equation}
for whitespace.
$ pandoc --version
pandoc 1.19.2.4
Compiled with pandoc-types 1.17.0.5, texmath 0.9.4.2, skylighting 0.1.1.5
[...]
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/8729b9a5-1aff-4d3a-a17f-06d8a63beefa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #1.2: Type: text/html, Size: 8611 bytes --]
next reply other threads:[~2017-10-03 16:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-03 16:51 'SBJ' via pandoc-discuss [this message]
[not found] ` <8729b9a5-1aff-4d3a-a17f-06d8a63beefa-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-10-03 20:43 ` John MACFARLANE
2017-10-04 12:35 ` 'SBJ' via pandoc-discuss
[not found] ` <bdbfaa4e-8889-4eec-9831-9901eb39e20f-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-10-04 17:24 ` John MACFARLANE
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8729b9a5-1aff-4d3a-a17f-06d8a63beefa@googlegroups.com \
--to=pandoc-discuss-/jypxa39uh5tlh3mbocffw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).