From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/25149 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Jason Miller Newsgroups: gmane.text.pandoc Subject: Re: pandoc creating folder with name that makes latex fail Date: Thu, 7 May 2020 07:47:38 -0700 (PDT) Message-ID: <38a1639b-1f2f-458d-ab27-2c88968d88bb@googlegroups.com> References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1869_981349067.1588862859072" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="74736"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCSLBW6NWYFRBDF72D2QKGQES6Q3SZQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu May 07 16:47:47 2020 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oo1-f59.google.com ([209.85.161.59]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jWhoQ-000JGy-5n for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 07 May 2020 16:47:46 +0200 Original-Received: by mail-oo1-f59.google.com with SMTP id t140sf3718430oot.22 for ; Thu, 07 May 2020 07:47:46 -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=ePsulQWIVRnbKuWALJO6JdWcZ2D2bU/SqWZlUN/p6DE=; b=MzkeUKCKfUJ/bG6SaYaLkXnGNH+KDNmOGTVUVgsvurJOUpO66EEr5jSjnHDsaHLOfh CWt7zQEKYrHJf4EdKOhRdqMwraSvKOPkE+j/NdPGBbDgO5AuqgY15i+zXAaxXaTuh3Ca VZ+uubYsqN1m9n6FSyiYYpsYTpLBPo9bo7X7LggmneXOGZluq2Ncbd/N8fs3x8DpFULK w7rlXg617m009Z94QjgvsP2q0eWPkHWx811zLhlbiEkK/+Hz5TFw49azmeTYbDU0ENXA 7EKHOyKfkZ0ZxNXOolJXskY7hoNvmgzPW9ZaNaxW9Y80XWdxWBsnrzzQATnN5uvOUYGP ybBg== 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=ePsulQWIVRnbKuWALJO6JdWcZ2D2bU/SqWZlUN/p6DE=; b=rUQkMp0i20X9sc8g7S2Rr3whWGNnoWLV/FoFk3lo0Vu7mX9RZ33RvVIiiwb2dX2dfv 89M/cfh+FbIPdcfcBBSnw8tiUEklt4dWWM4F59PDqU9adkPrQMKHSjnKIgYhhaIRjug1 BknyzhVmhYnQHtU85WLUuUe0z4vE53vwUmCSlmghbmoGD3+4mP9lVe9Bk7cc4VVYM4LI D8xUZxAQg4HUrIMtCJmmuOnTMa2+yraNK3/t4rQ63Nnzr8NPB/OM1Kzrdoohc46awSA5 MrPsD0aobLY6W+tAzWF3Xat1iN8zxL5T9gb7CsyZ9D6Dib8kfFuamMi/W8VoPN1xwIOX 70Vg== 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=ePsulQWIVRnbKuWALJO6JdWcZ2D2bU/SqWZlUN/p6DE=; b=bvVugJD1kJeYC2p542ko9p1n/Li8mSPvPkdMqlBxlJKXYv6PFaBQ0LXISTMtuE9qbK +D/mfNyX9MHAGPFh1+ZnSdP0fneSHYRY7QqNJDZXbZQEQFtii5buhZJy4uBKP3RFRWcr bjFVhv317VWZdAcj3bgR3x1U+tm3fcjo+e5NJN/62x5AAZeBHl/k0eNsZLUeGm+wrvIu BWbtXYxutS8YdOGZxsV1RFbLRpzjfcwReAZRT5eMkFhoe0hE8TDUeQncOVAPD6zNJfU1 HX3Kz+kMBJ2eJ4WgObn3XisH+vo887z6eKbxg/SoogOVkkYL7a+khdNI0AI8yNMsYGf8 RnIg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AGi0PuYvfZkaD2qpkW9izLdTdmJFRWcgJZgcKWr1W6MqppIFG18o/PY+ edMLI5Q7kRHjfdWv2FnV0Lo= X-Google-Smtp-Source: APiQypIHHCop5juGS/Zc5vbjXlURyZUJNuCAI5qe9oXXstf95KiOyg5eih70GjdRJC+HqGo3E0NQMw== X-Received: by 2002:a4a:4fc1:: with SMTP id c184mr11919317oob.45.1588862865162; Thu, 07 May 2020 07:47:45 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a9d:363:: with SMTP id 90ls1457758otv.6.gmail; Thu, 07 May 2020 07:47:39 -0700 (PDT) X-Received: by 2002:a9d:4f04:: with SMTP id d4mr10323470otl.271.1588862859599; Thu, 07 May 2020 07:47:39 -0700 (PDT) In-Reply-To: X-Original-Sender: millerj870-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.io gmane.text.pandoc:25149 Archived-At: ------=_Part_1869_981349067.1588862859072 Content-Type: multipart/alternative; boundary="----=_Part_1870_703507238.1588862859073" ------=_Part_1870_703507238.1588862859073 Content-Type: text/plain; charset="UTF-8" Thanks, Paul. I'm new to pandoc, so I wasn't sure which tree to bark up in my troubleshooting. I'm posting a version of this question to the RStudio community. Hadn't thought about knitr. Will bark up that tree, too. On Thursday, May 7, 2020 at 7:43:20 AM UTC-7, pmags wrote: > > If you're using this with RMarkdown (e.g. via RStudio) the problem most > likely lies in knitr or RMarkdown packages in terms of temporary > directories generated. > > On Thu, May 7, 2020 at 10:33 AM Jason Miller > wrote: > >> Pandoc is used to generate a PDF from an R markdown document that has a >> chunk that generates a plot using ggplot2 and a custom function, >> progress.plot. The chunk looks like this >> >> >> ```{r charts, echo=FALSE, fig.cap="Your progress curve"} >> >> progress.plot(student) >> >> ``` >> >> >> The PDF is generated using a LaTeX engine. I think it uses PDFlatex via >> pandoc. This is causing a problem that appears to be close to the pandoc >> metal. >> >> It seems like pandoc uses a temporary folder to store the diagram I >> generate with ggplot2. The name of that folder has as underscore. This >> means the path to the graphic file, a string that's used in the .tex source >> file, has an underscore. And the latex compiler doesn't like that. >> >> ! Missing $ inserted. >> >> $ >> l.142 ...de2020-05-06_files/figure-latex/charts-1} >> \caption[Your >> progress cu... >> >> >> The "_files" in the latex log snippet, above, is the name of a folder >> created by pandoc (or Rmarkdown). I am getting a "Missing $ inserted" >> error before the latex compiler craps out. No PDF is generated and the >> directory with the figure is deleted. >> >> Is there a pandoc configuration change to take the underscore out of the >> temporary directory's name? Or is there any other workaround that will >> allow me to generate figures to include in my R markdown document? >> >> Thanks for whatever advice people can share. >> >> -- >> 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-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org . >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/pandoc-discuss/e448fa9c-3dfd-4eb8-8e06-01efa9c29384%40googlegroups.com >> >> . >> > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/38a1639b-1f2f-458d-ab27-2c88968d88bb%40googlegroups.com. ------=_Part_1870_703507238.1588862859073 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks, Paul. =C2=A0I'm new to pandoc, so I wasn't= sure which tree to bark up in my troubleshooting. =C2=A0I'm posting a = version of this question to the RStudio community. Hadn't thought about= knitr. =C2=A0Will bark up that tree, too.

