Как решить ошибку в beamer_presentation, файл не существует?

При вязании на beamer_presentation я получаю это сообщение об ошибке, кто-нибудь знает, как его прочитать и решить эту проблему?

Код:

---
title: "Untitled"
author: "Author"
date: "6 April 2018"
output: beamer_presentation
---

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

## R Markdown

Something

Сообщение об ошибке:

processing file: TEST.Rmd
  |......................                                           |  33%
  ordinary text without R code

  |...........................................                      |  67%
label: setup (with options) 
List of 1
 $ include: logi FALSE

  |.................................................................| 100%
  ordinary text without R code


output file: TEST.knit.md

"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS TEST.utf8.md --to beamer --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output TEST.tex --highlight-style tango --latex-engine pdflatex --self-contained 

Output created: TEST.pdf
Error in tools::file_path_as_absolute(output_file) : 
  file 'TEST.pdf' does not exist
Calls: <Anonymous> -> <Anonymous>
In addition: Warning message:
running command '"pdflatex" -halt-on-error -interaction=batchmode "TEST.tex"' had status 1 
Execution halted

Информация о версии:

> sessionInfo()
R version 3.4.4 (2018-03-15)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

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

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

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.16    tufte_0.3       digest_0.6.15   withr_2.1.2     rprojroot_1.3-2
 [6] R6_2.2.2        backports_1.1.2 git2r_0.21.0    magrittr_1.5    evaluate_0.10.1
[11] httr_1.3.1      stringi_1.1.7   curl_3.2        rmarkdown_1.9.8 devtools_1.13.5
[16] tools_3.4.4     stringr_1.3.0   rsconnect_0.8.8 yaml_2.1.18     compiler_3.4.4 
[21] memoise_1.1.0   htmltools_0.3.6 knitr_1.20 

Примечание. Несколько месяцев назад это работало без проблем.


person jay.sf    schedule 06.04.2018    source источник
comment
У вас установлено MikTex? Вы также можете попробовать использовать xelatex в заголовке yaml, например. pdf_document: latex_engine: xelatex   -  person Tung    schedule 06.04.2018
comment
@Tung Спасибо за комментарий. Да, у меня установлен MiKTeX. Как мне совместить это с output: beamer_presentation?   -  person jay.sf    schedule 06.04.2018
comment
Просто поместите эту строку ниже beamer_presentation   -  person Tung    schedule 06.04.2018
comment
stackoverflow.com/questions/47400936/rmarkdown-with-xelatex   -  person Tung    schedule 06.04.2018
comment
@Tung output: // beamer_presentation: default // pdf_document: // latex_engine: xelatex не сработало. Все та же ошибка.   -  person jay.sf    schedule 06.04.2018
comment
@Tung Есть ли различия в sessionInfo()?   -  person jay.sf    schedule 06.04.2018
comment
Я использую CRAN rmarkdown 1.9 и knitr 1.20. Попробуйте решение на этом github.com/rstudio/rmarkdown/issues/1285.   -  person Tung    schedule 06.04.2018
comment
@Tung Спасибо за подсказку! :) Пожалуйста, смотрите мой ответ.   -  person jay.sf    schedule 06.04.2018


Ответы (1)


Согласно проблеме GitHub rstudio/rmarkdown#1285, существует два решения.

1-е понижение версии rmarkdown

devtools::install_version("rmarkdown", version = "1.8", 
                          repos = "http://cran.us.r-project.org")

или

Вторая установка/обновление tinytex

install.packages('rmarkdown')  # installs v 1.9 at the moment
devtools::install_github('yihui/tinytex')

Я выбрал 2-й вариант, меня устраивает.

person jay.sf    schedule 06.04.2018