From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/18027 Path: news.gmane.org!.POSTED!not-for-mail From: David Nebauer Newsgroups: gmane.text.pandoc Subject: Re: Latex command in header inclusion munged with \textbackslash{} Date: Tue, 8 Aug 2017 06:56:29 -0700 (PDT) Message-ID: <1cef78af-0bfb-4d45-983b-39863c588bb6@googlegroups.com> References: <85d3801f-6a20-4873-bf2e-e8cd7f13445e@googlegroups.com> <20170807182546.GB91733@airbears2-10-142-0-86.airbears2.1918.berkeley.edu> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_4234_179764569.1502200589254" X-Trace: blaine.gmane.org 1502200602 31596 195.159.176.226 (8 Aug 2017 13:56:42 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 8 Aug 2017 13:56:42 +0000 (UTC) To: pandoc-discuss Original-X-From: pandoc-discuss+bncBD7YRUMRLYII5BVHZQCRUBDFWDVYK-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Aug 08 15:56:28 2017 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-ua0-f192.google.com ([209.85.217.192]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1df4zg-0007Pn-ON for gtp-pandoc-discuss@m.gmane.org; Tue, 08 Aug 2017 15:56:25 +0200 Original-Received: by mail-ua0-f192.google.com with SMTP id x24sf1939523uah.1 for ; Tue, 08 Aug 2017 06:56:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=kbKyavmJy4ALl/uvYtA9cbwnNbcEeTzGdr4k3BpnbNw=; b=QmCSduUEra90T20ODayH+p5ArAMTpu9ZRX6VmxrVu3KJUM1ONak7loB03YxYRBXkVp KiXYXJ1bkcXlN/dFcPDozIi4NQBzB+uXT7IRmXQW6TklUd2353iWEkHbavwBokd+/qDD 6o8W0VmLPYK7fqre4qreFux7epXF0DjYa716rzHWcskSFei73ktws6W55rd9h1vXFf12 NSLhcHppoBBLLYLY80eyZaV6xfA8srJfHR2kUfCY3bxU1iMWBAdMvnn/fbvDDGx873JQ nKpwpNGpOO/C/T0PPy/Ui8GQgIR3en9nljU/MaV7IK9VLIY+S9M79yFkY4Y6h1K23rFD /eSw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=kbKyavmJy4ALl/uvYtA9cbwnNbcEeTzGdr4k3BpnbNw=; b=t5mf6vRmy+dPHunvmbf+7SEXssudq8/h86zKTPC1RJEpBnIcWKsCX4vUHU8Et8shQy 31sL82joVvSkhfQO/RzZpxUeuE1fkBjzD1qRAhagvwjQGRxDdqf9aBfl4BceCjXQf+bX 2R6CmYT77h93h0ROGmMbyToLef0OUS4zhPENRls2JXk/99zMUudUjYwXfg734nEsLGbe yBIdKWsBIesyg/orX2CdDAs4WNQSGu4mY2hEbczal59eY38D1MdL2vbxouMYbgXDdvOR 7qPf2TOKjLdi8QRJa9QDa9sPbQngewfcXVhryxeeh17MvBgy8Fla4bFHeOlIC5qUyBEo u3xQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=kbKyavmJy4ALl/uvYtA9cbwnNbcEeTzGdr4k3BpnbNw=; b=gYZIycbTU6muLo2/QojroRDdpUWgLjGB7339gGOOXV1d9Lc9YxlGoXegeZjWOMXWvO +0oMz1LSAABJsRixfOj6QlAeWpKo5NORXIAISUUqftfPTo4nfmKwys+AHtTmgdGLXH+S F6sel/INu2VhnRaVS5t4k5nQdZ8Ych5ld6sa3JJ/6hRc5A1CBBizCMwh0W4/OxGHj92+ mr7ZHEii8Cul29BymxASFa+at6zrvO2y6lhQ7hYQphim+fSWODs+F+lssxk6qUdtVlUs asHaYUJOR0520EgG10N2MELS2dhiwuFJ1EwC0Rpy4cPQVFlTXmDIhxgA2v4qcfHVULfL rrOA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AHYfb5gWb+Y7BG5sv7meLKp+Lb9RaM1K37qYFGRkYy2FCpYtcSkDx9PA Vj6+nNJJ8jjefQ== X-Received: by 10.36.86.12 with SMTP id o12mr187554itb.5.1502200590962; Tue, 08 Aug 2017 06:56:30 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.36.29.194 with SMTP id 185ls7065995itj.17.gmail; Tue, 08 Aug 2017 06:56:30 -0700 (PDT) X-Received: by 10.36.107.3 with SMTP id v3mr192155itc.2.1502200590029; Tue, 08 Aug 2017 06:56:30 -0700 (PDT) In-Reply-To: <20170807182546.GB91733-qqGlgsTyhTiCiGiXOSDXzGEIDr1rnHf9vtmmnBSr4lwnUAKC5xwfQhvRwXAb8BAkh13vi7wywA4@public.gmane.org> X-Original-Sender: davidnebauer-Re5JQEeQqe8AvxtiuMwx3w@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:18027 Archived-At: ------=_Part_4234_179764569.1502200589254 Content-Type: multipart/alternative; boundary="----=_Part_4235_1459722202.1502200589254" ------=_Part_4235_1459722202.1502200589254 Content-Type: text/plain; charset="UTF-8" Can't install dev pandoc because the ghc archive downloaded as part of the process is corrupt. Once downloaded, the command: tar xf ghc-8.0.2.tar.xz results in: xz: (stdin): Compressed data is corrupt tar: Unexpected EOF in archive tar: Unexpected EOF in archive tar: Error is not recoverable: exiting now On Tuesday, 8 August 2017 03:56:00 UTC+9:30, John MacFarlane wrote: > See https://github.com/jgm/pandoc/issues/2956 > > Alternatively, in the dev version of pandoc you can tell > it you've got raw latex, not Markdown: > > header-includes: > - `\let\oldsection\section`{=latex} > > Final remark: I don't understand why it's not parsing > the `\section` as raw tex. I'll need to look into this; > it may be a bug in the LaTeX reader. > > +++ David Nebauer [Aug 07 17 00:39 ]: > > If I process this markdown file ('mwe-latex.md'): > > --- > > title: "Minimal Working Example" > > header-includes: > > - \let\oldsection\section > > - \renewcommand{\section}[1]{\clearpage\oldsection{#1}} > > --- > > Text. > > with the pandoc command: > > pandoc -t latex --latex-engine=xelatex --output=mwe-latex.pdf > > mwe-latex.md > > I get the the error: > > ! LaTeX Error: Missing \begin{document}. > > See the LaTeX manual or LaTeX Companion for explanation. > > Type H for immediate help. > > ... > > l.49 \let\oldsection\textbackslash{}s > > pandoc: Error producing PDF > > On generating latex output with the command: > > pandoc -t latex --latex-engine=xelatex --standalone > > --output=mwe-latex.tex mwe-latex.md > > and examining line 49 of the output file it becomes apparent that this > > line from the header inclusion: > > \let\oldsection\section > > has been munged by pandoc to: > > \let\oldsection\textbackslash{}section > > and this is causing the processing problem. (Note: changing latex > > engines makes no difference.) > > Once line 49 is edited to resemble the original command from the > header > > inclusion the error disappears. > > How can I prevent this latex command in the header inclusion from > being > > munged by pandoc? > > > > -- > > 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 [1]pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org . > > To post to this group, send email to > > [2]pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org . > > To view this discussion on the web visit > > [3] > https://groups.google.com/d/msgid/pandoc-discuss/85d3801f-6a20-4873- > > bf2e-e8cd7f13445e%40googlegroups.com. > > For more options, visit [4]https://groups.google.com/d/optout. > > > >References > > > > 1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > 2. mailto:pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > 3. > https://groups.google.com/d/msgid/pandoc-discuss/85d3801f-6a20-4873-bf2e-e8cd7f13445e-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer > > 4. https://groups.google.com/d/optout > > -- 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/1cef78af-0bfb-4d45-983b-39863c588bb6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. ------=_Part_4235_1459722202.1502200589254 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Can't install dev pandoc because the ghc archive downl= oaded as part of the process is corrupt.

