Search code examples
rtinytex

how to install tinytex from local zip file in R


I have just installed the tinxytex package in R

install.packages('tinytex')

I would like to run the following code to install actual TinyTeX

tinytex::install_tinytex()

This leads to the below error: (As I am behind a proxy etc.)

In download.file(url, output, ..., method = method) : cannot open URL 'http://mirror.ctan.org/systems/texlive/tlnet/install-tl.zip': HTTP status was '403 Forbidden' ```

As a work around I downloaded the install-tl.zip file in my browser and was wondering if there is a way when running tinytex::install_tinytex() to point to this .zip file ?

For example something like:

tinytex::install_tinytex(repository = "\\Downloads\\")

Howevever this leads to the below error:

In download.file(url, output, ..., method = method) : URL 'http://Downloads/install-tl.zip': status was 'URL using bad/illegal format or missing URL

Environment

  • R 3.5.3

Solution

  • To install tinytex in an offline manner, you could

    1. Download the prebuilt version of TinyTex from appveyor CI TinyTeX.zip
    2. Use tinytex:::install_windows_zip() on this file

    This should work.

    This comes from how tinytex:::install_prebuilt() is working. (see source)