首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Bookdown:导出到word文档(files2[[format]中的错误:尝试在get1index中选择少于一个元素)

Bookdown:导出到word文档(files2[[format]中的错误:尝试在get1index中选择少于一个元素)
EN

Stack Overflow用户
提问于 2019-05-09 13:59:06
回答 1查看 1.1K关注 0票数 4

我正在写我的论文使用预订包和回忆录乳胶课。当我导出到pdf或html时,所有东西都工作得比较好,但我无法将论文导出到word文档中.

我得到了以下神秘错误:

代码语言:javascript
复制
Error in files2[[format]] : 
  attempt to select less than one element in get1index

然而,很难提供一个可重复的例子,因为我是从我混乱的论文库中工作的。

但是这里是我的_output.yml文件的一部分:

代码语言:javascript
复制
bookdown::pdf_book:
  includes:
    in_header: latex/preamble.tex # defines style and latex options
    before_body: latex/before_body.tex # defines cover page
  latex_engine: xelatex # lualatex or xelatex
  citation_package: none # needs to be "none" in order to use the csl file
  keep_tex: true # keeps the .tex file
  dev: "cairo_pdf"
  toc: false # deactivates default table of contents
  highlight: pygments # code highlighting
  pandoc_args: [ "--csl", "./csl/apa6.csl" ] # specifies the csl file to be used

bookdown::word_document2:
  pandoc_args: [
    "--csl", "./csl/apa6.csl",
    "--bibliography", "./bib/packages.bib",
    "--bibliography", "./bib/thesis.bib",
    #"--reference-doc", "./assets/2018-05-17-aim1-draft.docx",
    "--filter", "pandoc-citeproc"
    #"--filter", "./assets/fix-apa-ampersands.py"
  ]

知道吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-05-09 18:27:32

这是bookdown包的一个bug,这个包是Github上的我刚修好了包。请在此试用开发版本:

代码语言:javascript
复制
remotes::install_github('rstudio/bookdown')
票数 5
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56061122

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档