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

Rmarkdown not rendering .rmd to pdf, pandoc error 2 #6

Open
mai-nguyen opened this issue Feb 9, 2021 · 2 comments
Open

Rmarkdown not rendering .rmd to pdf, pandoc error 2 #6

mai-nguyen opened this issue Feb 9, 2021 · 2 comments

Comments

@mai-nguyen
Copy link

Hi,

I was trying to render an Rmarkdown file to pdf using beaverdown and got the following error:

output file: thesis.knit.md
--chapters has been removed. Use --top-level-division=chapter instead. Try pandoc.exe --help for more information. Error: pandoc document
conversion failed with error 2 In addition: Warning message: In
has_crop_tools() : Tool(s) not installed or not in PATH: pdfcrop,
ghostcript
-> As a result, figure cropping will be disabled. Execution halted

I'm using:

  • Pandoc 2.11.4
  • MiKTeX 21.1

Session info:

R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 8.1 x64 (build 9600)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252 
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

loaded via a namespace (and not attached):
 [1] pillar_1.4.7      compiler_4.0.3   
 [3] prettyunits_1.1.1 remotes_2.2.0    
 [5] tools_4.0.3       testthat_3.0.1   
 [7] digest_0.6.27     pkgbuild_1.2.0   
 [9] pkgload_1.1.0     gtable_0.3.0     
[11] tibble_3.0.6      evaluate_0.14    
[13] memoise_2.0.0     lifecycle_0.2.0  
[15] pkgconfig_2.0.3   rlang_0.4.10     
[17] DBI_1.1.0         cli_2.3.0        
[19] yaml_2.2.1        xfun_0.20        
[21] fastmap_1.1.0     withr_2.4.1      
[23] dplyr_1.0.4       knitr_1.31       
[25] generics_0.1.0    vctrs_0.3.6      
[27] desc_1.2.0        fs_1.5.0         
[29] devtools_2.3.2    grid_4.0.3       
[31] tidyselect_1.1.0  rprojroot_2.0.2  
[33] glue_1.4.2        R6_2.5.0         
[35] processx_3.4.5    rmarkdown_2.6.6  
[37] bookdown_0.21.6   sessioninfo_1.1.1
[39] ggplot2_3.3.3     blob_1.2.1       
[41] callr_3.5.1       purrr_0.3.4      
[43] magrittr_2.0.1    scales_1.1.1     
[45] ps_1.5.0          ellipsis_0.3.1   
[47] htmltools_0.5.1.1 usethis_2.0.0    
[49] assertthat_0.2.1  colorspace_2.0-0 
[51] tinytex_0.29      munsell_0.5.0    
[53] cachem_1.0.3      beaverdown_0.2.1 
[55] crayon_1.4.0  

I haven't done anything besides rendering the template. Could this have anything to do with my current version of pandoc?

Any suggestion would be greatly appreciated.

@zkamvar
Copy link
Owner

zkamvar commented Feb 9, 2021

Hi @mai-nguyen,

I haven't done anything besides rendering the template. Could this have anything to do with my current version of pandoc?

Part of this is a symptom of the fact that I have not updated this since I graduated four years ago (and didn't add automated testing). Since then, pandoc has incurred a major version change (that broke a lot of things), and {bookdown} (which coordinates everything) also has gone through nearly 19 versions.

The error is also saying that you do not have ghostscript or pdfcrop installed.

I'll see what I can do to update things for pandoc version 2 this weekend.

@mai-nguyen
Copy link
Author

That would be wonderful. Thank you so much!

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