Markdown text can be used in certain places in a gt table, and this is
wherever new text is defined (e.g., footnotes, source notes, the table title,
etc.). Using Markdown is advantageous for styling text since it will be
rendered correctly to the output format of the gt table. There is
also the html()
helper that allows you use HTML exclusively (for tables
expressly meant for HTML output) but md()
allows for both; you get to use
Markdown plus any HTML fragments at the same time.
Value
A character object of class from_markdown
. It's tagged as being
Markdown text and it will undergo conversion to the desired output context.
Examples
Use the exibble
dataset to create a gt table. When adding a title
through tab_header()
, we'll use the md()
helper to signify to gt that
we're using Markdown formatting.
exibble |>
dplyr::select(currency, char) |>
gt() |>
tab_header(title = md("Using *Markdown*"))
See also
Other helper functions:
adjust_luminance()
,
cell_borders()
,
cell_fill()
,
cell_text()
,
currency()
,
default_fonts()
,
escape_latex()
,
from_column()
,
google_font()
,
gt_latex_dependencies()
,
html()
,
nanoplot_options()
,
pct()
,
px()
,
random_id()
,
row_group()
,
stub()
,
system_fonts()
,
unit_conversion()