This seems like it should be so simple, but I have hit a wall.
I love gt, but I cannot get it to create a double-row column label when outputting to a PDF. Worked fine for HTML.
library(tidyverse)
library(gt)
knitr::opts_chunk$set(echo = TRUE)
df <- tribble(
~col1, ~col2, ~col3,
1, 2, 3,
4, 5, 6,
7, 8, 9
)
df %>%
gt() %>%
tab_header(title="Testing how to do a line break"
) %>%
cols_label(
col1=md("Single"),
col2=md("Double
Entry"),
col3=md(html("And another<br>Double"))
)
The HTML option yields the correct answer,
The PDF option, on the other hand...
It's always the little things that drive me crazy...