rstudio / rticles

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

documents using 'jss' template fail to render because orcidlink.sty is missing #495

Closed egouldo closed 2 years ago

egouldo commented 2 years ago
test <- rmarkdown::draft("test",
                         "jss",
                         "rticles",
                         create_dir = FALSE,
                         edit = FALSE
)

rmarkdown::render(test)
#> processing file: test.Rmd
#> output file: test.knit.md
#> /Applications/RStudio.app/Contents/MacOS/quarto/bin/pandoc +RTS -K512m -RTS test.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output test.tex --lua-filter /Users/egould/Library/R/x86_64/4.2/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Users/egould/Library/R/x86_64/4.2/library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --template /Users/egould/Library/R/x86_64/4.2/library/rticles/rmarkdown/templates/jss/resources/template.tex --highlight-style tango --pdf-engine pdflatex --natbib --lua-filter /Users/egould/Library/R/x86_64/4.2/library/rticles/rmarkdown/lua/short-title.lua
#> ! LaTeX Error: File `orcidlink.sty' not found.
#> 
#> ! Emergency stop.
#> <read *>
#> Error: LaTeX failed to compile test.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See test.log for more info.

xfun::session_info('rticles')
#> R version 4.2.0 (2022-04-22)
#> Platform: x86_64-apple-darwin17.0 (64-bit)
#> Running under: macOS Big Sur/Monterey 10.16
#> 
#> Locale: en_AU.UTF-8 / en_AU.UTF-8 / en_AU.UTF-8 / C / en_AU.UTF-8 / en_AU.UTF-8
#> 
#> Package version:
#>   base64enc_0.1.3  bslib_0.3.1      digest_0.6.29    evaluate_0.15   
#>   fastmap_1.1.0    fs_1.5.2         glue_1.6.2       graphics_4.2.0  
#>   grDevices_4.2.0  highr_0.9        htmltools_0.5.2  jquerylib_0.1.4 
#>   jsonlite_1.8.0   knitr_1.39       magrittr_2.0.3   methods_4.2.0   
#>   R6_2.5.1         rappdirs_0.3.3   rlang_1.0.2      rmarkdown_2.14.3
#>   rticles_0.23.6   sass_0.4.1       stats_4.2.0      stringi_1.7.6   
#>   stringr_1.4.0    tinytex_0.40     tools_4.2.0      utils_4.2.0     
#>   xfun_0.31        yaml_2.3.5

Created on 2022-06-20 by the reprex package (v2.0.1)


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.

cderv commented 2 years ago

This is a duplicate of https://github.com/rstudio/rticles/issues/493 - see if your issue is the same maybe.

Are you using TinyTeX or TeX Live ? Usually with these, tinytex R package will try to installed the mising

About why you get that: LaTeX is like R and works with packages. orcidlink must be installed from CTAN. If you have one of the above, tinytex::tlmgr_install("orcidlink") should do it, but it should have been done automatically, so maybe there is an issue with your LaTeX distribution.

Hope it helps

egouldo commented 2 years ago

Thanks @cderv , indeed there was a problem with my LaTeX distribution. TeXLive was installed, along with the orcidilnk package, but R couldn't find it despite having TinyTeX installed. Reinstalling TinyTeX with tinytex::install_tinytex() and installing orcidlink as per your suggestion fixed the problem.

cderv commented 2 years ago

TeXLive was installed, along with the orcidilnk package, but R couldn't find it despite having TinyTeX installed.

Odd, tinytex should have found your TeX Live installation if it was a good one with tlmgr in PATH.

Anyway, glad it is working now.

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.