如何解决编入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
当只运行块时,输出看起来像这样(这是正确的,因为标题在底部):
将 RMD 编织成 word 后,可以看到表格标题位置发生了变化。它应该在底部。
提前致谢!
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。