Fight with TinyTex and Rmarkdown can't knit to PDF on my PC
A little bit History
I started to learn R markdown since 2018.
After attending RStudio conference 2019 @Austin, I decided write my tech report for project in R markdown.
Although it’s a tough process, I finally nailed it and wrote at least 2 tech report in Rmarkdown then produced the final tech report in PDF for client.
Year 2020 Story
Then, we are getting into year 2020. Clients asked us to update tech report for this year. I was so confident at the beginning, thinking what I need to do are changing the parameters and hitting the knit button.
Then, the reality hit me.
I was unable to knit any rmarkdown file to PDF document and a lengthy error message showed up. Here is the error message.
OK, fine! Let’s debugging.
I first went to search the stackoverflow and found that after version 1.8, Rmarkdown automatically connects to package-TinyTex.
Then I went to TinyTex webpage and it seems like there are some answers to my problem.
I started to try different solutions and even created an R code (Feel free to download) for the TinyTex debugging.
After more than 2 days trials, I thought it might be a good idea to post my issue to the online community so that the expert (probably Yihui himself) could help me out.
After 12 hours, I even received Yihui’s reply–> Oh Yeah!
However, nothing really worked out:(
my Rstudio constantly received this error message.
Alright then! I came and I tried. Now it’s time to move on and reinstall the entire WINDOWS system, I guess.
The possible root cause might be I have installed multiple versions of Latex distribution in the past.
But anyway, it’s a good debugging experience and at least, I let my patience play out entire process.