This started as me writing an issue on the tinytex
GitHub, but as I have tried to troubleshoot it, I keep finding more and weirder errors.
Here's the big-picture goal: I want to get my LaTeX CV to compile nicely using RStudio. I've used tinytex
for years within RStudio rather than maintaining another TeX installation, and it has been fine for a long time. My CV is available as a gist if you'd like to check the LaTeX code, but I swear I have not edited it since it last successfully compiled, in June.
When I went to compile it today, it creates a PDF document but it looks awful. The major problem is that all the text in the document is bold. I do get one warning,
Package auxhook Warning: Cannot patch \document,
(auxhook) using \AtBeginDocument instead.
I've gone down a rabbit hole on StackExchange about this warning, because my document does not explicitly use auxhook
, but it does use a resume.cls
file, which may be the problem. The file I used is a lightly-modified version of Trey Hunter's file, and it requires a few packages.
"Ah!" I said. "Maybe those packages are missing." I tried installing them.
> tlmgr_install(pkgs = "ifthen")
tlmgr install ifthen
tlmgr install: package ifthen not present in repository.
tlmgr: action install returned an error; continuing.
tlmgr: package repository https://mirror.mwt.me/ctan/systems/texlive/tlnet (not verified: gpg unavailable)
tlmgr: An error has occurred. See above messages. Exiting.
tlmgr update --self
tlmgr install ifthen
tlmgr install: package ifthen not present in repository.
tlmgr: action install returned an error; continuing.
tlmgr: package repository https://ctan.math.utah.edu/ctan/tex-archive/systems/texlive/tlnet (not verified: gpg unavailable)
tlmgr: An error has occurred. See above messages. Exiting.
Same deal for another package I needed, array
. At this point, I'm digging into the issues on tinytext
. I find a related one, but the resolution to that was that the package didn't exist on CTAN. Both array and ifthen exist on CTAN. I start writing a new GitHub issue.
I get down to Yihui's checkboxes at the bottom of the issue box, where he asks you to certify you've done a couple things. One is provide the session info,
> xfun::session_info('tinytex')
R version 4.2.1 (2022-06-23)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: , RStudio 2022.7.1.554
Locale: en_US.UTF-8 / en_US.UTF-8 / en_US.UTF-8 / C / en_US.UTF-8 / en_US.UTF-8
Package version:
graphics_4.2.1 grDevices_4.2.1 stats_4.2.1 tinytex_0.40 tools_4.2.1 utils_4.2.1
xfun_0.32
LaTeX version used:
TeX Live 2022 (TinyTeX) with tlmgr 2022-04-18
Another is verify that you've tried updating everything. So I update R, reinstall RStudio (looks like that hadn't changed since I last installed), reinstall my packages, including tinytex
. Same issue when I'm trying to compile. Then Yihui says you need to try the development version of tinytex
.
> remotes::install_github('rstudio/tinytex')
Downloading GitHub repo rstudio/tinytex@HEAD
Running `R CMD build`...
* checking for file ‘/private/var/folders/8d/qbk26svn0f74ygywvkrd70lr0000gn/T/RtmplpsbmS/remotes161df122229b4/rstudio-tinytex-3d146ac/DESCRIPTION’ ... OK
STDOUT:
* checking for file ‘/private/var/folders/8d/qbk26svn0f74ygywvkrd70lr0000gn/T/RtmplpsbmS/remotes161df122229b4/rstudio-tinytex-3d146ac/DESCRIPTION’ ... OK
STDERR:
Error in system2("cp", "--version", stdout = TRUE, stderr = FALSE) :
error in running command
Execution halted
sh: rm: command not found
Error: Failed to install 'tinytex' from GitHub:
Failed to `R CMD build` package, try `build = FALSE`.
sh: rm: command not found
?? That doesn't sound good. But okay, I'll try build=FALSE
.
> remotes::install_github('rstudio/tinytex', build=FALSE)
Downloading GitHub repo rstudio/tinytex@HEAD
* installing *source* package ‘tinytex’ ...
sh: mv: command not found
Warning in system(paste("mv -f ", shQuote(instdir), shQuote(file.path(lockdir, :
error in running command
ERROR: cannot remove earlier installation, is it in use?
* removing ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/tinytex’
sh: rm: command not found
Warning message:
In i.p(...) :
installation of package ‘/var/folders/8d/qbk26svn0f74ygywvkrd70lr0000gn/T//RtmplpsbmS/remotes161df70644e57/rstudio-tinytex-3d146ac’ had non-zero exit status
At this point, I have no idea what my problem is. Is it:
- There's some goofy error in my LaTeX document
- The
rm
command somehow doesn't work? (It works in the Terminal) - My TeX installation is corrupted
- I need to specify my CTAN repository more explicitly
- Small aliens have taken up residence in my computer
- ???