在 markdown_document2
中,yaml 的 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`