Knit error in RStudio: pandoc conversion failed with error 23. Extension ascii_identifiers is not supported for markdown
Asked Answered
M

1

6

Trying to knit a doc into html, RStudio would hang on the conversion to html part. I looked around and it looked like this happened to other folks when they were using an out of date pandoc version. I updated pandoc to 2.8. I received the error in the title. Looking around again, it appeared that v 2.5 seemed stable. I installed that, restarted my computer, and still get the same error.

repex is the default example when you create an RMarkdown file in RStudio: file -> New file -> R Markdown -> html.

---
title: "repexpandocerror23"
author: "Adam Korejwa"
date: "11/22/2019"
output: html_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

## R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for 
authoring HTML, PDF, and MS Word documents. For more details on using R 
Markdown see <http://rmarkdown.rstudio.com>.

When you click the **Knit** button a document will be generated that 
includes both content as well as the output of any embedded R code chunks 
within the document. You can embed an R code chunk like this:

```{r cars}
summary(cars)
```

## Including Plots

You can also embed plots, for example:

```{r pressure, echo=FALSE}
plot(pressure)
```

Note that the `echo = FALSE` parameter was added to the code chunk to 
prevent printing of the R code that generated the plot.
Milner answered 22/11, 2019 at 18:33 Comment(9)
Please make this question reproducible. This includes sample code (including listing non-base R packages), sample unambiguous data (e.g., dput(head(x)) or data.frame(x=...,y=...)), and expected output. Refs: stackoverflow.com/questions/5963269, stackoverflow.com/help/mcve, and stackoverflow.com/tags/r/info.Skirling
Some thoughts: if you have a system-wide installation of pandoc, then you might find a difference (on windows) if you run system("pandoc --version") and system(paste(file.path(Sys.getenv("RSTUDIO_PANDOC"), "pandoc"), "--version")) (as RStudio keeps its own version of pandoc installed).Skirling
It appears the system wide pandoc is 2.8, despite installing 2.5. The other command returns status 127: system(paste(file.path(Sys.getenv("RSTUDIO_PANDOC"), "pandoc"), "--version")) Warning message: running command 'C:/Program Files/RStudio/bin/pandoc/pandoc --version' had status 127Milner
Oh, right, I hate R's system. Try system(paste(shQuote(file.path(Sys.getenv("RSTUDIO_PANDOC"), "pandoc")), "--version"))Skirling
running that command, I get 2.5. Running rmarkdown::pandoc_version(), I get 2.8.Milner
Your Rmd above gives no errors for me, btw. R-3.5.3, win10, pandoc-2.7.3, knitr-1.23. (Curious, does rmarkdown::pandoc_version() show you 2.5 or 2.8?)Skirling
Since pandoc-2.5 (changelog), the only reference to ascii_identifiers is in version 2.8 is with gfm_auto_identifiers in the presence of emojis, so it doesn't seem like that is going to produce significantly different results. Sorry, I'm running into dead-ends, I just can't reproduce your problem to be able to troubleshoot its cause.Skirling
R 3.4.4, win 10. rmarkdown::pandoc_version() gives 2.8. I updated markdown package with install.packages('rmarkdown') and it appears to be working now. pandoc_version() still gives 2.8.Milner
Please provide session info (e.g. xfun::session_info('rmarkdown')) when reporting issues. My best guess is that you are using an old version of rmarkdown, but it will be much better if we don't have to guess.Forerun
F
8

I have fixed this issue two months ago. Please make sure your rmarkdown version is at least v1.16. Once again, when in doubt, consider updating your packages:

update.packages(ask = FALSE, checkBuilt = TRUE)
Forerun answered 22/11, 2019 at 22:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.