rstudio/tinytex

Portability seems broken

Open

#133 opened on Jul 12, 2019

View on GitHub
 (7 comments) (1 reaction) (0 assignees)R (1,120 stars) (125 forks)batch import
bughelp wanted

Description

Hi,

The documentation claims that TinyTeX is portable, but that doesn't seem to be the case.

On Linux, it can be reproduced like this.

1. Install TinyTeX"

wget -qO- "https://yihui.name/gh/tinytex/tools/install-unx.sh" | sh

2. Find all occurrences of the user's home directory

grep -R --exclude="*.log" ${HOME} .TinyTeX/

In a portable installation, you would expect that there are no hardcoded paths. Yet, there are:

.TinyTeX/texmf-dist/web2c/updmap.cfg:# Generated by /home/michel/.TinyTeX/bin/x86_64-linux/tlmgr on Fri Jul 12 07:41:22 2019
.TinyTeX/texmf-dist/web2c/fmtutil.cnf:# Generated by /home/michel/.TinyTeX/bin/x86_64-linux/tlmgr on Fri Jul 12 07:41:22 2019
.TinyTeX/tlpkg/texlive.profile:tlpdbopt_sys_bin /home/michel/bin
.TinyTeX/tlpkg/texlive.tlpdb:depend opt_sys_bin:/home/michel/bin
.TinyTeX/tlpkg/tlpobj/00texlive.installation.tlpobj:depend opt_sys_bin:/home/michel/bin
.TinyTeX/texmf-var/fonts/map/pdftex/updmap/pdftex.map:% /home/michel/.TinyTeX/texmf-var/fonts/map/pdftex/updmap/pdftex_dl14.map:
.TinyTeX/texmf-var/fonts/map/pdftex/updmap/pdftex.map:% /home/michel/.TinyTeX/texmf-var/web2c/updmap.log
.TinyTeX/texmf-var/fonts/map/pdftex/updmap/pdftex_dl14.map:% /home/michel/.TinyTeX/texmf-var/fonts/map/pdftex/updmap/pdftex_dl14.map:
.TinyTeX/texmf-var/fonts/map/pdftex/updmap/pdftex_dl14.map:% /home/michel/.TinyTeX/texmf-var/web2c/updmap.log
.TinyTeX/texmf-var/fonts/map/pdftex/updmap/pdftex_ndl14.map:% /home/michel/.TinyTeX/texmf-var/fonts/map/pdftex/updmap/pdftex_ndl14.map:
.TinyTeX/texmf-var/fonts/map/pdftex/updmap/pdftex_ndl14.map:% /home/michel/.TinyTeX/texmf-var/web2c/updmap.log
.TinyTeX/texmf-var/fonts/map/dvips/updmap/psfonts.map:% /home/michel/.TinyTeX/texmf-var/fonts/map/dvips/updmap/psfonts_t1.map:
.TinyTeX/texmf-var/fonts/map/dvips/updmap/psfonts.map:% /home/michel/.TinyTeX/texmf-var/web2c/updmap.log
.TinyTeX/texmf-var/fonts/map/dvips/updmap/builtin35.map:% /home/michel/.TinyTeX/texmf-var/fonts/map/dvips/updmap/builtin35.map:
.TinyTeX/texmf-var/fonts/map/dvips/updmap/builtin35.map:% /home/michel/.TinyTeX/texmf-var/web2c/updmap.log
.TinyTeX/texmf-var/fonts/map/dvips/updmap/psfonts_pk.map:% /home/michel/.TinyTeX/texmf-var/fonts/map/dvips/updmap/psfonts_pk.map:
.TinyTeX/texmf-var/fonts/map/dvips/updmap/psfonts_pk.map:% /home/michel/.TinyTeX/texmf-var/web2c/updmap.log
.TinyTeX/texmf-var/fonts/map/dvips/updmap/ps2pk.map:% /home/michel/.TinyTeX/texmf-var/fonts/map/dvips/updmap/ps2pk.map:
.TinyTeX/texmf-var/fonts/map/dvips/updmap/ps2pk.map:% /home/michel/.TinyTeX/texmf-var/web2c/updmap.log
.TinyTeX/texmf-var/fonts/map/dvips/updmap/psfonts_t1.map:% /home/michel/.TinyTeX/texmf-var/fonts/map/dvips/updmap/psfonts_t1.map:
.TinyTeX/texmf-var/fonts/map/dvips/updmap/psfonts_t1.map:% /home/michel/.TinyTeX/texmf-var/web2c/updmap.log
.TinyTeX/texmf-var/fonts/map/dvips/updmap/download35.map:% /home/michel/.TinyTeX/texmf-var/fonts/map/dvips/updmap/download35.map:
.TinyTeX/texmf-var/fonts/map/dvips/updmap/download35.map:% /home/michel/.TinyTeX/texmf-var/web2c/updmap.log
.TinyTeX/texmf-var/fonts/map/dvipdfmx/updmap/kanjix.map:% /home/michel/.TinyTeX/texmf-var/fonts/map/dvipdfmx/updmap/kanjix.map:
.TinyTeX/texmf-var/fonts/map/dvipdfmx/updmap/kanjix.map:% /home/michel/.TinyTeX/texmf-var/web2c/updmap.log
Binary file .TinyTeX/texmf-var/web2c/metafont/mf.base matches
Binary file .TinyTeX/texmf-var/web2c/tex/tex.fmt matches

Of which these are probably relevant:

.TinyTeX/tlpkg/texlive.profile:tlpdbopt_sys_bin /home/michel/bin
.TinyTeX/tlpkg/texlive.tlpdb:depend opt_sys_bin:/home/michel/bin
.TinyTeX/tlpkg/tlpobj/00texlive.installation.tlpobj:depend opt_sys_bin:/home/michel/bin
Binary file .TinyTeX/texmf-var/web2c/metafont/mf.base matches
Binary file .TinyTeX/texmf-var/web2c/tex/tex.fmt matches

3. Pack .TinyTeX

tar czf /tmp/tinytex.tar.gz .TinyTeX

4. As another user, unpack .TinyTeX

tar xzf /tmp/tinytex.tar.gz

5. Execute tlmgr path add

.TinyTeX/bin/x86_64-linux/tlmgr path add

Which results in:

Can't locate TeXLive/TLConfig.pm in @INC (you may need to install the TeXLive::TLConfig module) (@INC contains: /.TinyTeX/texmf-dist/scripts/texlive /.TinyTeX/tlpkg /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at .TinyTeX/bin/x86_64-linux/tlmgr line 100.
BEGIN failed--compilation aborted at .TinyTeX/bin/x86_64-linux/tlmgr line 100.

6. Test TinyTeX

mkdir -p rpackages
echo ".libPaths('~/rpackages')" > .Rprofile
R --silent -e 'install.packages("tinytex")'
R --silent -e 'tinytex::tinytex_root()'

Results in:

> tinytex::tinytex_root()
[1] ""

Session Info

> xfun::session_info(tinytex)
Error in xfun::session_info(tinytex) : object 'tinytex' not found
Execution halted

By filing an issue to this repo, I promise that

  • I have fully read the issue guide at https://yihui.name/issue/.
  • I have provided the necessary information about my issue.
    • If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
    • If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included xfun::session_info('tinytex'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('yihui/tinytex').
    • If I have posted the same issue elsewhere, I have also mentioned it in this issue.
  • I have learned the Github Markdown syntax, and formatted my issue correctly.

I understand that my issue may be closed if I don't fulfill my promises.

Contributor guide