简体   繁体   English

bookdown-demo可以构建pdf和epub,但是在创建gitbook时会出错

[英]bookdown-demo Can Build pdf and epub, but have error with gitbook creation

I am trying to create the HTML output in gitbook format for the demo Bookdown files. 我正在尝试以gitbook格式为演示Bookdown文件创建HTML输出。 When I go to build I receive the following error: 当我去构建时,我收到以下错误:

  1. I am using RStudio Version 1.1.463, r Version 3.5.3, and MiKTeX Version 2.9 我使用的是RStudio版本1.1.463,版本3.5.3和MiKTeX版本2.9
  2. I have no problems creating the pdf or epub versions of the demo book 我在创建演示书的pdf或epub版本时没有问题
  3. My Workspace is on a separate logical drive, D:\\R-Work\\bookdown-demo-master , as I don't want any of my work saved in the mapped network documents folder. 我的工作区位于一个单独的逻辑驱动器上, D:\\R-Work\\bookdown-demo-master ,因为我不希望我的任何工作保存在映射的网络文档文件夹中。
  4. My r library files are located in \\\\DRIFTWOODDC\\Student\\steven.taylor\\My Documents\\R\\win-library\\3.5 我的r库文件位于\\\\DRIFTWOODDC\\Student\\steven.taylor\\My Documents\\R\\win-library\\3.5

My _output.yml file has not been changed from the originally downloaded version: 我的_output.yml文件尚未从最初下载的版本更改:

bookdown::gitbook:
  css: style.css
  config:
    toc:
      before: |
        <li><a href="./">A Minimal Book Example</a></li>
      after: |
        <li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li>
    edit: https://github.com/rstudio/bookdown-demo/edit/master/%s
    download: ["pdf", "epub"]
bookdown::pdf_book:
  includes:
    in_header: preamble.tex
  latex_engine: xelatex
  citation_package: natbib
  keep_tex: yes
bookdown::epub_book: default

I am expecting RStudio to create the html files for the gitbook output, but none are created and I receive the following error: 我期待RStudio为gitbook输出创建html文件,但没有创建,我收到以下错误:

==> rmarkdown::render_site(output_format = 'bookdown::gitbook', encoding = 'UTF-8')

Error in system.file(..., package = "bookdown", mustWork = TRUE) : 
  no file found
Calls: <Anonymous> ... do.call -> <Anonymous> -> bookdown_file -> system.file
Execution halted

Exited with status 1.

I have the same symptoms and issues if I try to create the bookdown-crc template files in gitbook format. 如果我尝试以gitbook格式创建bookdown-crc模板文件,我会遇到相同的症状和问题。 I can create the pdf and epub, but not the html output. 我可以创建pdf和epub,但不能创建html输出。

I performed the following actions to troubleshoot: 我执行了以下操作来排除故障:

  1. Uninstall and Reinstall R and R Studio both to new logical drive instead of default location. 将R和R Studio卸载并重新安装到新的逻辑驱动器而不是默认位置。
  2. Changed the R_USER_LIBS environment variable to where I wanted the library files to be installed on the new logical drive. 将R_USER_LIBS环境变量更改为我希望在新逻辑驱动器上安装库文件的位置。 I installed all extra libraries via to command line instead of letting the libraries auto-install when they were missing during the build process. 我通过命令行安装了所有额外的库,而不是让库在构建过程中丢失时自动安装。

It seems that there is an issue using networked drives for the R Libraries. 似乎使用R库的网络驱动器存在问题。 By default on my Windows work computer the R Libraries were put into the "My Documents" folder. 默认情况下,在我的Windows工作计算机上,R库被放入“我的文档”文件夹中。

Second successful method was to install RPortable and RStudioPortable on a USB Drive and use the portable version to generate the bookdown::gitbook . 第二个成功的方法是在USB驱动器上安装RPortable和RStudioPortable,并使用便携版本生成bookdown::gitbook

暂无
暂无

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

相关问题 epub 的 Bookdown 错误 seq.default 而不是 pdf - Bookdown error seq.default for epub but not for pdf 是否可以使用 bookdown 阻止创建 epub 和 pdf 版本的书籍? - Is it possible to prevent creation of epub and pdf versions of book with bookdown? 如何克服将 Bookdown 构建为 ePub 格式的错误? - How can I get past this error building Bookdown into ePub format? 如何指定初始级别以将我的目录扩展到 R bookdown 项目(gitbook 输出格式)? 使用 YAML 设置? - How can I specific the initial level to have my table of contents be expanded to in an R bookdown project (gitbook output format)? With YAML setting? KaTeX 与 bookdown + gitbook - KaTeX with bookdown + gitbook 编译 bookdown 文档时,是否可以有条件地排除某些元素(代码块)从渲染到 PDF 和 ePub 输出? - Can I conditionally exclude some elements (code blocks) from rendering to the PDF and ePub outputs when compiling a bookdown document? 如何在 gitbook 风格的 bookdown 中使用 gitbook 插件 - How to use gitbook plugin in gitbook style bookdown Bookdown (gitbook) 生成空的 HTML - Bookdown (gitbook) produces empty HTML Bookdown gitbook只生成1页(无法导航查看其他页面) - Bookdown gitbook only generating 1 page (can't navigate to view other pages) 如何使搜索引擎在 bookdown gitbook 中为多字节字符(尤其是日语)工作? - How can I make the search engine work for multibyte characters (Japanese in particular) in bookdown gitbook?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM