0
我使用P中的Pandoc將降價文檔轉換爲PDF。Pandoc輸出的PDF默認邊距太大。使用Pandoc創建PDF文件中的PDF邊距寬度
在這篇文章中:Set margin size when converting from Markdown to PDF with pandoc,下面的代碼被提供給改變PDF的餘量寬度:
pandoc -V geometry:margin=1in -o output.pdf input.md
我已經使用從R內的功能的代碼,
makePDF <- function(name) {
library(knitr)
knit(paste0(name, ".Rmd"), encoding = "utf-8")
system(paste0("pandoc -o -V geometry:margin=1in ", name, ".pdf ", name, ".md"))
}
但這給出了這個錯誤:
pandoc: geometry:margin=1inmpAnnual.pdf: openFile: does not exist (No such file or directory)
如何在R中創建函數來改變邊距寬度s的PDFs?
恕我直言,你錯過了'-o'部分,但它會是一個巨大的幫助,如果你也會分享確切的錯誤信息。 – daroczig 2013-05-06 22:31:57
問題現在編輯:我發佈了錯誤,並且我也嘗試過使用-0 – luciano 2013-05-07 05:42:22
您的錯誤提到了一個'docx'文件!你從哪裏拿來的? – mnel 2013-05-07 06:11:25