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

Non-reproducible code from the package example #134

Open
ABohynDOE opened this issue Feb 13, 2024 · 5 comments
Open

Non-reproducible code from the package example #134

ABohynDOE opened this issue Feb 13, 2024 · 5 comments

Comments

@ABohynDOE
Copy link

I'm running the demo bookdown example from the package and I cannot reproduce the output presented in the README.
Specifically, the "Table of Figures" and "Table of Tables" are not compiled and instead of seeing them in the word document, I obtain the message "No table of contents entries found."

Even changing the <!---BLOCK_TOC{style: 'Image Caption'}---> or block_toc(style = "Image Caption") commands to block_toc(seq_id = "fig") doesn't produce any result.

image

@davidgohel
Copy link
Owner

Did you update the fields? https://ardata-fr.github.io/officeverse/faq.html#update-fields

@ABohynDOE
Copy link
Author

Yes, Word automatically asks me when I open the file.
I even re-updated them using Ctrl-A + F9 but it still doesn't produce anything.

@davidgohel
Copy link
Owner

OK,

Can you provide the sessionInfo() result please? Run the following to do so

dir <- system.file(package = "officedown", "examples", "bookdown")
file.copy(dir, getwd(), recursive = TRUE, overwrite = TRUE)
rmarkdown::render_site("bookdown")
sessionInfo()

@ABohynDOE
Copy link
Author

Here it is:

dir <- system.file(package = "officedown", "examples", "bookdown")
file.copy(dir, getwd(), recursive = TRUE, overwrite = TRUE)
#> [1] TRUE
rmarkdown::render_site("bookdown")
#> processing file: bookdown.Rmd
#> output file: bookdown.knit.md
#> "C:/PROGRA~1/Pandoc/pandoc" +RTS -K512m -RTS bookdown.knit.md --to docx --from markdown+autolink_bare_uris+tex_math_single_backslash --output bookdown.docx --lua-filter "C:\Users\u0133728\AppData\Local\R\win-library\4.3\bookdown\rmarkdown\lua\custom-environment.lua" --lua-filter "C:\Users\u0133728\AppData\Local\R\win-library\4.3\rmarkdown\rmarkdown\lua\pagebreak.lua" --metadata-file "C:\Users\u0133728\AppData\Local\Temp\Rtmpc9494l\file4e602c4125b1" --highlight-style tango --reference-doc "C:\Users\u0133728\AppData\Local\Temp\RtmpA1Dorj\reprex-41648dd61ec-used-aidi\bookdown\template.docx"
#> 
#> Output created: _book/bookdown.docx
sessionInfo()
#> R version 4.3.1 (2023-06-16 ucrt)
#> Platform: x86_64-w64-mingw32/x64 (64-bit)
#> Running under: Windows 11 x64 (build 22621)
#> 
#> Matrix products: default
#> 
#> 
#> locale:
#> [1] LC_COLLATE=English_Belgium.utf8  LC_CTYPE=English_Belgium.utf8   
#> [3] LC_MONETARY=English_Belgium.utf8 LC_NUMERIC=C                    
#> [5] LC_TIME=English_Belgium.utf8    
#> 
#> time zone: Europe/Brussels
#> tzcode source: internal
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> other attached packages:
#> [1] flextable_0.9.4  officer_0.6.3    officedown_0.3.1 knitr_1.45      
#> 
#> loaded via a namespace (and not attached):
#>  [1] styler_1.10.2           fontLiberation_0.1.0    xml2_1.3.5             
#>  [4] httpcode_0.3.0          digest_0.6.33           magrittr_2.0.3         
#>  [7] grid_4.3.1              evaluate_0.23           bookdown_0.37          
#> [10] fastmap_1.1.1           R.oo_1.25.0             R.cache_0.16.0         
#> [13] jsonlite_1.8.7          R.utils_2.12.2          zip_2.3.0              
#> [16] crul_1.4.0              promises_1.2.1          purrr_1.0.2            
#> [19] fontBitstreamVera_0.1.1 textshaping_0.3.7       cli_3.6.1              
#> [22] shiny_1.8.0             rlang_1.1.1             fontquiver_0.2.1       
#> [25] crayon_1.5.2            R.methodsS3_1.8.2       ellipsis_0.3.2         
#> [28] reprex_2.1.0            withr_2.5.2             cachem_1.0.8           
#> [31] gfonts_0.2.0            yaml_2.3.7              gdtools_0.3.4          
#> [34] tools_4.3.1             uuid_1.1-1              memoise_2.0.1          
#> [37] httpuv_1.6.12           curl_5.1.0              vctrs_0.6.5            
#> [40] R6_2.5.1                mime_0.12               lifecycle_1.0.4        
#> [43] fs_1.6.3                ragg_1.2.6              later_1.3.1            
#> [46] data.table_1.14.8       glue_1.6.2              Rcpp_1.0.11            
#> [49] systemfonts_1.0.5       xfun_0.41               rvg_0.3.3              
#> [52] rstudioapi_0.15.0       xtable_1.8-4            htmltools_0.5.7        
#> [55] rmarkdown_2.25          compiler_4.3.1          askpass_1.2.0          
#> [58] openssl_2.1.1

@davidgohel
Copy link
Owner

thanks, I can't reproduce for now (not sure but I have the same packages'versions except for officer)

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