r - 从 Bookdown TOC 中省略索引页
问题描述
我正在使用 bookdown 使用 bs4_book 格式编写带有网络版本的书。我希望我的索引页(首页)不出现在左侧的目录中,即我希望此屏幕截图中的蓝色圆圈项不出现在目录中:
我尝试了文档中的说明:
# Section name {.unlisted .unnumbered}
但这无济于事。如图所示,我的 pandoc 版本 > 2.7:
> rmarkdown::pandoc_version()
[1] ‘2.11.0.4’
这些是 _bookdown.yaml 的内容
book_filename: "shiny-book"
language:
ui:
chapter_name: "Chapter "
delete_merged_file: true
new_session: no
rmd_files:
[
"index.Rmd",
"test_chapter.md",
]
_output.yml
bookdown::bs4_book:
repo: https://github.com/smsaladi/phd
includes:
in_header: [ga_script.html, no_robots.html]
索引.Rmd
---
title: "Investigations on the computer"
author: "Name"
site: bookdown::bookdown_site
---
`r if (knitr::is_latex_output()) '<!--'`
# Preface {.unlisted .unnumbered}
`r if (knitr::is_latex_output()) '-->'`
解决方案
推荐阅读
- mysql - 选择到 outfile :标题不在顶部
- javascript - 如何获取嵌套的 DOM
- c# - Asp.net Crystal Reports 对子报表的更改未在 vs2017 调试/发布模式下显示
- python - 丢弃数据框 Raws 不包含在其他两列之间的间隔中
- json.net - 使用 C# 读取具有大 base64 值的 json 文件
- javascript - Angular 7 找不到管道
- firebase - Firebase 存储本地缓存
- javascript - angular js将字符串转换为HTML并在页面中预览
- amazon-web-services - 调用 api 网关在 CI 中返回 403 和有关 api 密钥的错误,但在 CI 之外很好(代码构建)
- azure - Azure 中的 TCP/IP 服务器