Hello everybody,
I have spent many hours trying to solve this problem but I could not find one. I was trying to to knit into PDF using the tinytex package from Yihui. My issue is quite the same like mentioned in R Markdown unable to knit, but I have different errors. It was just a simple R Markdown code like this:
---
title: "Untitled"
date: "10 11 2020"
output: pdf_document
---
## R Markdown
```{r cars}
library(tinytex)
options( tinytex.verbose = TRUE)
summary(cars)
This is the Error:
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/W32TeX) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
Warnung: Error in : LaTeX failed to compile C:\Users\J5A02~1.VIN\AppData\Local\Temp\RtmpIdWGVJ\file20ac33c021c5.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips.
[No stack trace available]
What I have tried so far:
1. Install tinytex package and install TinyTex distribution.
install.packages("tinytex")
tinytex::install_tinytex()
Result:
2. Checked if it was installed.
tinytex:::is_tinytex()
[1] TRUE
3. Tryed another option of installation.
devtools::install_github('yihui/tinytex')
Result: nothing changed.
4. Checked if it was installed again.
tinytex:::is_tinytex()
[1] TRUE
5. Tryed to uninstall and reinstall it some times.
tinytex::uninstall_tinytex()
remove.packages("tinytex")
6. Tryed to fix it since pdflatex.exe could not be found.
tinytex:::install_prebuilt()
Result: nothing changed.
7. Checking pdflatex.exe I got this:
file.info(tinytex:::win_app_dir('TinyTeX', 'bin', 'win32', 'pdflatex.exe'))
Results:
size isdir mode mtime
C:\\Users\\j.vincent\\AppData\\Roaming/TinyTeX/bin/win32/pdflatex.exe 1536 FALSE 777 2020-11-10 15:42:45
ctime atime exe
C:\\Users\\j.vincent\\AppData\\Roaming/TinyTeX/bin/win32/pdflatex.exe 2020-11-10 15:42:45 2020-11-10 15:42:45 win32
I have done almost everything mentioned in every resources that I found online from Yihui. I tried to applied the debugging process mentioned in Yihui debugging using the "options(tinytex.verbose = TRUE)" and gives this additional message in console:
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/W32TeX) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
It's important to say that I restarted (close and open again) RStudio many times during this process, I tryed to substitute latex distribution TinyTex for MikTex (but didn't go well since the output was a different issue which didn't let me knit to PDF either) and I even tryed both installed together (TinyTex and MikTex). Then I uninstalled MikTek.
The only possible reason in my mind was because of the company's firewall that gives quite a lot of constraint with this tinytex packages. But I am not quite sure of that. Could someone help me please!
info: R Studio Version 1.3.1093 and R version 4.0.3, also tinytex version 0.27