r - bookdown:是否可以选择更改报告的章节名称?
问题描述
在报告输出中是否可以选择将章节标签从章节更改为主题documentclass: report
?上述更改并未产生预期的输出。
这是索引文件和 yml。
index.Rmd
:
---
title: "Report"
author: "P"
date: "`r Sys.Date()`"
site: bookdown::bookdown_site
documentclass: report
bibliography: [book.bib, packages.bib]
biblio-style: apalike
link-citations: yes
description: "This is a minimal example of using the bookdown package to write a book. The output format for this example is bookdown::gitbook."
header-includes:
- \AtBeginDocument{\renewcommand{\chaptername}{Topic}}
---
_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>
download: ["pdf", "epub"]
bookdown::pdf_book:
includes:
in_header: preamble.tex
latex_engine: xelatex
citation_package: natbib
keep_tex: yes
bookdown::epub_book: default
_bookdown.yml
:
book_filename: "Report"
delete_merged_file: true
language:
ui:
chapter_name: 'Topic'
解决方案
在. _ _ _ preamble.tex
_
旧文件:
\usepackage{booktabs}
新文件:
\usepackage{booktabs}
\AtBeginDocument{\renewcommand{\chaptername}{Topic}}
解决方案由Ralf Stubner 给出。谢谢拉尔夫!
推荐阅读
- javascript - 调用异步函数时如何正确传递 useState ?错误:未处理的拒绝(TypeError):setfunctions 不是函数
- java - BaseAdapter 的 RelativeLayout addRule 不能很好地工作
- python - 带有 cookie 重定向问题的 FastApi BasicAuth
- c# - ListView Item WPF MVVM内的绑定按钮命令
- ios - 关于在 TableView 中显示 CoreData 中的 imageView 的一些问题
- c++ - C++ 入门 5 版。: 在指针向量上使用排序是未定义的吗?
- reactjs - 在 AWS 上使用 NextJS SSR 部署 React 应用程序的最便宜方法?
- node.js - 如果找不到用户,mongoDB 查询会返回什么?
- python - 网页抓取时如何抓取 html 元素?
- ruby-on-rails - Rails 5.2.3 到 6.0.0 升级依赖地狱