编入RMD Word Docx时设置huxtable的标题位置

问题描述

尝试将包含 Huxtable 的 RMD 文件编织到 Word Docx 中时,Huxtable 标题未在 Word 文档中定位。而在运行块时,位置是根据标题位置对齐的。因此,有没有办法在编入word doc时根据要求设置Huxtable的标题?如果要在 Word 样式中进行更改,请告诉我可以在哪里进行更改,

PS:只需要遵循 Huxtable,没有其他表格。对不起。 :P

title: "huxtable_cap_reprex"
output:
  word_document: default
knitr::opts_chunk$set(echo = TRUE)
library(tidyverse)
library(huxtable)

jams <- hux(
  Type  = c("StrawBerry","RaspBerry","Plum"),Price = c(1.90,2.10,1.80)
)

jams %>% 
  set_all_padding(4) %>% 
  set_outer_padding(0) %>% 
  set_number_format(2) %>% 
  set_bold(1,everywhere) %>% 
  set_bottom_border(1,everywhere) %>% 
  set_width(0.4) %>% 
  set_caption("Pots of jam for sale") -> j

caption_pos(j) <-"bottom" 
j


当只运行块时,输出看起来像这样(这是正确的,因为标题底部):

enter image description here

将 RMD 编织成 word 后,可以看到表格标题位置发生了变化。它应该在底部

enter image description here

提前致谢!

解决方法

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

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

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