rstudio / rticles

LaTeX Journal Article Templates for R Markdown
https://pkgs.rstudio.com/rticles/
1.46k stars 516 forks source link

LaTeX Error: File `orcidlink.sty' not found. #493

Closed AtomicNess123 closed 2 years ago

AtomicNess123 commented 2 years ago

By filing an issue to this repo, I promise that

I understand that my issue may be closed if I don't fulfill my promises.

issue with orcidlink

I downloaded the JSS Rmd template and knitted it. This is the output error:

output file: MyJSSArticle.knit.md

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

! Emergency stop.
<read *> 

Error: LaTeX failed to compile MyJSSArticle.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See MyJSSArticle.log for more info.
Execution halted

I have followed all advice from the above link unsuccessfully. Anybody has has this problem? Thanks!

cderv commented 2 years ago

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

It means that orcidlink CTAN package is missing. You need to install all required package for a compilation to work. So tlmgr install orcidlink should fix the issue or tinytex::tlmgr_install("orcidlink"), both working for TeX Live distribution.

But if you are using TeX Live, installation of missing package should be done automatically by tinytex. It seems it is not the case here. Are you using TeX Live, or TinyTeX (https://yihui.org/tinytex/) ?

AtomicNess123 commented 2 years ago

Thanks for your response! I am not sure which Tex I am using, how can I check? I seem to have both installed, but I am not sure.

cderv commented 2 years ago

You can check if you have TinyTeX using tinytex::is_tinytex()

You can check if you have TeX Live : tinytex::tlmgr("--version")

Otherwise, you can also check what tools is used Sys.which("latexmk") and Sys.which("pdflatex")

AtomicNess123 commented 2 years ago

Thanks! Here the outputs:

> tinytex::is_tinytex()
[1] FALSE

I did install.package('tinytex') But still get FALSE.

> tinytex::tlmgr("--version")
tlmgr --version
tlmgr revision 54446 (2020-03-21 17:45:22 +0100)
tlmgr using installation: /usr/local/texlive/2020
TeX Live (https://tug.org/texlive) version 2020
> Sys.which("latexmk")
                      latexmk 
"/Library/TeX/texbin/latexmk" 

> Sys.which("pdflatex")
                      pdflatex 
"/Library/TeX/texbin/pdflatex" 
cderv commented 2 years ago

OK

If you don't mind, I would suggest the following

Then you should have an updated version and if you are correctly on an online environment, you'll get missing packages installed automatically

AtomicNess123 commented 2 years ago

Thanks, just one question: is there a command to uninstall TeX Live? Also, how would uninstalling TeX Live affect my overall LateX behaviour outside R?

cderv commented 2 years ago

is there a command to uninstall TeX Live?

I guess it depends how you installed it. You'll find several way on the web.

Also, how would uninstalling TeX Live affect my overall LateX behaviour outside R?

TinyTeX is a normal LaTeX distribution, and installation should put the right tools on the PATH, so outside of R tlmgr and others commands should work. TinyTeX can be used also by non R user: https://yihui.org/tinytex/#for-other-users

AtomicNess123 commented 2 years ago

Thanks, managed to uninstalled and installed in RStudio TinyTeX. Then I went outside R to compile a PDF document in Latex and got this error:

! LaTeX Error: Filegrffile.sty' not found.`

cderv commented 2 years ago

Then I went outside R to compile a PDF document in Latex and got this error:

TeX Live does not have an automatic installation of Package, unlink MikTeX. We have added that when using TeX Live with R through the tinytex R package.

When not using with R, this is as usual with TeX Live -> you need to install all the packages required by your document using tlmgr install.

If you don't mind having a non-lightweight distribution we have built a full version containing all available CTAN package at time of packaging: https://yihui.org/en/2022/05/tinytex-full/

There are also different bundles with some variations of packages included: https://github.com/rstudio/tinytex-releases/#releases

Hope it helps clarify

AtomicNess123 commented 2 years ago

Thanks. In the meanwhile I am installing TexLive, which is very heavy on disk space but I think it will have all the required packages. When I did tlmgr install nameofpackage then there was another package that was missing. I did this several times. So I think it's best that I install the whole Tex distribution. I must admit I don't know what the differences are between distributions in LateX, it seems a very cryptic domain to me. You talk about installing the full (not so tiny :) TinyTex distribution, but I wonder what the difference is with TeXLive.

cderv commented 2 years ago

You talk about installing the full (not so tiny :) TinyTex distribution, but I wonder what the difference is with TeXLive.

Everything is in here: https://yihui.org/tinytex/ including the maintenance part of installing package for non R user.

TinyTeX is TeX Live that we bundled in a portable way. It has several advantage including easy install / uninstall. For R Markdown users we bundle a specific version that contains the most common CTAN packages required for R Markdown to work. With time, we added other bundles (rstudio/tinytex-releases#releases) which increased in sized. The last one is not at all tiny as it contains TeX Live + the full set of CTAN packages as explained in yihui.org/en/2022/05/tinytex-full

In the meanwhile I am installing TexLive, which is very heavy on disk space but I think it will have all the required packages.

I don't know for Tex Live but I know that the full version of TinyTeX will contains every CTAN package. If you want to go with that, it is ~2Go or more.

AtomicNess123 commented 2 years ago

Thanks, that clarifies a lot. You mean that the big version of TinyTex is still better in terms of disk space than the TeXLive version?

cderv commented 2 years ago

You mean that the big version of TinyTex is still better in terms of disk space than the TeXLive version?

I don't really know. I know that our bundle takes between 1.7Gb and 2Gb compressed - not sure uncompressed.

github-actions[bot] commented 1 year ago

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.