rstudio / rticles

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

Arxiv template unspecified dependency #343

Closed slemonide closed 3 years ago

slemonide commented 3 years ago

Arxiv example wouldn't get knitted unless cm-super fonts are installed:

tinytex::tlmgr_install("cm-super")

I am using rstudio server from docker image rocker/verse:4.0.3 and github version of rticles.

To reproduce: create a new rmarkdown document using arxiv template and try knitting it.

I think such dependencies need to be installed or at least written down somewhere.

> xfun::session_info('rticles')
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04 LTS, RStudio 1.3.1093

Locale:
  LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
  LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=C             
  LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
  LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

Package version:
  base64enc_0.1.3 digest_0.6.27   evaluate_0.14   glue_1.4.2      graphics_4.0.3  grDevices_4.0.3
  highr_0.8       htmltools_0.5.0 jsonlite_1.7.1  knitr_1.30      magrittr_1.5    markdown_1.1   
  methods_4.0.3   mime_0.9        rlang_0.4.8     rmarkdown_2.5   rticles_0.17.1  stats_4.0.3    
  stringi_1.5.3   stringr_1.4.0   tinytex_0.27    tools_4.0.3     utils_4.0.3     xfun_0.19      
  yaml_2.2.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 3 years ago

Thanks I can reproduce with recent version of TexLive. Must be another side effect of last updates.

It should be detected though to be install automatically by TinyTeX

cderv commented 3 years ago

@alexpghayes @Athanasiamo you both contributed on this template. Do you encounter this issue too ?

cderv commented 3 years ago

For reference the error is

{c:/Users/chris/AppData/Roaming/TinyTeX/texmf-var/fonts/map/pdftex/updmap/pdfte
x.map}
! pdfTeX error (font expansion): auto expansion is only possible with scalable 
fonts.
<argument> ...shipout:D \box_use:N \l_shipout_box 

l.145 \begin{equation}

Adding as other template

\usepackage{lmodern}

after \usepackage[T1]{fontenc} also works.

@yihui do you have a recommandation on this error ? We are not catching this in our CI - don't know why 🤔

slemonide commented 3 years ago

Here is stackexchange thread about this problem: https://tex.stackexchange.com/questions/10706/pdftex-error-font-expansion-auto-expansion-is-only-possible-with-scalable

cderv commented 3 years ago

Thanks. This is an old thread - I wonder why it is no more working now while it was before and why it works in our CI currently. 🤔

yihui commented 3 years ago

Sorry, but I don't really understand this error. Sounds like there are at least two possible solutions, and I don't know which one I/we should use. I could automatically install cm-super in TinyTeX, but I'd better understand the actual problem before covering it. If @alexpghayes and @Athanasiamo are okay with adding the lmodern package to the Arxiv template, that'll be great (and I won't need to do anything).

alexpghayes commented 3 years ago

No objections here

cderv commented 3 years ago

I added lmodern to the template.

github-actions[bot] commented 3 years 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.