Rmarkdown2/中的PDF渲染 [英] PDF rendering in Rmarkdown2/

查看:52
本文介绍了Rmarkdown2/中的PDF渲染的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在 14.04 Ubuntu 上安装了最新的 Rstudio(0.98.939) Rmarkdown 隔夜版本,(请向 Rstudio 的人鞠躬 - 你已经改变了用户体验!).(下面的会话信息).简单的脚本(只是一个表格和汽车数据集的图)在 HTML 和 Word 中完美呈现,但在 PDF 中我得到以下神秘错误......framed.sty' not found"..

I have just installed the newest overnight build of Rstudio(0.98.939) Rmarkdown on 14.04 Ubuntu, (please take several bows Rstudio folks - you have transformed the user experience!).(SessionInfo below). The simple script (just a table and a plot of the cars dataset) renders perfectly in HTML and Word , but in PDF I get the following enigmatic error... "framed.sty' not found"..

我欢迎提出建议,或者这是需要报告的错误吗?:

I would welcome suggestions or is this a bug in need of reporting?:

这里是 rmarkdown 日志:

Here is the rmarkdown log:

processing file: Preview-25bc4ab5a01f.Rmd
  |.............                                                    |  20%
  ordinary text without R code

  |..........................                                       |  40%
label: unnamed-chunk-1
  |.......................................                          |  60%
  ordinary text without R code

  |....................................................             |  80%
label: unnamed-chunk-2 (with options) 
List of 1
 $ echo: logi FALSE

cropping ./Preview-25bc4ab5a01f_files/figure-latex/unnamed-chunk-2.pdf
PDFCROP 1.38, 2012/11/02 - Copyright (c) 2002-2012 by Heiko Oberdiek.
==> 1 page written on `./Preview-25bc4ab5a01f_files/figure-latex/unnamed-chunk-2.pdf'.
  |.................................................................| 100%
  ordinary text without R code


/usr/lib/rstudio/bin/pandoc/pandoc Preview-25bc4ab5a01f.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output Preview-25bc4ab5a01f.pdf --template /home/rob/R/x86_64-pc-linux-gnu-library/3.1/rmarkdown/rmd/latex/default.tex --highlight-style tango --latex-engine pdflatex --variable geometry:margin=1in 
output file: Preview-25bc4ab5a01f.knit.md

pandoc: Error producing PDF from TeX source.
! LaTeX Error: File `framed.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name: 
! Emergency stop.
<read *> 

l.31 \definecolor

Error: pandoc document conversion failed with error 43
Execution halted

SessionInfo():

SessionInfo():

R version 3.1.0 (2014-04-10)
Platform: x86_64-pc-linux-gnu (64-bit)

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

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

loaded via a namespace (and not attached):
 [1] colorspace_1.2-4 digest_0.6.4     ggplot2_1.0.0    grid_3.1.0      
 [5] gtable_0.1.2     htmltools_0.2.4  MASS_7.3-33      munsell_0.4.2   
 [9] plyr_1.8.1       proto_0.3-10     Rcpp_0.11.2      reshape2_1.4    
[13] rmarkdown_0.2.46 scales_0.2.4     stringr_0.6.2    tools_3.1.0     
[17] yaml_2.1.13     

推荐答案

我在 Debian Jessie 上也有同样的症状,

I had this same symptom on Debian Jessie,

sudo apt-get install texlive-latex-extra

对我来说已经足够了.

这篇关于Rmarkdown2/中的PDF渲染的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