rticles icon indicating copy to clipboard operation
rticles copied to clipboard

Cannot render a document with the arxiv template (pdfTeX error (font expansion): auto expansion is only possible with scalable fonts)

Open gladymarperez opened this issue 2 years ago • 1 comments

Hi Christophe,

Thank you so much for developing and maintaining the rticles package.

I cannot create a new rmarkdown document using the arxiv template, as I get the following error:

! pdfTeX error (font expansion): auto expansion is only possible with scalable fonts.
<argument> ...shipout:D \box_use:N \l_shipout_box 
                                                  \__shipout_drop_firstpage_...
l.192 \end{center}

This was working with no issues some hours ago, and all of a sudden I am seeing the above-described error. I know that a similar issue was posted in 2020 (https://github.com/rstudio/rticles/issues/343).

I am using R-4.3.1, Rstudio version 2023.06.1 and github version of rticles.

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

xfun::session_info('rticles')

R version 4.3.1 (2023-06-16 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044), RStudio 2023.6.1.524

Locale:
  LC_COLLATE=English_Australia.utf8  LC_CTYPE=English_Australia.utf8   
  LC_MONETARY=English_Australia.utf8 LC_NUMERIC=C                      
  LC_TIME=English_Australia.utf8    

time zone: Australia/Perth
tzcode source: internal

Package version:
  base64enc_0.1.3   bslib_0.5.1       cachem_1.0.8      cli_3.6.1         digest_0.6.33    
  ellipsis_0.3.2    evaluate_0.21     fastmap_1.1.1     fontawesome_0.5.2 fs_1.6.3         
  glue_1.6.2        graphics_4.3.1    grDevices_4.3.1   highr_0.10        htmltools_0.5.6  
  jquerylib_0.1.4   jsonlite_1.8.7    knitr_1.43        lifecycle_1.0.3   magrittr_2.0.3   
  memoise_2.0.1     methods_4.3.1     mime_0.12         R6_2.5.1          rappdirs_0.3.3   
  rlang_1.1.1       rmarkdown_2.24    rticles_0.25.1    sass_0.4.7        stats_4.3.1      
  stringi_1.7.12    stringr_1.5.0     tinytex_0.46      tools_4.3.1       utils_4.3.1      
  vctrs_0.6.3       xfun_0.40         yaml_2.3.7 

By filing an issue to this repo, I promise that

  • [x] I have fully read the issue guide at https://yihui.name/issue/.
  • [x ] 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('rticles'). 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/rticles').
    • If I have posted the same issue elsewhere, I have also mentioned it in this issue.
  • [x] 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.

gladymarperez avatar Sep 04 '23 14:09 gladymarperez

Thanks for the report.

To try reproduce I created a new document using arXiv preprint template

Content
---
title: A template for the *arxiv* style
authors:
  - name: David S. Hippocampus
    thanks: Use footnote for providing further information about author (webpage, alternative address)---*not* for acknowledging funding agencies. Optional.
    department: Department of Computer Science
    affiliation: Cranberry-Lemon University
    location: Pittsburgh, PA 15213
    email: [email protected]
  - name: Elias D. Striatum
    department: Department of Electrical Engineering
    affiliation: Mount-Sheikh University
    location: Santa Narimana, Levand
    email: [email protected]
abstract: |
  Enter the text of your abstract here.
keywords:
  - blah
  - blee
  - bloo
  - these are optional and can be removed
bibliography: references.bib
biblio-style: unsrt
output: rticles::arxiv_article
---

# Introduction

Here goes an introduction text

# Headings: first level
\label{sec:headings}

You can use directly LaTeX command or Markdown text. 

LaTeX command can be used to reference other section. See Section \ref{sec:headings}.
However, you can also use **bookdown** extensions mechanism for this.

## Headings: second level

You can use equation in blocks

$$
\xi _{ij}(t)=P(x_{t}=i,x_{t+1}=j|y,v,w;\theta)= {\frac {\alpha _{i}(t)a^{w_t}_{ij}\beta _{j}(t+1)b^{v_{t+1}}_{j}(y_{t+1})}{\sum _{i=1}^{N} \sum _{j=1}^{N} \alpha _{i}(t)a^{w_t}_{ij}\beta _{j}(t+1)b^{v_{t+1}}_{j}(y_{t+1})}}
$$

But also inline i.e $z=x+y$

### Headings: third level

Another paragraph. 


# Examples of citations, figures, tables, references
\label{sec:others}

You can insert references. Here is some text [@kour2014real; @kour2014fast] and see @hadash2018estimate.

The documentation for \verb+natbib+ may be found at

You can use custom blocks with LaTeX support from **rmarkdown** to create environment.

::: {.center latex=true}
  <http://mirrors.ctan.org/macros/latex/contrib/natbib/natnotes.pdf}>
:::

Of note is the command \verb+\citet+, which produces citations
appropriate for use in inline text.  

You can insert LaTeX environment directly too.

\begin{verbatim}
   \citet{hasselmo} investigated\dots
\end{verbatim}

produces

\begin{quote}
  Hasselmo, et al.\ (1995) investigated\dots
\end{quote}

\begin{center}
  \url{https://www.ctan.org/pkg/booktabs}
\end{center}


## Figures

You can insert figure using LaTeX directly. 

See Figure \ref{fig:fig1}. Here is how you add footnotes. [^Sample of the first footnote.]

\begin{figure}
  \centering
  \fbox{\rule[-.5cm]{4cm}{4cm} \rule[-.5cm]{4cm}{0cm}}
  \caption{Sample figure caption.}
  \label{fig:fig1}
\end{figure}

But you can also do that using R.

```{r fig2, fig.cap = "Another sample figure"}
plot(mtcars$mpg)
```

You can use **bookdown** to allow references for Tables and Figures.


## Tables

Below we can see how to use tables. 

See awesome Table~\ref{tab:table} which is written directly in LaTeX in source Rmd file.

\begin{table}
 \caption{Sample table title}
  \centering
  \begin{tabular}{lll}
    \toprule
    \multicolumn{2}{c}{Part}                   \\
    \cmidrule(r){1-2}
    Name     & Description     & Size ($\mu$m) \\
    \midrule
    Dendrite & Input terminal  & $\sim$100     \\
    Axon     & Output terminal & $\sim$10      \\
    Soma     & Cell body       & up to $10^6$  \\
    \bottomrule
  \end{tabular}
  \label{tab:table}
\end{table}

You can also use R code for that.

```{r}
knitr::kable(head(mtcars), caption = "Head of mtcars table")
```


## Lists

- Item 1
- Item 2 
- Item 3

It renders fine for me with no issue.

cderv avatar Sep 04 '23 15:09 cderv