从Rmarkdown产生PDF
我在Rstudio中使用rmarkdown尝试使用Rstudio提供的示例代码编写PDF(代码如下):
---
title: "Untitled"
output: 
  pdf_document: 
    keep_tex: yes
---
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}
summary(cars)
```
You can also embed plots, for example:
```{r, echo=FALSE}
plot(cars)
```
Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot.
但是,我收到以下错误:
! pdfTeX错误(字体扩展):自动扩展仅适用于可缩放字体。 AtBegShi @ Output ... ipout box AtBeginShipoutBox fi fi l.144 end {document}
pandoc.exe:从TeX源文件生成PDF错误错误:pandoc文件转换失败,错误43此外:警告消息:运行命令'“C:/ Program Files / RStudio / bin / pandoc / pandoc”+ RTS -K512m -RTS test_rmarkdown .utf8.md --to latex --from markdown + autolink_bare_uris + ascii_identifiers + tex_math_single_backslash-implicit_figures --output test_rmarkdown.pdf --template“C: Users XXXX Documents R win-library 3.2 rmarkdown rmd latex default.tex“ - 高亮样式探戈--latex-engine pdflatex - 变量”geometry:margin = 1in“'有状态43执行停止
我的会话信息如下所示:
> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    
attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     
loaded via a namespace (and not attached):
 [1] Rcpp_0.11.6      digest_0.6.8     MASS_7.3-43      grid_3.2.2       plyr_1.8.2       gtable_0.1.2     magrittr_1.5     scales_0.2.4    
 [9] ggplot2_1.0.1    stringi_0.4-1    reshape2_1.4.1   rmarkdown_0.8    proto_0.3-10     tools_3.2.2      stringr_1.0.0    munsell_0.4.2   
[17] yaml_2.1.13      colorspace_1.2-6 htmltools_0.2.6 
我正在运行完整的TeXworks 0.4.6 64位版本。
  我以前有类似的问题。  尝试运行devtools::install_github("rstudio/rmarkdown")这对我devtools::install_github("rstudio/rmarkdown") 。  如果你没有devtools,你需要运行它来: 
install.packages("devtools")
library(devtools).
                        链接地址: http://www.djcxy.com/p/33467.html
                        
                        
                    