在yamlmarkdown_document2
的number_section
参数中,默认设置为true
. 因为officedown
我正在寻找一种方法来检查这一事实,即用户确实手动设置了值并且真的希望获得自动编号的标题。!is.null()
不是选项,isTrue()
在任何一种情况下都确实如此 - 默认值或手动设置。
---
title: number_section with rdocx_document
subtitle: how to check, if number_section was set manually
output:
bookdown::markdown_document2:
base_format: officedown::rdocx_document
number_section: FALSE
fig_caption: TRUE
---
# This is the first Headline − should be auto-numbered
... but only, if the user sets `number_section: TRUE`