军官::slip_in_footnote 无法让光标向前移动

问题描述

我正在尝试使用我以前从未使用过的“slip_in_footnote”。我不断收到无法向前移动光标的错误。

add_par <- "Add footnote here"
abc <- "this is a new footnote"
bl <- block_list(add_par,abc)
read_docx(here::here("6. Report","test.docx")) %>%
  body_add_par(add_par,style = "Normal") %>%
  # slip_in_footnote(blocks = bl) %>%    #,pos = "after") %>%
  # slip_in_footnote(blocks = block_list(abc)) %>%
  slip_in_footnote(blocks = block_list(abc),pos = "before") %>%
  print(target = here::here("6. Report","test_out.docx"))

我得到 Error: cannot move forward the cursor as there is no more content in this area

我做的block_list错了吗?我需要设置光标吗?我尝试了很多组合,但没有一个适合我。 (如果我注释掉 body_add_par 行,slip_in_footnote 就可以正常工作。)

有趣的是 officer 中的示例适用于空的 docx(即 read_docx()),但不适用于已读入的文档,其中已包含任何内容。 非常感谢任何帮助!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...