2

Thank you in advance for any help! I have MikTeX installed on my computer (2.9.6) and the tinytex package but Rmarkdown will not knit to a pdf (it will however for html) no matter what engine I use. I updated the packages and the other solutions seem to suggest downgrading or updating the packages so Im not sure what to do!

Output created: ttest.pdf 
Error in tools::file_path_as_absolute(output_file) : 
file 'ttest.pdf' does not exist
Calls: <Anonymous> -> <Anonymous>
In addition: Warning message:
In readLines(logfile) : incomplete final line found on 'ttest.log'
Execution halted

Session info

> sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United 
States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] tinytex_0.5

loaded via a namespace (and not attached):
[1] compiler_3.5.0  backports_1.1.2 magrittr_1.5    rprojroot_1.3-2 
htmltools_0.3.6
[6] tools_3.5.0     yaml_2.1.19     Rcpp_0.12.17    stringi_1.1.7   
rmarkdown_1.10 
[11] knitr_1.20      stringr_1.3.1   digest_0.6.15   evaluate_0.10.1

RMD File

---
title: "ttest"
author: "Erik Maroney"
date: "June 22, 2018"
output: pdf_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

## R Markdown

This is an R Markdown document. Markdown is a simple 
formatting syntax for authoring HTML, PDF, and MS Word 
documents. For more details on using R Markdown see 
<http://rmarkdown.rstudio.com>.

When you click the **Knit** button a document will be 
generated that includes both content as well as the 
output of any embedded R code chunks within the 
document. You can embed an R code chunk like this:

```{r cars}
summary(cars)
```
Ralf Stubner
  • 26,263
  • 3
  • 40
  • 75
