R- PANDOC的文档转换错误从RMD到PDF



我刚刚将pandoc 1.9.x更新为pandoc 2.1.3,也准备这样做。在更新之前,用.rmd转换为.pdf输出的一切都可以顺利进行。我确实使用Custom .Dex和样式模板以及论文Downdss套件进行编织。

编织良好并产生.md(虽然这是瞬态的,因此我无法访问(,但是pandoc的转换失败了。

output file: thesis.knit.md
"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS thesis.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output thesis.tex --table-of-contents --toc-depth 3 --template template.tex --number-sections --highlight-style pygments --pdf-engine pdflatex --chapters --variable tables=yes --standalone --filter pandoc-citeproc 
--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: There were 33 warnings (use warnings() to see them)
Please delete thesis.Rmd after you finish debugging the error.
Execution halted

可以看出,控制台错误输出非常无信息。我的问题是:如何访问Pandoc写入的日志?我感到无助,因为没有中间.md文件可以尝试。

另一个问题是,我找不到pandoc 1.9.x窗口二进制文件,尽管GitHub提供了一个源,并将其编译以使其建立准备,这对我来说不是一个选择。谁能指向我阅读pandoc的二进制版本(我认为,随着TH*的提交截止日期,这可以节省我的时间?

(? (

希望完整的标头能更明智,在这里是:

---
author: 'Dear Dog'
date: "`r Sys.Date()`"
institution: 'Uninstitutional'
division: 'Hooligan'
advisor: 'pre-professor'
department: 'Blah Blah'
degree: 'Masters of Undiagnosis'
title: "Panic attack due to pandoc error"
knit: "bookdown::render_book"
site: bookdown::bookdown_site
output: 
  thesisdowndss::thesis_pdf: default
keep_md: true
abstract: |
  `r if(knitr:::is_latex_output()) paste(readLines("00-abstract.Rmd"), collapse = 'n  ')`
acknowledgements: |
  I am in no situation to acknowledge the resolution, right now.
bibliography: ["bib/thesis.bib", "bib/exported_items.bib"]
csl: csl/apa.csl
lot: true
lof: true
space_between_paragraphs: true
header-includes:
- usepackage{tikz}
- usepackage{array}
- usepackage{multirow}
- usepackage{wrapfig}
- usepackage{colortbl}
- usepackage{pdflscape}
- usepackage{tabu}
- usepackage{threeparttable}
- usepackage[normalem]{ulem}
- newcommand{blandscape}{begin{landscape}}
- newcommand{elandscape}{end{landscape}}
- usepackage{subcaption}
- newcommand{subfloat}[2][need a sub-caption]{subcaptionbox{#1}{#2}}
---

由于这是预订,所以我在另一个答案中建议的keep_md: true参数将行不通。相反,您可以运行render("thesis.Rmd", clean = FALSE)以保持中间文件。

要保留中间.md文件,您可以将以下内容添加到YAML标题:

keep_md: true

最新更新