-
-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
install_tinytex does not work if username has a space in it #420
Comments
This is the error so I wonder if this is not an issue with Anyhow, this type of error was reported in the past: so you should try what is adviced on #210 (comment) |
Can confirm this does not work with spaces. We just finished a deployment of about 800 manual installs of TinyTex onto a variety of user machines, and ran into 5-10 who had this issue running on new-ish Windows 11 OS systems. It presents as
when trying to Render a default brand-new Quarto document with no modifiers, except to say
So R + Rtools + RStudio + tinytex + quarto + tinytex::install_tinytex() -> make a new Quarto doc, specify pdf -> save -> Render, and it fails. Very reproducible - just need the User doing the activity to have a username with a space in it. After a lot of back and forth trying to debug it, and not knowing to search "space in user name" as an issue, we discovered a functional workaround. Manually go into
This ensures that: there are no permissions issues (e.g., with OneDrive syncing); the old version of TinyTex is gone (if you skip this, it still defaults to that one); that the FULL CTAN library is installed, which skips the "first time you Quarto Render it sorts out stuff by downloading more CTAN libraries; and bypasses the User with the space by installing into C:\Users\TinyTex. This last could be anywhere, I guess, but this keeps it out of the way so the User doesn't notice it and touch it (since Windows users rarely go outside of their own home directory). Can probably skip the bundle as well, since once it's not in the User's directory, the space issue is no longer there, and It would be nice if these steps could be skipped, since it's not at ALL intuitive that this is the problem. Took a lot of trial and error to track down why these particular users were having this issue. |
@wesleyburr Thank you so much for sharing your experience! That's very helpful. I don't have a Windows machine to test with. @cderv might be able to help and see if the problem is reproducible. If the problem only affects users who have spaces in their Windows usernames, and it started only recently, I guess it might be a bug of either Quarto or TeX Live. To verify, you can try to compile a \documentclass{scrartcl}
\begin{document}
Test.
\end{document} If tinytex is able to install the koma-script LaTeX package automatically in this case, the culprit must be Quarto or RStudio: tinytex::tlmgr_remove('koma-script')
tinytex::pdflatex('test.tex') |
I'll try to replicate this deliberately with a brand new install next week, and then test your suggestion to narrow down the root. I've been reverse engineering it (six different computers fixed by following the path above), but haven't tried a MRL on a VM yet. Added to my todo list! |
Update: easy reproduction of the error.
From your suggestion about manually checking, make that
and interestingly, it installs So it's not |
@wesleyburr Great! Thanks for the verification! I think this means the problem comes from the Quarto side. I don't know why it can't run |
Thanks a lot for all these informations. I'll have a look into this with Quarto not working as it should. |
I've found a Windows machine, created a user with spaces in the name, and was able to reproduce the problem with Quarto.
|
Interesting. So this is a Quarto issue regarding path with names. Is that right ? |
I think so, although I don't understand why. |
This reply https://tug.org/pipermail/tex-live/2023-November/049634.html makes me feel we need to rethink the installation directory when the username contains multibyte characters on Windows. And the problem in this Github issue makes me feel we also need to use a path that doesn't even contain spaces. Something like For the Quarto issue, I'm not sure if this diagnosis is correct: https://tug.org/pipermail/tex-live/2023-November/049635.html I don't have my Windows machine at hand this week, and will check it next week. |
For now, I'm thinking of using This means we need to change
The only uncertainty to me at the moment is whether |
Are you planning to do the change only when user name has specific character ? Or move all install from APPDATA to ProgramDATA ? FWIW this folder is hidden on Windows
And this is where any Global installation of tools I have are installing some files This is also the path use for Good be a good place to store those - there would just be conflict probably on some multiple user windows server or windows computer as this is global. I would mean the TinyTeX install will be shared. Maybe this needs to stay optional and opt-in when we detect potential username issue |
Yes, And yes, I was thinking of falling back to
|
I'll write a blog post about this change tomorrow. In short, if
I don't know how @AJThurston @wesleyburr You can move TinyTeX using the R code I mentioned in the first bullet above, which requires the development version of tinytex: remotes::install_github('rstudio/tinytex') |
…or TeX Live When %APPDATA% contains spaces, TeX Live may not work (rstudio/tinytex#420). When it contains non-ASCII characters, TeX Live will not work for sure. More info: https://yihui.org/en/2023/11/tinytex-path/
running xelatex - 1
command xelatex not found, attempting install
finding package for xelatex
My machine's username is "AJ Thurston"
The text was updated successfully, but these errors were encountered: