Alternative to Miktex

Asked

Viewed 231 times

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 brief tutorial is here, that synthesizes what I found in several other places ) I cannot finish installing the program as it fails to extract / install the initexmf.exe file . I searched several forums but could 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 any alternative for me to be able to export RMD to word?

1 answer

5


Unlike Linux and macOS, Latex distributions for Windows are rubbish. Almost always gives some conflict and it is very difficult to fix without access to a good terminal, thing that Windows does not have.

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

First, uninstall the Miktex.

Second, run the following commands inside the 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 installed with Latex.

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

That’s basically it. The minimum of Latex will be installed on your PC. If more packages are needed, Tinytex itself will install whatever it takes, as long as your computer is connected to the internet.

It will be possible to create Rmarkdown reports within Rstudio or compile files. tex from external text editor such as Texworks and Winedt.

  • 1

    Marcus thank you so much! It worked perfectly!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.