This function can be used inside s_table_style (cell-level borders)
or s_paragraph (paragraph-level borders).
Examples
if (FALSE) { # \dontrun{
# Cell-level borders
spec <- create_text() |>
add_style("my_style",
s_table_style(
borders = s_borders(
top = s_border(width = "1pt"),
bottom = s_border(width = "2pt", line_style = "double")
)
)
)
# Paragraph-level borders (border follows the text, not the cell edge)
spec <- create_table(mtcars) |>
add_style("span_underline",
s_paragraph(
alignment = "center",
borders = s_borders(
bottom = s_border(color = "#4472C4", width = "1pt")
)
)
)
} # }