rstudio / tinytex

A lightweight, cross-platform, portable, and easy-to-maintain LaTeX distribution based on TeX Live

Home Page:https://yihui.org/tinytex/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

use_tinytex() seems not to change the chosen directory

miljukov-o opened this issue · comments

Dear @yihui ,

I installed tinytex to a specified directory. When executing use_tinytex() to make sure that the correct directory is used, it looks like everything works fine. I get the message:
"Restart R and your editor and check if tinytex::tinytex_root() points to J:/data/Documents/R/tinytex"

When I restart R and the editor (not only the session), tinytex_root() ouputs an empty string "". The directory that I chose ("J:/data/Documents/R/tinytex") seems to contain all installation files. But something prevents the change of the directory.

What can I do?

xfun::session_info('tinytex')
R version 4.2.3 (2023-03-15 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044), RStudio 2023.3.0.386

Locale:
LC_COLLATE=German_Germany.utf8 LC_CTYPE=German_Germany.utf8 LC_MONETARY=German_Germany.utf8
LC_NUMERIC=C LC_TIME=German_Germany.utf8

Package version:
graphics_4.2.3 grDevices_4.2.3 stats_4.2.3 tinytex_0.44 tools_4.2.3 utils_4.2.3
xfun_0.31


By filing an issue to this repo, I promise that

  • [ x] I have fully read the issue guide at https://yihui.org/issue/.
  • [x ] 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('rstudio/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.

tinytex::use_tinytex() will run tlmgr path add for you. If you got the line

"Restart R and your editor and check if tinytex::tinytex_root() points to J:/data/Documents/R/tinytex"

it means that the command succeeded. The command will modify your OS PATH environment variables. It should do it successfully if you have admin right or not. See command man page

Did you try restarting your computer ?

You can check if the PATH is added on Windows by running in Powershell

$env:PATH -Split ";" | Select-String "tinytex"

Or looking at your environment variable in Windows UI (a generic tutorial found online)

You can also try the following - If in PATH command should be found.

gcm tlmgr | Format-List

For customized installation to work with tinytex R package only (it won't put anything in your PATH), you can set this option for your R installation

options(tinytex.tlmgr.path="<path to the `tlmgr.bat` file>")

Hope it helps

options(tinytex.tlmgr.path="<path to the `tlmgr.bat` file>")

helped, thank you :)

Glad it works.

Closing now then. Thanks !