Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rticles::joss_article does not work with r chunks and image chunks. #576

Open
benyamindsmith opened this issue Nov 4, 2024 · 2 comments

Comments

@benyamindsmith
Copy link

benyamindsmith commented Nov 4, 2024

I am working with rticles to write a JOSS article and it would be nice to preview how the article would look when I am running it.

I have noticed that when specifying output: rticles::joss_article realized that I am unable to knit my .Rmd file to a pdf.

Minimal Example (example.Rmd)

---
title: "Example"
author: "Benjamin Smith"
date: "`r Sys.Date()`"
output:
  rticles::joss_article
---

# Introduction 

`This is some text`

# Some R code

\```{r}
print("This is some R output!")
\```

# An Image

![This is an image!!](https://pkgs.rstudio.com/rticles/logo.png)

Error Code

  |...................................                 |  67% (unnamed-chunk-1)

processing file: example.Rmd
                                                                                                            
"C:/PROGRA~1/Pandoc/pandoc" +RTS -K512m -RTS example.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output example.tex --lua-filter "C:\Users\bensmith\AppData\Local\R\win-library\4.2\rmarkdown\rmarkdown\lua\pagebreak.lua" --lua-filter "C:\Users\bensmith\AppData\Local\R\win-library\4.2\rmarkdown\rmarkdown\lua\latex-div.lua" --embed-resources --standalone --template "C:\Users\bensmith\AppData\Local\R\win-library\4.2\rticles\rmarkdown\templates\joss\resources\template.tex" --highlight-style tango --pdf-engine xelatex --variable "logo_path=C:/Users/bensmith/AppData/Local/R/win-library/4.2/rticles/rmarkdown/templates/joss/resources/JOSS-logo.png" --variable "journal_name=Journal of Open Source Software" --variable graphics --variable pandoc3 --variable pandoc317 --variable pandoc318 
output file: example.knit.md

tlmgr.pl: package repository https://muug.ca/mirror/ctan/systems/texlive/tlnet (not verified: pubkey missing)
tlmgr.pl install: package already present: l3backend
tlmgr.pl install: package already present: l3backend-dev
! Undefined control sequence.
l.284 \pandocbounded
                    {\includegraphics[keepaspectratio]{https://pkgs.rstudio.... 

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

I did my fair share of looking at issues but none of them seem to point to the root of the problem.

Similar issues:

I do already have tinytex installed so that could not be the issue.

@cderv
Copy link
Collaborator

cderv commented Nov 5, 2024

This is related to

Templates needs update for a newer Pandoc version, while not breaking older version of Pandoc 😞

I'll come back to this very soon.

@benyamindsmith
Copy link
Author

benyamindsmith commented Nov 5, 2024

@cderv thanks for letting me know. I'm sure other rticles users will encounter the same problem.

The fix that I'm doing now is just using an older version of pandoc (I used 3.1.13 without any issues when using rticles)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants