davidgohel / flextable

table farming
https://ardata-fr.github.io/flextable-book/
562 stars 81 forks source link

Rmarkdown to Word ft.keepnext = F pushes long table to next page #482

Closed renethestudent closed 2 years ago

renethestudent commented 2 years ago

Markdown file:

title: "test" output: word_document date: "r Sys.Date()"

knitr::opts_chunk$set(echo = F, ft.keepnext = F)
library(tidyverse)
library(flextable)

I would like to test that this sticks to a page

data(USArrests)
USArrests %>% flextable()
Screen Shot 2022-10-31 at 2 19 05 PM

sessionInfo() R version 4.2.1 (2022-06-23 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale: [1] LC_COLLATE=English_United States.utf8 [2] LC_CTYPE=English_United States.utf8
[3] LC_MONETARY=English_United States.utf8 [4] LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8

attached base packages: [1] stats graphics grDevices [4] utils datasets methods
[7] base

other attached packages: [1] data.table_1.14.4 openxlsx_4.2.5.1 [3] tidyr_1.2.1 flextable_0.8.2
[5] installr_0.23.2

loaded via a namespace (and not attached): [1] tidyselect_1.2.0
[2] xfun_0.34
[3] slam_0.1-50
[4] purrr_0.3.5
[5] sbw_1.1.5
[6] haven_2.5.1
[7] lattice_0.20-45
[8] generics_0.1.3
[9] spatstat.utils_3.0-1 [10] vctrs_0.5.0
[11] htmltools_0.5.3
[12] yaml_2.3.6
[13] base64enc_0.1-3
[14] utf8_1.2.2
[15] rlang_1.0.6
[16] spatstat.data_3.0-0 [17] pillar_1.8.1
[18] DBI_1.1.3
[19] foreign_0.8-83
[20] glue_1.6.2
[21] gdtools_0.2.4
[22] uuid_1.1-0
[23] readxl_1.4.1
[24] lifecycle_1.0.3
[25] stringr_1.4.1
[26] cellranger_1.1.0
[27] zip_2.2.2
[28] evaluate_0.17
[29] knitr_1.40
[30] rio_0.5.29
[31] forcats_0.5.2
[32] fastmap_1.1.0
[33] curl_4.3.3
[34] fansi_1.0.3
[35] Rcpp_1.0.9
[36] systemfonts_1.0.4
[37] deldir_1.0-6
[38] hms_1.1.2
[39] digest_0.6.30
[40] stringi_1.7.8
[41] dplyr_1.0.10
[42] bookdown_0.29
[43] polyclip_1.10-4
[44] grid_4.2.1
[45] quadprog_1.5-8
[46] cli_3.4.1
[47] tools_4.2.1
[48] magrittr_2.0.3
[49] tibble_3.1.8
[50] pkgconfig_2.0.3
[51] ellipsis_0.3.2
[52] MASS_7.3-58.1
[53] Matrix_1.5-1
[54] xml2_1.3.3
[55] assertthat_0.2.1
[56] officer_0.4.4
[57] rmarkdown_2.17
[58] rstudioapi_0.14
[59] R6_2.5.1
[60] spatstat.geom_3.0-3 [61] compiler_4.2.1

davidgohel commented 2 years ago

Thanks,

Could you test the dev version? I think it's fixed in the dev version

renethestudent commented 2 years ago

Perfect. Yes it is fixed in the dev version. Thank you.

github-actions[bot] commented 1 year ago

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.