rstudio / rticles

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

cls files not found when using jss format #376

Closed cc20002002 closed 3 years ago

cc20002002 commented 3 years ago

Hi,

I have the following minimal example that cannot be compiled into pdf. It turns out it can produce tex files but not a pdf. Reason being tex cannot find jss file:

File `jss.cls' not found.

So do I have to manually download abd put jss.cls into the same folder of my rmarkdown file?

Cheers,

---
title: "***"
documentclass: jss
output: rticles::jss_article
author:
- name: C1233
  affiliation: 123123
header-includes:
    - \usepackage{booktabs}
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(tidy = "formatR",
                      tidy.opts = list(blank = FALSE, width.cutoff = 40),
                      echo = F,
                      results = "markup")
knitr::opts_chunk$set(message = F)
knitr::opts_chunk$set(warning = F)

texttext

cc20002002 commented 3 years ago

OK. So if I use rstudio to create a jss template it will give me a cls file. Please close the issue.

cderv commented 3 years ago

Yes the assets are contained as template inside the package and copied to the user system when you create a template. You can do that using RStudio, but also at the command line:

rmarkdown::draft("MyJSSArticle.Rmd", template = "jss", package = "rticles")

You can use this is you don't use RStudio IDE for example.

See documentation in https://bookdown.org/yihui/rmarkdown/rticles-start.html

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