由于以下代码,我能够为文本添加下划线
```
{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(officedown)
library(officer)
ft <- fp_text(underlined = TRUE)
```
`r ftext("header", ft)`
它按预期输出“标题”下划线。
但是在下面的示例中,我计划将月份和年份设为动态,以尝试在文本“日期 - 2022 年 2 月”下划线
```
{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
month <- "February"
year <- "2022"
library(officedown)
library(officer)
ft <- fp_text(underlined = TRUE)
header_text <- cat("date - ",month,year,"")
```
`r ftext(header_text , ft)`
`r ftext(print(header_text) , ft)`
`r ftext(cat("date - ",month,year,""), ft)`
但是这三个没有回报。
任何帮助表示赞赏。