E. Maroney
  • 21
  • 3
  • Welcome --and fantastic first post. Can you include how you're initializing the knitting process? With the RStudio button? With a call to the knitr or rmarkdown package? It's working for me w/ the same versions of those two packages. – wibeasley Jun 22 '18 at 18:36
  • Did you see https://github.com/rstudio/rmarkdown/issues/1285? It sounds similar. – wibeasley Jun 22 '18 at 18:44
  • Check your path too. Sometimes I encountered errors if the path had space or special characters – Tung Jun 22 '18 at 20:52
  • Is the above the only output you get when knitting? What happens when you set `keep_tex: yes` and process the resulting tex file in RStudio? – Ralf Stubner Jun 23 '18 at 17:44
  • You may try two things: 1) let MiKTeX install missing packages automatically: https://yihui.name/en/2018/03/miktex-auto-install/ or 2) uninstall MiKTeX and install TInyTeX instead: https://bookdown.org/yihui/rmarkdown/installation.html – Yihui Xie Jun 24 '18 at 03:34
  • Thank you for the quick replies everyone! @wibeasley I am initializing via the knit button in R studio and i pick the pdf option. I saw the post but tinytex install function times out on me and i have no space in my file name. I think some problems occur with my company firewall with the tinytex download... what path do i want? – E. Maroney Jun 24 '18 at 18:51
  • **Issue 1**: If you think tinytex isn't downloading/operating correctly, maybe run through the examples and verify those are producing the expected results. **Issue 2**: I don't know about the *file* path, but I wouldn't choose any *career* path where my employer is blocking Yihui's packages. I'd give em my resignation. – wibeasley Jun 25 '18 at 15:25
  • I decided to uninstall m iktex and try tiny tex, this is what happened. – E. Maroney Jun 25 '18 at 21:02
  • Starting to install TinyTeX to C:\Users\3572974\AppData\Roaming/TinyTeX. It will take a few minutes. PATH=C:\Users\3572974\AppData\Local\Temp\RtmpEfvNpq\install-tl-20180625\tlpkg\tlperl\bin;C:\Program Files\R\R-3.5.0\bin\x64;C:\Program Files\R\R-3.5.0\bin\x64;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Python36\Scripts\;C:\Program Files\R\R-3.4.1\library\Rtools\bin;C:\Program Files\R\R-3.4.1\library\Rtools\mingw_32\bin;C:\Python36\;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\CA\SC\CAWIN\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System – E. Maroney Jun 25 '18 at 21:02
  • 32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\CA\DSM\bin;C:\Program Files (x86)\CA\SC\CBB\;C:\PROGRA~2\CA\SC\CAM\bin;C:\Program Files (x86)\CA\SC\Csam\SockAdapter\bin;C:\Program Files (x86)\CA\SC\Csam\SockAdapter\bin64;C:\Program Files\MiKTeX 2.9\miktex\bin\x64\;C:\Users\3572974\AppData\Local\Microsoft\WindowsApps;C:\Users\3572974\AppData\Local\atom\bin;C:\Users\3572974\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64\ "C:\Users\3572974\AppData\Local\Temp\RtmpEfvNpq – E. Maroney Jun 25 '18 at 21:03
  • \install-tl-20180625\install-tl" -profile=../texlive.profile Automated TeX Live installation using profile: ../texlive.profile cannot contact mirror.ctan.org, returning a backbone server! – E. Maroney Jun 25 '18 at 21:03
  • Loading http://dante.ctan.org/tex-archive/systems/texlive/tlnet/tlpkg/texlive.tlpdbC:\Users\3572974\AppData\Local\Temp\RtmpEfvNpq\install-tl-20180625\install-tl: TLPDB::from_file could not download http://dante.ctan.org/tex-archive/systems/texlive/tlnet/tlpkg/texlive.tlpdb; C:\Users\3572974\AppData\Local\Temp\RtmpEfvNpq\install-tl-20180625\install-tl: maybe the repository setting should be changed. TinyTeX installed to – E. Maroney Jun 25 '18 at 21:03
  • C:\Users\3572974\AppData\Roaming/TinyTeX Restart your R session and check if tinytex:::is_tinytex() is TRUE. Warning message: In file.remove("TinyTeX/install-tl.log") : cannot remove file 'TinyTeX/install-tl.log', reason 'No such file or directory' Restarting R session... > tinytex:::is_tinytex() [1] FALSE > tinytex:::is_tinytex() [1] FALSE > – E. Maroney Jun 25 '18 at 21:03
  • @YihuiXie tinytex::install_tinytex() trying URL 'http://mirror.ctan.org/systems/texlive/tlnet/install-tl.zip' Content type 'application/zip' length 19775481 bytes (18.9 MB) downloaded 18.9 MB trying URL 'https://github.com/yihui/tinytex/raw/master/tools/pkgs-custom.txt' Content type 'text/plain; charset=utf-8' length 275 bytes downloaded 275 bytes trying URL 'https://github.com/yihui/tinytex/raw/master/tools/texlive.profile' Content type 'text/plain; charset=utf-8' length 295 bytes downloaded 295 bytes – E. Maroney Aug 13 '18 at 17:06
  • Starting to install TinyTeX to C:\Users\3572974\AppData\Roaming/TinyTeX. It will take a few minutes. PATH=C:\Users\3572974\AppData\Local\Temp\Rtmp4QYb8o\install-tl-20180813\tlpkg\tlperl\bin;C:\Program Files\R\R-3.5.0\bin\x64;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Python36\Scripts\;C:\Program Files\R\R-3.4.1\library\Rtools\bin;C:\Program Files\R\R-3.4.1\library\Rtools\mingw_32\bin;C:\Python36\;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\CA\SC\CAWIN\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program – E. Maroney Aug 13 '18 at 17:06
  • Files (x86)\CA\DSM\bin;C:\Program Files (x86)\CA\SC\CBB\;C:\PROGRA~2\CA\SC\CAM\bin;C:\Program Files (x86)\CA\SC\Csam\SockAdapter\bin;C:\Program Files (x86)\CA\SC\Csam\SockAdapter\bin64;C:\Users\3572974\AppData\Local\Microsoft\WindowsApps;C:\Users\3572974\AppData\Local\atom\bin "C:\Users\3572974\AppData\Local\Temp\Rtmp4QYb8o\install-tl-20180813\install-tl" -profile=../texlive.profile Automated TeX Live installation using profile: ../texlive.profile – E. Maroney Aug 13 '18 at 17:06

0 Answers0