Open micheljung opened 5 years ago
You are correct that the default installation on Linux is not strictly portable. That is due to a trade-off: I want the default installation to just work. If a true portable TinyTeX is desired, you have to know more about TeX Live. First, use the method in FAQ 5 to install TinyTeX: https://yihui.name/tinytex/faq/ That is, use the flags --admin --no-path
, which means it will not create $HOME/bin
or add symlinks there. As a result, you will have to either add $HOME/.TinyTeX/bin/x86_64-linux
to your PATH
variable, or call those TeX Live executables with their full paths. When you move the TinyTeX installation directory, you'll have to repeat this step (change PATH
or use the new full paths).
Hi and thank you for your response. I installed it using --admin --no-path
and added $HOME/.TinyTeX/bin/x86_64-linux
to PATH.
Now I get:
> tinytex::tinytex_root()
Error in tinytex::tinytex_root() :
Cannot figure out the root directory of TeX Live from /home/michel/.TinyTeX/bin/x86_64-linux/tlmgr (not a symlink on unix)
Execution halted
I understand that tinytex_root
explicitly requires tlmgr
to be a symlink, which now it isn't.
Basically, I need an offline installation since I'm behind a corparate proxy, like #121. Since I'm on Linux I can't use tinytex:::install_windows_zip()
.
I looked into tinytex:::install_prebuilt
and saw it executes download-travis-linux.sh so I followed that but apparently, the prebuilt Linux package has /home/travis
hardcoded so it doesn't work either:
$cd ~/.TinyTeX/bin/*/
$./tlmgr path add
mkdir(/home/travis/bin/) failed for tree /home/travis/bin: Permission denied
add of symlinks had 1 error(s), see messages above.
tlmgr: An error has occurred. See above messages. Exiting.
So again, it doesn't seem to be as portable as advertised :-) What can you recommend?
When I replace depend opt_sys_bin:/home/travis/bin
in .TinyTeX/tlpkg/texlive.tlpdb
, it seems to work:
sed -i -e "s;depend opt_sys_bin:.*;depend opt_sys_bin:${HOME}/bin;g" .TinyTeX/tlpkg/texlive.tlpdb
pushd .TinyTeX/bin/x86_64-linux/
./tlmgr path add
popd
> tinytex::tinytex_root()
[1] "/home/michel/.TinyTeX"
But this shouldn't be necessary, should it?
Also, it only works with the prebuilt TinyTeX. With the one built with --admin --no-path
I get:
> tinytex::tinytex_root()
[1] "/home/michel"
tinytex::tinytex_root
should definitely not require tlmgr
to be a symlink. That is a bug. You are welcome to submit a pull request if you can figure out the fix:
https://github.com/yihui/tinytex/blob/07cea7ffb0e04b1f78a7b20192b279a7f35a3793/R/install.R#L258-L263
Thanks!
https://tug.org/texlive/doc/install-tl.html#PROFILES
It seems the install-tl
option on the profile should be instopt_portable
, or am I reading this wrong?
@simaoafonso-pwt I think they recently changed the names of the options. I just updated them in the profile file. Thanks!
I checked and it seems compatibility was maintained, since I don't get docs nor source code.
In fact, I tried the changes you did and there was an error about missing options, sorry about that. :cry:
Unknown key(s) in profile /tmp/tmp.VYVhbNUozy/tinytex.profile: tlpdbopt_option_doc tlpdbopt_option_src tlpdbopt_option_autobackup
Stopping here.
Revert it quick, before anyone notices!
No matter what, I get the path on the following files:
$ grep -R "$PWD" --exclude='*.log' -l .
./tlpkg/texlive.profile
./texmf-var/fonts/conf/texlive-fontconfig.conf
./texmf-var/fonts/map/pdftex/updmap/pdftex.map
./texmf-var/fonts/map/pdftex/updmap/pdftex_dl14.map
./texmf-var/fonts/map/pdftex/updmap/pdftex_ndl14.map
./texmf-var/fonts/map/dvipdfmx/updmap/kanjix.map
./texmf-var/fonts/map/dvips/updmap/psfonts.map
./texmf-var/fonts/map/dvips/updmap/builtin35.map
./texmf-var/fonts/map/dvips/updmap/psfonts_pk.map
./texmf-var/fonts/map/dvips/updmap/psfonts_t1.map
./texmf-var/fonts/map/dvips/updmap/download35.map
./texmf-var/fonts/map/dvips/updmap/ps2pk.map
grep: ./bin/x86_64-linux/man: No such file or directory
./texmf-dist/web2c/fmtutil.cnf
For now, I think it's fair enough the environment is not portable (I mean I won't chase this further myself). This is a similar behaviour to Python's venv
.
I think a better approach is trying to share the remote cache between users, or just run a local TUG mirror with a limited number of packages, and add that as the first repository.
Okay. Thank you very much for testing! Just reverted the commit.
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"
2. Find all occurrences of the user's home directory
In a portable installation, you would expect that there are no hardcoded paths. Yet, there are:
Of which these are probably relevant:
3. Pack .TinyTeX
4. As another user, unpack .TinyTeX
5. Execute tlmgr path add
Which results in:
6. Test TinyTeX
Results in:
Session Info
By filing an issue to this repo, I promise that
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')
.I understand that my issue may be closed if I don't fulfill my promises.