From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/18247 Path: news.gmane.org!.POSTED!not-for-mail From: John MACFARLANE Newsgroups: gmane.text.pandoc Subject: Re: Markdown to LaTeX: unwanted newlines around LaTeX environment Date: Tue, 3 Oct 2017 13:43:32 -0700 Message-ID: <20171003204332.GA14228@protagoras> References: <8729b9a5-1aff-4d3a-a17f-06d8a63beefa@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed X-Trace: blaine.gmane.org 1507063415 13250 195.159.176.226 (3 Oct 2017 20:43:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 3 Oct 2017 20:43:35 +0000 (UTC) User-Agent: Mutt/1.9.1 (2017-09-22) To: 'SBJ' via pandoc-discuss Original-X-From: pandoc-discuss+bncBCJZJHG45QDBB4HMZ7HAKGQEZWUP3JA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Oct 03 22:43:26 2017 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-it0-f56.google.com ([209.85.214.56]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzU2E-0002PC-LW for gtp-pandoc-discuss@m.gmane.org; Tue, 03 Oct 2017 22:43:22 +0200 Original-Received: by mail-it0-f56.google.com with SMTP id 186sf1578162itu.9 for ; Tue, 03 Oct 2017 13:43:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1507063409; cv=pass; d=google.com; s=arc-20160816; b=mcfSZuvELDxWFKTKpNH8by+REIX5WEwWi0grgxt7veE90JA1myNIXVzpjR6t5opS6/ Vi72j0+PfwuTnbNym/jrgVKFXIG0Lj/8W8If12whr2B0gntesTU54SmyDGXOESW0ErQM e/yrjLPHik0vKT9ij5+PqgmttOmNVPHR+QvYiKgBPsmDshFzbLOnasNIJvae69b2wSAX obLqxh1EUTkYMlPqDa29Ukf1h6yRArlXyp8NETudghFghW4d4RLfA+DxDRbdEj+9fUM0 0pGLPnqGu3sWra6hDs8WiPvp5Ty3fSPw8b1lAEXqgfhnpaSGHwIFv0LWiZmivoe1itVw /I5w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:to :date:from:arc-authentication-results:arc-message-signature:sender :dkim-signature:arc-authentication-results; bh=x2DzJ5wvFVLPnN26cb7wSs33hdFWqWAqyv5elJUNmC4=; b=t3KroVwbSewCxJ591dNI0MA0x0gHl0WwAAF83cnLNWAaMzF0vwOoXuokOwMtYy1hKW 2k6heLqfhWoPa1WxoWKdIxHoxyH9XhdI3w0bNXzTJhWcynVP6kkwY90VZUU0paPY1KYy UR6in04HhfKyp8Rsz7gflceVlito2O35UT/R18N6Oqw12yhVLxHODheSi82OvYe9ySL9 l/1+sJddX0eEhxzJOX80sENCxYkHfjEH374XrnN5wrV5NT/omF6g/zHf8uLS52TfBiFP IAa4wuJ/UPvQ9QHhbqt8kJ7e2zv3yGbk0+zB9uexaiR4Md5OdYIamSYVyJ9WUrAlrmo7 ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=Ui09iAqB; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:400e:c05::234 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:date:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=x2DzJ5wvFVLPnN26cb7wSs33hdFWqWAqyv5elJUNmC4=; b=kz9ItPTYkkGA60rM8/tgABGDJUcxAGWFVI1ERPHOg5R2Yw0/oKXpAEgO4uxo3f+cAy 5JRiNiDEh+H7lzi6JoqNudA7ChaseIlxMODd/V9mPNBPUYD0G3lC8f8tKZWNdXdsk75u TaMlaZ4e5YuA6bpgDNrKY/0Wmkq1vssrb1ePil78x+JCCQ7mJirAYX7g/9RQh9YqB8T+ nZBvviqw8E+hVI/mt2Sce7ZcnnhmWK0Cx5Y+lcnqtHBTBSy4eFWErZ9/nqkoR6H6M+vK lUWnEKDBAyS6DvaBT7+InyNAqUOM9GC3d9PNywEpHwSCuE4zv8aBvr6fKAyCl0bmrCGN HNHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:date:to:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=x2DzJ5wvFVLPnN26cb7wSs33hdFWqWAqyv5elJUNmC4=; b=dYR77JkcyTqs/nCDr+T8pijSarMb2Xg+DyiovhULvxo0YY6aVu4d/AWGueB5MipW5y FCzKjcBLGnfE6p8ZuftnelMe7iIbrsN/dAQpcTH7e7qr6aYCMHs+Wz44iDhouAMLd4xa ZKev94y1zMoHoZJfOS9v00FNs2e/N21tugSdI1mXNYLeDVGsobEUePDU7F1kkFL4zzc/ trts83SIV3IuCkkRd/spz2b3zr37cl+mtmwOJcd+d5b5Dqq+Zfn60scVpziQq1vjHmZV ZCRlBtxJr1o2E2HVMc90r1bMrMsIxOikQ/loE/bLc0PZJFvXiQhHGLW/iTLGwSvYqQKz Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AMCzsaW5kNIQviRAcJ+jeg3hhomoMcCbQ40gh4kSg+TwKlEsSk+hlcT2 zSJO1zFiutyyvExb+m4rDXU= X-Google-Smtp-Source: AOwi7QDSEEAgrRy77o9XJGeumtqlHLdjHm5H23+X1bFsoW2UFrMH4SIRf6FdD2Q/lXAxvwz6piKj8g== X-Received: by 10.36.64.215 with SMTP id n206mr12682ita.10.1507063409797; Tue, 03 Oct 2017 13:43:29 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.98.43.9 with SMTP id r9ls3049657pfr.6.gmail; Tue, 03 Oct 2017 13:43:28 -0700 (PDT) X-Received: by 10.84.235.5 with SMTP id o5mr1423295plk.24.1507063408712; Tue, 03 Oct 2017 13:43:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507063408; cv=none; d=google.com; s=arc-20160816; b=VLmWo7eLCe7BLu9gc33ZI0AbFjgZ1pqnmgvzf6mSr8rckq8nshROswR8p1TL4JuMMA b7/j0JCeJclAi6QmhC62Z7BdZ/JZTHdkr2hFcxtM+oVnxGWUc+55rGTuUd2k3/TxVCeW SlgFZdqJd03dnZZpj9bdi5nHkCDPHFNwnYPuK+bunIcK5hwb+tPN7GrDeSKkqwNI0OVr 7fQcZgFi+oVn1OMgcZYacNVlae8Q3kEomPdG/XbdB9Vl2+L9B4oReplg/sbRZeXT+P14 B+k5VnLY3YltZ/CKs5ZdS/6DKVdazlBwXBOsQakcvOVdnIuSZvsUjeqgpJTPvkXblmDb BznQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:to:date:from:dkim-signature :arc-authentication-results; bh=FKL3W97Cr10Sl+ADx2NUTYrq5Kw6L80D5nRKVYzgmbc=; b=uQNSHiuNnun32R5MBiSrRvTQVWuPpcSWIAgOwOFomTSabcuk1WcIA2V6W6e/QVXccE 7/2taF87wS90IvFdLJf9mh2OPwSME33CJemnDcUnXy019x20s0l4Y3EtCZ6AXprOIIya dk8DsmFETExYYjWCVUJou5ReU7sh5b1Z3SXvAjcGfkEMxQXsrKeazc23Kt61HoisHM90 lWhMO4EeYu2Az/QgnJXIX3mXvXzwoDh0HEYaOhL2tni7xUoAeCEcT2FQiRt74/NAVD+U 9ZrtaHDBMSKnmUgATqHbWUESYfGAhAaZzxxr5BnqxPSqtqTq6wJq3Ul+7xrj/3P9FEUx pOhA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=Ui09iAqB; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:400e:c05::234 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pg0-x234.google.com (mail-pg0-x234.google.com. [2607:f8b0:400e:c05::234]) by gmr-mx.google.com with ESMTPS id c200si1471960pfb.14.2017.10.03.13.43.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Oct 2017 13:43:28 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:400e:c05::234 as permitted sender) client-ip=2607:f8b0:400e:c05::234; Original-Received: by mail-pg0-x234.google.com with SMTP id j70so5352487pgc.10 for ; Tue, 03 Oct 2017 13:43:28 -0700 (PDT) X-Received: by 10.84.129.193 with SMTP id b59mr18598623plb.30.1507063407999; Tue, 03 Oct 2017 13:43:27 -0700 (PDT) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id u66sm23585290pfd.33.2017.10.03.13.43.26 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Oct 2017 13:43:26 -0700 (PDT) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id C292BA1C5; Tue, 3 Oct 2017 16:43:15 -0400 (EDT) Content-Disposition: inline In-Reply-To: <8729b9a5-1aff-4d3a-a17f-06d8a63beefa-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-PGP-Key: http://johnmacfarlane.net/jgm.asc X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=Ui09iAqB; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:400e:c05::234 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.org gmane.text.pandoc:18247 Archived-At: The dev version of pandoc will not give you a blank line in this case -- it knows that equation environments can occur inline. +++ 'SBJ' via pandoc-discuss [Oct 03 17 09:51 ]: > 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: > * [1]https://github.com/jgm/pandoc/issues/3309#issuecomment-284679731 > * [2]https://groups.google.com/forum/#!searchin/pandoc-discuss/latex$ > 20environment|sort:relevance/pandoc-discuss/P3fV_0jw9-U/DUpSrWYxaAk > J > > 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 [3]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to > [4]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > [5]https://groups.google.com/d/msgid/pandoc-discuss/8729b9a5-1aff-4d3a- > a17f-06d8a63beefa%40googlegroups.com. > For more options, visit [6]https://groups.google.com/d/optout. > >References > > 1. https://github.com/jgm/pandoc/issues/3309#issuecomment-284679731 > 2. https://groups.google.com/forum/#!searchin/pandoc-discuss/latex$20environment|sort:relevance/pandoc-discuss/P3fV_0jw9-U/DUpSrWYxaAkJ > 3. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > 4. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > 5. https://groups.google.com/d/msgid/pandoc-discuss/8729b9a5-1aff-4d3a-a17f-06d8a63beefa-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer > 6. https://groups.google.com/d/optout