-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
internal fmtutil calling on windows does not work #427
Comments
That's interesting. Not sure why |
No it doesn't > system('fmtutil-sys --all')
...\chris\AppData\Roaming\TinyTeX\bin\windows\runscript.tlu:941: ...\chris\AppData\Roaming\TinyTeX\bin\windows\runscript.tlu:864: no appropriate script or program found: fmtuti~1
[1] 1 |
Maybe because R > Sys.which("fmtutil-sys")
fmtutil-sys
"C:\\Users\\chris\\AppData\\Roaming\\TinyTeX\\bin\\windows\\FMTUTI~1.EXE"
> xfun::normalize_path(Sys.which("fmtutil-sys"))
[1] "C:/Users/chris/AppData/Roaming/TinyTeX/bin/windows/fmtutil-sys.exe"
> system2(xfun::normalize_path(Sys.which("fmtutil-sys")), "--all")
...\chris\AppData\Roaming\TinyTeX\bin\windows\runscript.tlu:941: ...\chris\AppData\Roaming\TinyTeX\bin\windows\runscript.tlu:864: no appropriate script or program found: fmtuti~1 but as you see using full path does not help... It seems really related to how > system('cmd /c fmtutil-sys --all') Which is probably the equivalent of |
I think this is because Perhaps we need to switch to |
BTW, it will be nice if R could provide an option to disable shortening paths, but this might also be solved on TeX Live's end if TeX Live could recognize short paths. Cc @norbusan: you don't need to read the full thread here---the problem that we ran into was that calling |
@yihui I am not sure how we should fix that. Do you suggest that instead of calling BTW, what happens if there are multiple fmtutil? How do we know which one is the correct one? |
No, I'm not suggesting that. From my limited understanding of As I said, this seems to be a recent change, because no one has reported this problem for the past few years. I could be wrong and this may be a certain coincidence (in other words, it might have existed for a long time but didn't surface until another problem occurred).
I don't know the answer in general, but in our case, we are calling a specific |
@norbusan This was also verified by an R core team member: https://stat.ethz.ch/pipermail/r-devel/2023-October/082979.html They said they wouldn't "fix" it in R, so our only hope is that TeX Live would accept short paths of commands. |
@yihui sorry for the long silence, I lost track of that. What about if you call |
@norbusan This is definitely a workaround but only because the name |
…ers, including fmtutil and updmap (#427 (comment))
kpsewhich is an actual .exe, but I just fear that passing in only the short name like |
Thank you very much! I have changed |
@yihui Thanks to Akira and Luigi, we have updated runscript DLL to get the long name by itself. |
@norbusan I can confirm that the new However, a deeper problem is that TeX Live doesn't work when installed to a directory that contains non-ASCII characters in its path, as Akira mentioned in the mailing list. It will be great if this limitation can be removed. In the meantime, I'll also try to come up with a installation path that doesn't contain non-ASCII characters. |
Hi @yihui Concerning the non-ASCII characters in its path, I really don't know whether this is easy to fix or not. I will discuss with the Japanese Development Team who often helps with fixing these kinds of things. |
…0.49 Yihui Xie (8): start the next version fix #424: if the error "Undefined control sequence" comes from l3backend, let tinytex try to reinstall l3backend, which will trigger `tlmgr_update()` that runs `fmtutil-sys` to fix the L3 programming layer mismatch issue (although 5946a2a has guarded against it) a workaround for calling executables with names longer than 8 characters, including fmtutil and updmap (rstudio/tinytex#427 (comment)) Fix #420: install TinyTeX to `ProgramData` on Windows if `APPDATA` contains special characters (#429) clarify the comment, i.e., users can set the env var TINYTEX_DIR to specify the installation directory of TinyTeX also check the custom installation path for spaces and non-ASCII characters on Windows add the ... argument to kpsewhich() because sometimes we may want to get the file path in the returned value CRAN release v0.49
This is not an issue with
tlmgr_update
which call this function because we setstdout = FALSE
which hide the error
So something is not right.
However,
processx::run("fmtutil-sys", "--all")
works ok, andsys::exec_wait("fmtutil-sys", "--all")
also.Found while looking at quarto-dev/quarto-cli#7252 (which means that solution in TinyTeX was not working on windows 🤔 )
This is probably a shell thing. Other commands that works
xfun:::powershell("fmtutil-sys --all")
shell("fmtutil-sys --all")
Not sure how to tweak
system2()
to solve this problem 🤔The text was updated successfully, but these errors were encountered: