I'm trying to knit Rmd file to pdf. I get the following error:
Error: LaTeX failed to compile test.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips.
In addition: Warning message:
In system2(..., stdout = if (use_file_stdout()) f1 else FALSE, stderr = f2) :
'"pdflatex"' not found
Execution halted
No LaTeX installation detected (LaTeX is required to create PDF output). You should install a LaTeX distribution for your platform: https://www.latex-project.org/get/
If you are not sure, you may install TinyTeX in R: tinytex::install_tinytex()
Otherwise consider MiKTeX on Windows - http://miktex.org
MacTeX on macOS - https://tug.org/mactex/
(NOTE: Download with Safari rather than Chrome _strongly_ recommended)
Linux: Use system package manager
When I try tinytex::install_tinytex()
, I get:
trying URL 'https://yihui.org/tinytex/TinyTeX-1.zip'
Content type 'text/html' length 4305 bytes
downloaded 4305 bytes
Error in system2("tlmgr", args, ...) : '"tlmgr"' not found
In addition: Warning message:
In extract(pkg, exdir = path.expand(target)) :
error 1 in extracting from zip file
Trying tinytex::reinstall_tinytex()
, gets me:
Error in system2("tlmgr", args, ...) : '"tlmgr"' not found
Trying tinytex::uninstall_tinytex()
gets me:
Error in tinytex::uninstall_tinytex() :
TinyTeX does not seem to be installed.
Please help because I need to compile my Rmd to pdf.
UPDATE: Added this section (see comment thread for more info)
xfun::session_info()
Returns:
R version 4.1.2 (2021-11-01)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363), RStudio 2021.9.0.351
Locale:
LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
LC_NUMERIC=C LC_TIME=English_United States.1252
Package version:
base64enc_0.1.3 compiler_4.1.2 digest_0.6.28 evaluate_0.14 fastmap_1.1.0 glue_1.4.2 graphics_4.1.2 grDevices_4.1.2 highr_0.9
htmltools_0.5.2 jquerylib_0.1.4 jsonlite_1.7.2 knitr_1.36 magrittr_2.0.1 methods_4.1.2 rlang_0.4.12 rmarkdown_2.11 stats_4.1.2
stringi_1.7.5 stringr_1.4.0 tinytex_0.35 tools_4.1.2 utils_4.1.2 xfun_0.27 yaml_2.2.1
Thank you!