Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign uprender pdf fails #6
Comments
|
I'm not sure about the X11 message. Two things to try:
On Windows, that message means that the top level \documentclass{article} directive in the LaTeX template is failing. That's a pretty fundamental error condition indicating that pdflatex can't find assets it should be able to. I don't know how to help debug that other than to make sure that your TeX installation has all the required templates, etc. (was it the basic MikTex or the full install?). |
|
Some background that may help: I am using texlive on both windows and osx. Not miktex on windows. I regularlly use knitr to produce pdfs in Rstudio and don’t have this problem. I’ll try to reproduce the error on OSX just using knitr. From: JJ Allaire [mailto:notifications@github.com] I'm not sure about the X11 message. Two things to try:
On Windows, that message means that the top level \documentclass{article} directive in the LaTeX template is failing. That's a pretty fundamental error condition indicating that pdflatex can't find assets it should be able to. I don't know how to help debug that other than to make sure that your TeX installation has all the required templates, etc. (was it the basic MikTex or the full install?). — |
|
Mystifying. I would definitely like to sort out what's going on here but we On Windows you might also try to run pandoc on a simple test at the command pandoc input.md --to latex On Fri, Feb 7, 2014 at 4:41 PM, stephenll notifications@github.com wrote:
|
|
Quick updates: Under windows 8.1 (x64) I uninstalled texlive and installed miktex. On the pandoc website that is the recommended distribution. That worked. OSX: I was able to get it to render with pdf if I took out the plot(cars). No other plotting in the document. The X11 error message is for wanting to open another RSession after it crashes. I have seen this before when something went wrong with knitr. Knitr does work for me on osx. |
|
Hmm...if you change the device to "pdf" instead of "cairo_pdf' and get rid On Fri, Feb 7, 2014 at 7:05 PM, stephenll notifications@github.com wrote:
|
|
I first needed to require(knitr) before running render otherwise opts_chunk wasn’t recognized. In my markdown document, as you suggested I had to make the change to dev to pdf and not cairo_pdf. I tried that earlier today when you first suggested it but I am just learning knitr and didn’t put that option in the correct place. Now that I read more and figured out where to set that it works. I tried with cairo_pdf and crop set to false and that didn’t work. Another test... I took a Rnw document that I have been compiling with knitr directly from inside RStudio, and changed the device to cairo_pdf and while that did not crash RStudio like render did, it did return an error and said to check_dev(i). The only way knitr and render worked was when the dev is set to pdf. I also tried CarioPDF, Cario_pdf. None of those worked either. Stephen On Feb 7, 2014, at 10:00 PM, JJ Allaire notifications@github.com wrote:
|
|
Some more info that may help … I tried to install the package Rgtk2 package. It installed but when I loaded the package RStudio crashed. I was searching the internet for cariopdf and I came across a webpage about RGtk2 so I tried to install it. Just messing around. I have never heard of cario or gtk before. On Feb 7, 2014, at 10:00 PM, JJ Allaire notifications@github.com wrote:
|
|
Okay, I've switched the default device to "pdf" rather than "cairo_pdf" -- this should mean that everything will work without you doing anything special in your document. I believe that the crash was occurring during the check for "cairo" capabilities (which was also checking for X11 capabilities as a side-effect). Thanks very much for the detailed diagnostics and I'm glad we got to the bottom of this! |
|
FYI It is confirmed there is an issue with pandoc and texlive on windows. There is an outstanding issue being worked on at the pandoc project. It may be worth mentioning/documenting that if someone wants to generate a pdf using rmakrdown on windows for the time being they should use miktex rather then texlive. Stephen On Feb 8, 2014, at 5:31 AM, JJ Allaire notifications@github.com wrote:
|
|
Thanks, I just updated the repo README.md and the documentation to include a note on using MiKTeX on Windows. |
|
This is a misdiagnosis on the Mac (I don't know about Windows, but possibly the same). The problem is that RStudio does not have all the programs you need to convert RMarkdown script to PDF. This really needs to be updated in the docs. So here is what you need:
sudo tlmgr install titling
|
|
is there a way to check whether pandoc is installed or not? |
|
Try the pandoc_available function On Wed, Jun 24, 2015 at 4:52 PM STANISLAV PRIKHODKO <
|
|
@cmbarton Hi Michael, I executed the procedures that you provided and everything was fine during installation (steps 1, 2 and 3), but still getting the error message in rstudio after restarting! I'm just trying to create a .pdf from default version of RStudio (new file > r markdon > pdf).
These are my session infos:
@Edited 2016-10-07
PDFs are ok now! :) |
|
Glad you solved it. I'm traveling with intermittent email. |
Hello,
I was able to use render to create an html document but failed on both windows and osx when trying to create a PDF. I have texlive installed and use it regularly to compile documents using pdflatex.
in R studio I selected new markdown document. Saved it to a local directory. Then ran the following code:
On OSX I received an error about needing to install X11. RStudio crashed at that point.
On windows I was able to get an error message in the console.