简体   繁体   English

我如何阻止Rstudio Bookdown尝试生成PDF

[英]How do I stop rstudio bookdown from trying to generate pdf

I am using Rstudio to generate a document with bookdown. 我正在使用Rstudio生成带有书本的文档。 Unfortunately I have to use Windows and don't have xelatex. 不幸的是,我必须使用Windows,并且没有xelatex。

How do I stop bookdown from trying to generate compile_main.tex? 如何停止尝试生成compile_main.tex的书本?

I only want HTML 我只想要HTML

I just want to know what to put in the YAML header of the index.Rmd file to select only HTML as the output format. 我只想知道在index.Rmd文件的YAML标头中放入什么以仅选择HTML作为输出格式。 It seems list this should be in the output: part, but I did not find this issue addressed in Yihui's book. 似乎清单应该在输出中:部分,但是我没有在Yihui的书中找到解决此问题的方法。

Error: Failed to compile _main.tex.
In addition: Warning message:
running command '"xelatex" -halt-on-error -interaction=batchmode "_main.tex"' had status 127 
Please delete _main.Rmd after you finish debugging the error.
Execution halted

Exited with status 1.

Although I'm not sure which Yihui's book you refer to, but one of his works does explain how to set YAML to get .html output in detail. 尽管我不确定您所指的是Yihui的那本书,但他的其中一部著作确实解释了如何设置YAML来详细获取.html输出。

I also put my exmaple, JFYI. 我还举了我的杰作,JFYI。

---
title: "Your title"
author: "Your name"
date: "The date when you wrote the document"
output: 
  bookdown::html_document2:
    toc: yes #if you want to get the table of contents
    fig_caption: true
bibliography: Your-bibliography.bib # Specify if you have any bib format, such as `.bib`, `.enl`, .etc.
always_allow_html: yes
editor_options:
  chunk_output_type: console
---

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

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