Alternative to Miktex

2

Hello. I am making a document in RMD in Rstudio and would like to export it to word or pdf. I saw that for this I need to install Miktex. However, even following all the steps (the most summarized tutorial is here , which synthesizes what I've found in several other places) I can not finish installing the program because it can not extract / install the initexmf.exe file. I looked in several forums but I did not find a definitive solution to solve this problem and install Miktex. I work with Windows 10 64 bit.

Does anyone know how I can finish installing Miktex or if there is an alternative for me to be able to export RMD to Word?

    
asked by anonymous 13.07.2018 / 16:54

1 answer

5

Unlike Linux and MacOS, LaTeX distributions for Windows are crap. It almost always gives some conflict and it is very difficult to repair without access to a good terminal, something Windows does not have.

What I have suggested in recent months for those who want to use R and LaTeX on Windows is the installation of the TinyTex package. Yes, it's a pro package, but it installs a version of Tex Live that works great. Installing it is very easy.

First, uninstall MikTex.

Second, run the following commands within R :

library(devtools)
install_github(c("yihui/tinytex", "rstudio/rmarkdown"))
tinytex::install_tinytex()

A warning and two error messages will appear during the execution of the second command. Ignore them by giving OK at the prompt that appears and you're done. After the necessary procedures, your computer will be running LaTeX.

Close and open RStudio before compiling the report for the first time.

That's basically it. The minimum LaTeX will be installed on your PC. If more packages are needed, TinyTex will install whatever it takes, as long as your computer is connected to the internet.

It will be possible to create report in RMarkdown within RStudio or compile .tex files from external text editor such as TexWorks and WinEdt.

    
13.07.2018 / 21:22