繁体   English   中英

错误:pandoc文档转换失败,错误43 Windows 7 R studio

[英]Error: pandoc document conversion failed with error 43 Windows 7 R studio

我在论坛中搜索了答案,但它们似乎没有用。

我正在使用knitr包在Rstudio中编写pdf文档。 我正在使用Windows 7和Rstudio。

pandoc.exe: Error producing PDF from TeX source
Error: pandoc document conversion failed with error 43
In addition: Warning message:
running command '"C:/Program Files/RStudio/bin/pandoc/pandoc" PA1_template.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output PA1_template.pdf --template "C:\R\Library\rmarkdown\rmd\latex\default.tex" --highlight-style tango --latex-engine pdflatex --variable "geometry:margin=1in"' had status 43 
Execution halted

谢谢,

路易斯

我有同样的问题,但在Linux上使用最新的rmarkdown软件包和pandoc 1.13。 本质上似乎pdflatex不能与pandoc生成的输出一起使用 - 你需要用xelatex(TeXLive的一部分)替换latex-engine pdflatex

对于rmarkdown,我的解决方案是编辑文件

rmarkdown/templates/tufte_handout/resources/tufte-common.def

并更换线

\typeoutbool{pdfatex}{@tufte@pdf}

\typeoutbool{xelatex}{@tufte@pdf}

然后将使用xelatex而不是pdflatex来生成带有rmarkdown的pdf

我遇到了同样的问题,这是我为解决问题所采取的步骤:

  • 在Rstudio中安装devtools( install.packages(devtools)
  • 安装rmarkdown( devtools::install_github("rstudio/rmarkdown")
  • ~/R/x86_64-pc-linux-gnu-library/3.2/rmarkdown/rmarkdown/templates/tufte_handout/resources/修复文件tufte-common.def和tufte-handout.tex

如果rmarkdown安装不顺利,那就这样做( devtools::install_github("git://github.com/rstudio/rmarkdown")

在tufte-common.def中执行以下操作:

  • 添加此行\\typeoutbool{xelatex}{@tufte@pdf}

  • 取消注释此行\\typeoutbool{xelatex}{@tufte@xetex}记得%用于取消注释乳胶

在tufte-handout.tex中添加以下行:

% UTF encoding \\usepackage[utf8]{inputenc}

当我尝试编译文档时,我仍然遇到以下错误(! Font \\XeTeXLink@font=pzdr at 0.00002pt not loadable: Metric (TFM) file or ins talled font not found.) ,我通过安装texlive-fonts-recommended解决了这个问题。 texlive-fonts-recommended

sudo apt-get install texlive-fonts-recommended

我遇到了类似的问题。 告诉knitr在哪里找到pdf引擎是必要的,即使我在Windows路径上有它。 这是knitr.Rmd文档的标题,它解决了我的问题:

---
title: "XXX"
author: "XXX"
date: '2016-11-28'
output:
  pdf_document:
    keep_tex: yes
    pandoc_args:
    - --latex-engine
    - C:/Program Files/MiKTeX 2.9/miktex/bin/x64/pdflatex.exe
    toc: yes
---

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM