【发布时间】:2020-02-08 23:05:20
【问题描述】:
我正在使用 Bookdown 将一份长报告编译成一个 html 文档,并且直到最近使用 bookdown::gitbook 编织它并没有任何问题。不知道发生了什么。
代码运行没有错误,所有的绘图和文件都是根据需要生成的,但是 index.rmd 被生成为以第一个标题的 id(“chapter00.html”)命名的 .html 文件,而不是“index.html”。 html”。这意味着网站在上传到 github 时无法运行。
如果手动将文件名更改为“index.html”,一切都会很好。
我的 index.rmd 文件如下所示:
---
title: "Eesti inimarengu aruanne 2019"
author: "Eesti Koostöö Kogu"
date: "`r Sys.Date()`"
site: bookdown::bookdown_site
documentclass: book
bibliography: [bibliography/bib_chapter23.bib, bibliography/bib_chapterXY.bib]
biblio-style: authoryear
biblatexoptions: [refsegment=chapter]
csl: keel-ja-kirjandus.csl
link-citations: yes
description: "Eesti inimarengu aruanne 2019"
css: eia.css
lang: et
---
# Sissejuhatus {-#chapter00 .chapter_section .intro_section}
_bookdown.yml 文件如下:
book_filename: "EIA_2019_digi"
language:
label:
fig: 'Joonis '
tab: 'Tabel '
eq: 'Valem '
ui:
chapter_name: ""
delete_merged_file: true
_output.yml如下:
bookdown::gitbook:
split_by: section
split_bib: yes
config:
toc:
collapse: subsection
scroll_highlight: yes
before: null
after: null
toolbar:
position: fixed
edit : null
download: null
search: yes
sharing:
facebook: no
twitter: no
google: no
linkedin: no
weibo: no
instapaper: no
vk: no
all: ['facebook', 'google', 'twitter', 'linkedin', 'weibo', 'instapaper']
bookdown::pdf_book:
includes:
in_header: preamble.tex
latex_engine: xelatex
citation_package: natbib
keep_tex: yes
bookdown::epub_book: default
对可能导致问题的原因有任何见解吗?谢谢!
【问题讨论】:
-
嗨,
# Sissejuhatus {-#chapter00 .chapter_section .intro_section}不应该在 index.rmd 中吗? -
嗨!感谢你的回复!我认为这不是问题,因为您应该能够将内容添加到索引文件中。 Bookdown 演示文件中的内容可在此处获得:link
-
嗨,您找到解决方案了吗?
-
嘿!不,我还没有。
标签: r r-markdown knitr bookdown