Skip to content
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

The xelatex() function is slow and not responding #412

Closed
3 tasks done
phargarten2 opened this issue Apr 25, 2023 · 1 comment
Closed
3 tasks done

The xelatex() function is slow and not responding #412

phargarten2 opened this issue Apr 25, 2023 · 1 comment

Comments

@phargarten2
Copy link

phargarten2 commented Apr 25, 2023

I am attempting to create a pdf document using rmarkdown::render(). render() is unresponsive, and upon investigation, I discovered that the difficulty is converting the tex file to pdf file, which is done by the tinytex::latexmk() function. Using render(keep_tex = TRUE), I am able to create a tex file. Running render.R on "my_first.Rmd" creates a tex file. Then running xelatex(), it is slow, and a pdf() is not generated.

Example: tinytex_xelatex.zip

The log indicates `multirow.sty' not found, but the function is still running in R.

options(tinytex.verbose = TRUE)
> tinytex::xelatex(
+   file = "my_first_Rmd.tex",
+   max_times = 10,
+   install_packages = TRUE
+ )

The log reads:

! LaTeX Error: File `multirow.sty' not found.

! Emergency stop.
<read *> 

There are issues in installing missing LaTex packages, after following https://yihui.org/tinytex/.

> tlmgr_install("multirow")
tlmgr install multirow

C:\Users\...\AppData\Roaming\TinyTeX\texmf-dist\scripts\texlive\tlmgr.pl: TLPDB::from_file could not initialize from: https://mirror.ctan.org/systems/texlive/tlnet/tlpkg/texlive.tlpdb
C:\Users\...\AppData\Roaming\TinyTeX\texmf-dist\scripts\texlive\tlmgr.pl: Maybe the repository setting should be changed.
C:\Users\...\AppData\Roaming\TinyTeX\texmf-dist\scripts\texlive\tlmgr.pl: More info: https://tug.org/texlive/acquire.html

This site (https://tex.stackexchange.com/questions/575205/tlmgr-install-cannot-initialize-tlpdb-from-ftp) and #358 suggested the repository should be different. But, I used the default repository when installing LaTeX.

The LaTex repository mentioned updates recently...so could it be possible that this is the issue?
image

> tinytex::tlmgr_repo()
tlmgr option repository
Default package repository (repository): https://mirror.ctan.org/systems/texlive/tlnet

I have tried uninstalling tinytex() and removed the files stored in "AppData\Roaming" in the user's C drive. Then, I reinstalled it to no avail. I also applied the function Yihui Xie made here: r tinytex:::install_prebuilt(). This didn't work either.

> tinytex::uninstall_tinytex()
> tinytex::install_tinytex()
trying URL 'https://yihui.org/tinytex/TinyTeX-1.zip'
Content type 'application/octet-stream' length 127973839 bytes (122.0 MB)
downloaded 122.0 MB
3 File(s) copied
1 File(s) copied
Running fc-cache -v -r

Therefore, any help in fixing the errors in installing LaTex packages would be appreciated. I couldn't find solutions to this problem on https://yihui.org/tinytex/.

Info:

> tlmgr_version()
tlmgr revision 66798 (2023-04-08 02:15:21 +0200)
tlmgr using installation: C:/Users/ph137/AppData/Roaming/TinyTeX
TeX Live (https://tug.org/texlive) version 2023
R version 4.2.3 (2023-03-15 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045), RStudio 2023.3.0.386

Locale:
  LC_COLLATE=English_United States.utf8  LC_CTYPE=English_United States.utf8    LC_MONETARY=English_United States.utf8
  LC_NUMERIC=C                           LC_TIME=English_United States.utf8    

Package version:
  graphics_4.2.3  grDevices_4.2.3 stats_4.2.3     tinytex_0.45    tools_4.2.3     utils_4.2.3     xfun_0.39      

LaTeX version used: 
  TeX Live 2023 (TinyTeX) with tlmgr 2023-04-08

By filing an issue to this repo, I promise that

  • I have fully read the issue guide at https://yihui.org/issue/.
  • 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.

@phargarten2
Copy link
Author

My computer is under a proxy (that is at work) suggested by link and here. Chris mentioned there:

This seems definitely a TeX Live issue with your system. If you are in a corporate environment (probably why proxy ?), then it could also happen that your proxy has some rules and do some filtering which prevents to access.

Indeed, this was the case for me. Working with the network managers, I could download the necessary LaTeX packages. (The repository message went away), but I got an error

tlmgr.pl: package repository https://ctan.math.utah.edu/ctan/tex-archive/systems/texlive/tlnet (not verified: pubkey missing)

which means that /usr/local/bin not writable (#24). A solution is given in this issue, and additional collaboration with the network managers is needed. Nonetheless, a pdf was generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant