如何阻止 rstudio bookdown 尝试生成 pdf

How do I stop rstudio bookdown from trying to generate pdf

我正在使用 Rstudio 生成带有 bookdown 的文档。不幸的是我必须使用 Windows 并且没有 xelatex。

如何阻止 bookdown 尝试生成 compile_main.tex?

我只要HTML

我只是想知道在index.Rmd文件的YAML头中放什么到select只有HTML作为输出格式。好像list this应该在output:部分,但是我在一辉的书中没有找到这个问题。

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.

虽然我不确定你指的是易辉的哪本书,但是one of his works确实详细解释了如何设置YAML以获得.html输出。

我也放了我的例子,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
---