Once downloaded= , the command:

tar xf gh= c-8.0.2.tar.xz

results in:

xz: (stdin): Compressed data is corrupt=
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar= : Error is not recoverable: exiting now

On Tuesday, 8 August = 2017 03:56:00 UTC+9:30, John MacFarlane wrote:
See https://github.com/jgm/pandoc/issues/2956

Alternatively, in the dev version of pandoc you can tell
it you've got raw latex, not Markdown:

header-includes:
- `\let\oldsection\section`{=3Dlatex}

Final remark: =C2=A0I don't understand why it's not parsing
the `\section` as raw tex. =C2=A0I'll need to look into this;
it may be a bug in the LaTeX reader.

+++ David Nebauer [Aug 07 17 00:39 ]:
> =C2=A0 If I process this markdown file ('mwe-latex.md'):
> =C2=A0 ---
> =C2=A0 title: "Minimal Working Example"
> =C2=A0 header-includes:
> =C2=A0 - \let\oldsection\section
> =C2=A0 - \renewcommand{\section}[1]{\clearpage\oldsection{#1}= }
> =C2=A0 ---
> =C2=A0 Text.
> =C2=A0 with the pandoc command:
> =C2=A0 pandoc -t latex --latex-engine=3Dxelatex --output=3Dmwe-lat= ex.pdf
> =C2=A0 mwe-latex.md
> =C2=A0 I get the the error:
> =C2=A0 ! LaTeX Error: Missing \begin{document}.
> =C2=A0 See the LaTeX manual or LaTeX Companion for explanation.
> =C2=A0 Type H <return> for immediate help.
> =C2=A0 ...
> =C2=A0 l.49 \let\oldsection\textbackslash{}s
> =C2=A0 pandoc: Error producing PDF
> =C2=A0 On generating latex output with the command:
> =C2=A0 pandoc -t latex --latex-engine=3Dxelatex --standalone
> =C2=A0 --output=3Dmwe-latex.tex mwe-latex.md
> =C2=A0 and examining line 49 of the output file it becomes apparen= t that this
> =C2=A0 line from the header inclusion:
> =C2=A0 \let\oldsection\section
> =C2=A0 has been munged by pandoc to:
> =C2=A0 \let\oldsection\textbackslash{}section
> =C2=A0 and this is causing the processing problem. (Note: changing= latex
> =C2=A0 engines makes no difference.)
> =C2=A0 Once line 49 is edited to resemble the original command fro= m the header
> =C2=A0 inclusion the error disappears.
> =C2=A0 How can I prevent this latex command in the header inclusio= n from being
> =C2=A0 munged by pandoc?
>
> =C2=A0 --
> =C2=A0 You received this message because you are subscribed to the= Google
> =C2=A0 Groups "pandoc-discuss" group.
> =C2=A0 To unsubscribe from this group and stop receiving emails fr= om it, send
> =C2=A0 an email to [1]pandoc-discus...@googlegroups.com.
> =C2=A0 To post to this group, send email to
> =C2=A0 [2]pandoc-...@googlegroups.com.
> =C2=A0 To view this discussion on the web visit
> =C2=A0 [3]http= s://groups.google.com/d/msgid/pandoc-discuss/85d3801f-6a20-4873-<= /a>
> =C2=A0 bf2e-e8cd7f13445e%
40googlegroups.com.
> =C2=A0 For more options, visit [4]https:= //groups.google.com/d/optout.
>
>References
>
> =C2=A0 1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> =C2=A0 2. mailto:pandoc-...@googlegroups.com
> =C2=A0 3. https://groups.google.com/d/msgid/pandoc-discuss/85d3801f-6= a20-4873-bf2e-e8cd7f13445e@googlegroups.com?utm_medium=3Demail&am= p;utm_source=3Dfooter
> =C2=A0 4. https://groups.google.com/d/optout

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/= msgid/pandoc-discuss/1cef78af-0bfb-4d45-983b-39863c588bb6%40googlegroups.co= m.
For more options, visit http= s://groups.google.com/d/optout.
------=_Part_4235_1459722202.1502200589254-- ------=_Part_4234_179764569.1502200589254--