I am not sure if this is a flextable issue or not but I figured I'd start here. See the example below. Is "\n" not supported for pdf output? I checked ?set_caption and I see mostly notes in there about HTML and Word output. Should I be setting pdf captions a different way?
My .Rmd file....
---
title: "Flextable test"
date: "2024-10-03"
output:
pdf_document:
latex_engine: xelatex
---
'''{r}
library(flextable)
library(tibble)
tibble(
x = seq(0, 10, 1),
y = seq(100, 200, 10),
z = seq(1000, 2000, 100)
) %>% flextable() %>%
set_caption(as_paragraph(as_chunk("Hey Hey This is the Caption \n Wow Another Line \n And Another Line")))
'''
....produces excellent HTML output....
....but has a funky pdf caption when knitted using knitr....
(Using bookdown::pdf_document2 produces this same issue).
Any thoughts? Maybe a piece of the manual or a closed issue I missed?
[x] Provide the results of R command sessionInfo(). It had to be executed after you loaded the packages used by your example. This will let me know what is your version of R and what are the versions of the packages you used in your example.
[x] Make sure you did checked you had the latest version of the package on CRAN (and on github if issue exists with CRAN version).
[x] Make sure you searched in the open and closed issues on the github repository.
I am not sure if this is a
flextable
issue or not but I figured I'd start here. See the example below. Is "\n" not supported for pdf output? I checked?set_caption
and I see mostly notes in there about HTML and Word output. Should I be setting pdf captions a different way?My .Rmd file....
....produces excellent HTML output....
....but has a funky pdf caption when knitted using
knitr
....(Using
bookdown::pdf_document2
produces this same issue).Any thoughts? Maybe a piece of the manual or a closed issue I missed?
When submitting a new issue:
[x] Provide the code that is producing the error, it has to be a minimal reproducible example. Stackoverflow is providing good explanations about it: https://stackoverflow.com/help/mcve. You can use package
reprex
to help you: http://reprex.tidyverse.org/. The most popular R stackoverflow question is about the subject: https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example.[x] Provide the results of R command
sessionInfo()
. It had to be executed after you loaded the packages used by your example. This will let me know what is your version of R and what are the versions of the packages you used in your example.[x] Make sure you did checked you had the latest version of the package on CRAN (and on github if issue exists with CRAN version).
[x] Make sure you searched in the open and closed issues on the github repository.