On Thursday, May 7, 2020 = at 7:43:20 AM UTC-7, pmags wrote:
If you're using this with RMarkdown (e.g. via RStud= io) the problem most likely lies in knitr or RMarkdown packages in terms of= temporary directories generated.

<= div dir=3D"ltr">On Thu, May 7, 2020 at 10:33 AM Jason Miller <mille...@gmail= .com> wrote:
Pandoc is used to generate a PDF from an R markdo= wn document that has a chunk that generates a plot using ggplot2 and a cust= om function, progress.plot.=C2=A0 The chunk looks like this

<= /div>

```{r charts, echo=3DFALSE, fig.cap=3D"Your= progress curve"}

progress.plot(student)

```

The PDF is g= enerated using a LaTeX engine.=C2=A0 I think it uses PDFlatex via pandoc.= =C2=A0 This is causing a problem that appears to be close to the pandoc met= al.

It seems like pandoc uses a temporary folder t= o store the diagram I generate with ggplot2.=C2=A0 The name of that folder = has as underscore.=C2=A0 This means the path to the graphic file, a string = that's used in the .tex source file, has an underscore.=C2=A0 And the l= atex compiler doesn't like that.

=C2=A0 = =C2=A0 ! Missing $ inserted.
=C2=A0 =C2=A0 <inserted text>= =C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 $
=C2=A0 =C2=A0 l.142 ...de2020-05-06_files/figure-= latex/charts-1}
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0\caption[Your progress cu...


The "_files" in the latex log snippet, above, is the name o= f a folder created by pandoc (or Rmarkdown).=C2=A0 I am getting a "Mis= sing $ inserted" error before the latex compiler craps out.=C2=A0 No P= DF is generated and the directory with the figure is deleted.
Is there a pandoc configuration change to take the underscore o= ut of the temporary directory's name?=C2=A0 Or is there any other worka= round that will allow me to generate figures to include in my R markdown do= cument?

Thanks for whatever advice people can shar= e.

--
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 pandoc-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pand= oc-discuss/e448fa9c-3dfd-4eb8-8e06-01efa9c29384%40googlegroups.co= m.

--
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 view this discussion on the web visit https://groups.google.com/d/= msgid/pandoc-discuss/38a1639b-1f2f-458d-ab27-2c88968d88bb%40googlegroups.co= m.
------=_Part_1870_703507238.1588862859073-- ------=_Part_1869_981349067.1588862859072--