-
Notifications
You must be signed in to change notification settings - Fork 78
Closed
Description
flextable is a library for creating docx tables which adds word xml directly to the knitted document. I have been using pandoc-crossref in a Rstudio/rmarkdown/knitr/docx workflow with pandoc.table with great success. With flextable, there isn't the option to add a tag to the caption in a way similar to pandoc.table.
Questions:
- Has anyone developed a solution for use with pandoc-crossref?
- If not, might one be able to place the table in a tag similar to multi-figures or code blocks?
Below is a reproducible .Rmd snippet.
---
title: "flextableSnippet"
output: word_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
library(flextable)
```
## flextable table
```{r}
iris.t <-
iris[1:5,] %>%
regulartable() %>%
style(pr_c = officer::fp_cell(vertical.align = "bottom",
border.bottom = officer::fp_border(width = 2)), part = "header") %>%
rotate(j = names(iris)[-c(1:2)],
rotation = "tbrl", part = "header", align = "bottom") %>%
height(height = max(dim_pretty(., part = "header")$widths), part = "header") %>%
width(width = dim_pretty(.,part = "body")$widths)%>%
add_footer(top = TRUE, Sepal.Length = "Sample Dates.")
iris.t
```
Metadata
Metadata
Assignees
Labels
No labels