-
-
Notifications
You must be signed in to change notification settings - Fork 970
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
R markdown does not create a pdf file #1285
Comments
I couldn't reproduce this; would you mind adding the minimal structure of Rmd file that fails to knit (i.e., can you include the yaml metadata and any chunks you have)? Could you please also include the output of |
Thank you for getting back to me. The Rmd file I'm using the vanilla script you get when you choose a new R markdown. Rmd file
Session Info details
|
What does |
It returns the list of rmd files I have in my directory. For this particular file it's "test.Rmd" |
Try current repository rmarkdown! |
Getting this same bug as well, happy to see it's not my system. I tried the github repo and it hasn't helped. If I press the 'Knit' button it works, but when i use rmarkdown::render() it fails with the same error message. Same default .Rmd file as well.
Here is my sessionInfo()
|
Can you please show us the complete |
I've tried defaulting the file name and format options as well, same result. |
Rendered here with no problem. Did you update tinytex to current github release 0.3.7 as well? |
No I didn't, but I'll try. I don't actually even use that tinytext, but installed it thinking it might be worth trying. In the meantime, just reverting to an older rmarkdown worked for me.
|
Yes it does, but please give tinytex a try, it is very cool and a lot of speed up, when you use "keep_tex: yes" ;-) -- And if it work, @yihui should publish a new rmarkdown and tinytex release ASAP ;-) |
Yes, it looks like tinytex becoming a dependency is probably the cause of this for me. This commit gets rid of a ton of latexmk and now tinytex is required for pdf. Funny that it doesn't seem to translate to the button inside RStudio though, does anybody know why that might be? |
I couldnt install the dev version of the rmarkdown because of folder permission issues. But I installed it using install.packages("rmarkdown") and tried to knit it but the same issue. |
Try installing an older version of RMarkdown if you need to knit right away. I had luck with version 1.8 but I think anything prior to 1.9.3 should solve this as it's when tinytex became required. |
If you can't get both current development releases (rmarkdown 1.9.3 and tinytex 0.3.7) on your system, please your rmarkdown 1.8. Or encourage @yihui to release the current devilment releases as 1.10 and 0.4 on CRAN asap! ;-) Yes, the older rmarkdown will do the job, but tinytex will become a needed part of rmarkdown soon. |
@NMarkgraf tinytex 0.4 is on CRAN. I have been sick for a few days, so haven't tagged the 0.4 release on Github yet. |
Thanks @yihui! - Get healthy first. - We need you and your work ;-) |
I actually noticed that 0.4 was there - I think I'll just need to play around with getting it working and installed as I had some additional Status 4 errors. Thank you for your help! |
I tried different ways to downgrade the version but I was unsuccessful. I will wait till @yihui released the 1.10 version and try again. |
Do you have devtools installed? If so, you could try this:
You might try going here and installing from source. FWIW, I got tinytex going and rendering a pdf, but when I use xelatex it throws me the same status 1 error. I think I'm going to wait until this can all be wrapped up into RStudio itself because I don't have time to bother with figuring out why tinytex isn't playing nicely. |
@bdeepthi @Zanidean I tried for a while on Windows but I just could not reproduce the problem. I wonder if any of you are able to do a 10-min chat with me (anytime this afternoon or any day this week) and show me the problem on your computer (with screensharing). I don't think rmarkdown 1.10 will magically fix your issue if I don't figure out the reason of the failure. Thanks! If you |
BTW, if you have the log file (e.g., |
As much as I'd like to, I won't be able to screen share at work. But I would like to help. As mentioned, pdflatex doesn't give me any issues but when I call xelatex I seem to get similar issues. |
I have the same 'Permission Denied' error when I use devtools to install the package. I also downloaded the tar file from the archive and used that but its the same issue. |
log file: (Replace the actual path with "path" This is pdfTeX, Version 3.14159265-2.6-1.40.19 (MiKTeX 2.9.6630 64-bit) (preloaded format=pdflatex 2018.3.11) 12 MAR 2018 11:59
entering extended mode
**./test.tex
(test.tex
LaTeX2e <2017-04-15>
Babel <3.18> and hyphenation patterns for 75 language(s) loaded.
("path\MiKTeX 2.9\tex\latex\base\artic ("path\MiKTeX 2.9\tex\latex\base\size1 ("path\MiKTeX 2.9\tex\latex\amsfonts\a ("path\MiKTeX 2.9\tex\latex\amsmath\am ("path\MiKTeX 2.9\tex\latex\amsmath\am Package fixltx2e Warning: fixltx2e is not required with releases after 2015 Already applied: [0000/00/00] Old fixltx2e package on input line 53. ("path\MiKTeX 2.9\tex\latex\base\t1enc ("path\MiKTeX 2.9\tex\latex\base\utf8. ("path\MiKTeX 2.9\tex\latex\base\t1enc ("path\MiKTeX 2.9\tex\latex\base\ot1en ("path\MiKTeX 2.9\tex\latex\base\omsen |
@Zanidean No worries. It will be faster to debug the issue if I can see it, but that is not required. From your reply above #1285 (comment), you actually seemed to have issues with
but you just said "pdflatex doesn't give me any issues", and it was the first time you mentioned @bdeepthi For the time being, please use all packages from CRAN, and don't install the Github versions yet. I'll let you know when you need to. The first step is as I said above:
|
@yihui Sorry, I have two issues and didn't delineate between them. The initial issue with pdflatex was also present for xelatex and lualatex. This was caused by updating rmarkdown to 1.9.3, where tinytex was required but I hadn't actually installed it. I had the package installed, but not tinytex itself. For now, I've solved this by downgrading rmarkdown to 1.8, before the dependency changed. The second issue comes when I have both tinytex fully installed, and the latest rmarkdown. When I use pdflatex to render there is no issue, but when I use xelatex I get the same status 1 error. |
@Zanidean Okay, let's focus on the second issue first. Again:
|
Hm, okay. So with the default markdown document I didn't run into that problem at all, so I think it's in how I'm using rmarkdown. I still get it in my specific application though, where I'm using rmarkdown::render() to generate different .pdf's depending on certain input. The error doesn't occur on pdflatex. Here is the error with xelatex. I changed the path to 'document'.
When I change the output_file argument to something static like "test.pdf" it works, but when I use a variable assigned in the loop, it doesn't seem to work. |
It looks like this has to do with spaces in the variable file name I was using. These examples take place inside loops. Here is the example of what I was doing that wasn't working:
And this is what made it work.
And again, only with xelatex and lualatex. |
Did you also run |
@Zanidean Please note that rmarkdown 1.9 does not require the tinytex R package. Only the current dev version of rmarkdown requires it. Please also be aware of the fact that the tinytex R package does not require TinyTeX -- the custom LaTeX distribution I made: https://yihui.name/tinytex/r/ You can use any LaTeX distribution with tinytex (the R package). The only problem is that tinytex won't automatically install missing LaTeX packages for you if you don't use TinyTeX (TinyTeX refers to the custom LaTeX distribution; tinytex refers to the R package). @ma1966 I have been desperately looking for someone who can reproduce this issue, since I cannot reproduce it by myself: https://community.rstudio.com/t/6155 So far I have heard both successes and failures, but haven't found a person who can screenshare with me, so I can debug it right on the problematic machine (@Zanidean cannot share due to work restrictions; @bdeepthi has not responded yet). You are the third person who has reported the issue, and I wonder if you are able to share your desktop screen with me. |
I uninstalled MikTex. Then I installed tinytex::install_tinytex() and got an error:
Then I restart rstudio and tinytex:::is_tinytex() was FALSE. Yes I can share my screen. Are you available today? |
@ma1966 Downloading the installer was not complete for some reason. You may try Edit: Oh I just saw you had uninstalled MiKTeX. Well, then please try |
I uninstalled MikTex as recommended in your post and thought install_tinytex would install TeX live. I will wait for the chat. Thanks again. |
Hello everyone, I got this issue too. I'm using MikTeX with rmarkdown. This issue is caused by the lack of some packages required to compile the pdf and rmarkdown apparently is not able to require the downloads. So I opened a sweve file and wrote the same document and when I compiled, MikTeX asked to download some packages. After that rmarkdown is working fine. |
Hi everyone, just wanted to chime in to say I was struggling with this issue today too, and going back to rmarkdown 1.8 seems to have fixed it for me. |
@thiagocmattar Interesting. I wonder if there is a chance that you still remember which missing packages MiKTeX installed? @jmschallock Do you have a minimal reproducible example? Any spaces in your filenames? |
I am having this issue as well, MikTeX with rmarkdown (version 1.9) on Windows 8.1. My packages are:
Edit: going back to rmarkdown version 1.8 did not fix the problem for me |
Edit 2: I got the PDF rendering again by uninstalling MikTex 2.9.? and updating to the most recent version; |
@yihui I'm afraid I wasn't very diligent with documenting what I did, but I updated R and RStudio to the latest versions and reverted to rmarkdown 1.8. No spaces in any of my filenames. (Also just want to say thank you for all your work building and supporting such awesome packages! You're kind of my hero :) |
Hi everyone, I think I have finally figured out the root causes (one of which was rstudio/rstudio#2446) of the issues reported in this thread, and below are two possible solutions (with the latest version of rmarkdown on CRAN, i.e. v1.9): If you have to use MiKTeXYou can install the devel version of the R package tinytex: devtools::install_github('yihui/tinytex') If you haven't installed MiKTeX, remember to check the option If you have already installed MiKTeX, go to the Start menu, find the menu "MiKTeX Console", and choose the option If you don't have to use MiKTeXThings will be a little easier. Uninstall MiKTeX if you have installed it (or temporarily rename its installation folder if you don't want to get rid of it completely), then in R: install.packages('tinytex')
tinytex::install_tinytex() This will install TinyTeX (a custom version of TeX Live), which can also build LaTeX documents to PDF on Windows. For more info, see https://yihui.name/tinytex/. Restart RStudio/R when the installation is done (it may take 3-5 minutes). Please let me know if you still have trouble. Thanks! |
Hi @bdeepthi @Zanidean @JasonCEC @jmschallock @thiagocmattar @ma1966, can any of you confirm if the CRAN version of rmarkdown work with the dev version of tinytex when rendering PDF? install.packages('rmarkdown')
devtools::install_github('yihui/tinytex') Since I haven't heard back from any of you, I feel nervous about making a new release of tinytex to CRAN. R package authors are allowed to make at most six releases of a package in six months, and I have already used four chances since last December, so I have to be very cautious now. Thanks! |
Working for me. |
For what it's worth it works for me as well. Session InfoSession info ----------------------------------------------------------------------------------------------------------------------------------------------------
setting value
version R version 3.4.4 (2018-03-15)
system x86_64, mingw32
ui RStudio (1.1.442)
language (EN)
collate English_Canada.1252
tz America/Los_Angeles
date 2018-03-28
Packages --------------------------------------------------------------------------------------------------------------------------------------------------------
package * version date source
backports 1.1.2 2017-12-13 CRAN (R 3.4.3)
base * 3.4.4 2018-03-15 local
compiler 3.4.4 2018-03-15 local
datasets * 3.4.4 2018-03-15 local
devtools * 1.13.5 2018-02-18 CRAN (R 3.4.3)
digest 0.6.15 2018-01-28 CRAN (R 3.4.3)
evaluate 0.10.1 2017-06-24 CRAN (R 3.4.3)
graphics * 3.4.4 2018-03-15 local
grDevices * 3.4.4 2018-03-15 local
htmltools 0.3.6 2017-04-28 CRAN (R 3.4.3)
knitr 1.20 2018-02-20 CRAN (R 3.4.3)
lobstr * 0.0.0.9000 2018-03-14 Github (r-lib/lobstr@75254f1)
magrittr 1.5 2014-11-22 CRAN (R 3.4.3)
memoise 1.1.0 2017-04-21 CRAN (R 3.4.0)
methods * 3.4.4 2018-03-15 local
R6 2.2.2 2017-06-17 CRAN (R 3.4.3)
Rcpp 0.12.16 2018-03-13 CRAN (R 3.4.4)
rlang 0.2.0 2018-02-20 CRAN (R 3.4.3)
rmarkdown * 1.9 2018-03-01 CRAN (R 3.4.4)
rprojroot 1.3-2 2018-01-03 CRAN (R 3.4.3)
stats * 3.4.4 2018-03-15 local
stringi 1.1.7 2018-03-12 CRAN (R 3.4.4)
stringr 1.3.0 2018-02-19 CRAN (R 3.4.3)
testthat * 2.0.0 2017-12-13 CRAN (R 3.4.3)
tinytex * 0.4.2 2018-03-28 Github (yihui/tinytex@c7d62e1)
tools 3.4.4 2018-03-15 local
usethis * 1.3.0 2018-02-24 CRAN (R 3.4.3)
utils * 3.4.4 2018-03-15 local
withr 2.1.2 2018-03-15 CRAN (R 3.4.4)
yaml 2.1.18 2018-03-08 CRAN (R 3.4.3) 03-08 CRAN (R 3.4.3) |
FYI I have submitted the new version of tinytex (0.5) to CRAN: https://cran.r-project.org/package=tinytex Hopefully in about two days, |
Joining in late but just in case this is helpful to anyone. On my windows 10 system tinytex::install was failing some way into the process. It turned out to be caused by wget not being installed. After installing it everything worked. Perhaps the batch file could check for wget and issue a message if not found? My thanks and respect for all the fabulous work. |
@bdeepthi Please see rstudio/tinytex#49 (the short answer is you will have to wait for at least two days before you can |
@mbedward Sorry this is a silly question, how did you install wget -- was this for R/R Studio? @yihui The fix works for regular pdf knitting. However, for pdf beamer, I uninstalled MikTex and installed tinytex on my window machine -- the problem is still there... The error is
Looking through the log file and this has an error message, not sure if it helps...
I also experience this on a Mac computer, which I already posted an issue here #1360 Any suggestions? Thank you!! |
@ga122493 I installed wget on my system (Windows 10), using the version from gnuwin32 on sourceforge. But I think rstudio/tinytex#49 suggests that the need for wget was due to a problem in the tinytex install script and it should no longer be required. |
@mbedward You are right. Just forget about @ga122493 The message you posted from the LaTeX log file was not an error message. Error messages in LaTeX typically start with To all: I'm going to lock this issue, since the original problem has been solved. The solution was |
Hi,
When I try to knit the vanilla example Rmd file to "pdf" I get the below error. I tried re-installing the packages and restarting the R session several time but it dint help.
Output created: test.pdf
Error in tools::file_path_as_absolute(output_file) :
file 'test.pdf' does not exist
Calls: ->
In addition: Warning messages:
1: running command '"pdflatex" -halt-on-error -interaction=batchmode "test.tex"' had status 1
2: In readLines(logfile) : incomplete final line found on 'test.log'
Execution halted
The text was updated successfully, but these errors were encountered: