noamross / redoc

[NOTE: Project in suspended animation for now] Reversible Reproducible Documents
https://noamross.github.io/redoc
Other
514 stars 44 forks source link

Unknown extension: styles #50

Closed lf-araujo closed 5 years ago

lf-araujo commented 5 years ago

Hi,

Thank you for this package. It is a bit hard to offer a MWE, as I am testing it under linux (specifically Clearlinux). Installation of the package happens without errors, however it hangs expecting an extension. The standard Rmd file below:

---
title: "R Notebook"
output: redoc::redoc
---

This is an [R Markdown](http://rmarkdown.rstudio.com) Notebook. When you execute code within the notebook, the results appear beneath the code. 

Try executing this chunk by clicking the *Run* button within the chunk or by placing your cursor inside it and pressing *Ctrl+Shift+Enter*. 

```{r}
plot(cars)

Add a new chunk by clicking the Insert Chunk button on the toolbar or by pressing Ctrl+Alt+I.

When you save the notebook, an HTML file containing the code and output will be saved alongside it (click the Preview button or press Ctrl+Shift+K to preview the HTML file).

The preview shows you a rendered HTML copy of the contents of the editor. Consequently, unlike Knit, Preview does not run any R code chunks. Instead, the output of the chunk when it was last run in the editor is displayed.


Results in the error:

/usr/bin/pandoc +RTS -K512m -RTS teste.utf8.md --to docx+empty_paragraphs --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash+smart+fenced_divs+bracketed_spans --output teste.docx --highlight-style tango --lua-filter /home/luis/R/x86_64-generic-linux-gnu-library/3.6/redoc/lua-filters/protect-empty.lua --eol=lf output file: teste.knit.md

Unknown extension: styles Erro: pandoc document conversion failed with error 1


It seems the lua filter is looking for an extension, and pandoc stops with error. The docx file is created, but I cannot convert it back to Rmd using dedoc (attached).

- How can I help debug this?

---

<details> <summary><strong>Session Info</strong></summary>

```r
R version 3.6.0 (2019-04-26)
Platform: x86_64-generic-linux-gnu (64-bit)
Running under: Clear Linux OS

Matrix products: default
BLAS/LAPACK: /usr/lib64/haswell/libopenblas_haswellp-r0.3.6.so

locale:
 [1] LC_CTYPE=pt_BR.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=pt_BR.UTF-8        LC_COLLATE=pt_BR.UTF-8    
 [5] LC_MONETARY=pt_BR.UTF-8    LC_MESSAGES=pt_BR.UTF-8   
 [7] LC_PAPER=pt_BR.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=pt_BR.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets 
[6] methods   base     

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.1       rstudioapi_0.10  knitr_1.23      
 [4] xml2_1.2.0       magrittr_1.5     uuid_0.1-2      
 [7] R6_2.4.0         rlang_0.4.0      httr_1.4.0      
[10] tools_3.6.0      xfun_0.8         htmltools_0.3.6 
[13] yaml_2.2.0       digest_0.6.19    crayon_1.3.4    
[16] zip_2.0.2        whoami_1.3.0     officer_0.3.5   
[19] base64enc_0.1-3  evaluate_0.14    mime_0.7        
[22] rmarkdown_1.13   stringi_1.4.3    compiler_3.6.0  
[25] diffobj_0.2.3    redoc_0.1.0.9000 jsonlite_1.6    

Pandoc version 2.1.1

RStudio version 99.9

teste.docx

lf-araujo commented 5 years ago

I am closing this as there is no support for Pandoc 2.1.1. Sorry for this.