'How to install TinyTex from .zip file? (install_windows_zip not working)

I'm trying to install Tinytex from .zip file, as I'm unable to install TinyTex in the standard way (install_tinytex) due to some restrictions from my IT department.

The advised way to do so is tinytex:::install_windows_zip(). However, I get an error message, saying that object 'install_windows_zip' is not found.

So I would be glad for a kind advice on whether I miss out something with tinytex:::install_windows_zip() or there is another way to install TinyTex?

Thank you in advance!



Solution 1:[1]

The instructions on that GitHub issue page say that you need to call a function install_windows_zip() from package tinytex. Notice that that statement ends in (), so tinytex:::install_windows_zip().

Solution 2:[2]

You can use tinytex:::install_prebuilt() on the file you have to download from https://github.com/yihui/tinytex-releases/releases.

Worked for me (see also https://github.com/yihui/tinytex/issues/312)

Solution 3:[3]

I solved this problem through the following steps:

  1. After downloading the zip file, unzip the zip file and transfer it to your APPDATA folder, specifically the Roaming folder.

  2. Create a .bat file and add the following code:

echo add tlmgr to PATH
cd /d "%APPDATA%\TinyTeX\bin\win32"
call tlmgr path add
if /i not "%CI%"=="true" call tlmgr option repository ctan
call tlmgr postaction install script xetex

exit /b %ERRORLEVEL%
  1. Run the .bat file as administrator

  2. After this open RStudio and knit a .Rmd file to PDF to see if it worked for you.

I got the idea for this by reading the code in a .bat file I downloaded from https://yihui.org/tinytex/ specifically, this https://yihui.org/tinytex/install-bin-windows.bat

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Roman Luštrik
Solution 2 MatzeKnop
Solution 3 Humphrey Yeboah