gt (version 0.8.0)

md: Interpret input text as Markdown-formatted text

Description

Markdown! It's a wonderful thing. We can use it in certain places (e.g., footnotes, source notes, the table title, etc.) and expect it to render to HTML as Markdown does. There is the html() helper that allows you to ferry in HTML but this function md()... it's almost like a two-for-one deal (you get to use Markdown plus any HTML fragments at the same time).

Usage

md(text)

Value

A character object of class from_markdown. It's tagged as being Markdown text and it will undergo conversion to HTML.

Arguments

text

The text that is understood to contain Markdown formatting.

Examples

Use exibble to create a gt table. When adding a title, use the md() helper to use Markdown formatting.

exibble %>%
  dplyr::select(currency, char) %>%
  gt() %>%
  tab_header(title = md("Using *Markdown*"))

This image of a table was generated from the first code example in the `md()` help file.

Function ID

7-1

See Also

Other helper functions: adjust_luminance(), cell_borders(), cell_fill(), cell_text(), cells_body(), cells_column_labels(), cells_column_spanners(), cells_footnotes(), cells_grand_summary(), cells_row_groups(), cells_source_notes(), cells_stub_grand_summary(), cells_stub_summary(), cells_stubhead(), cells_stub(), cells_summary(), cells_title(), currency(), default_fonts(), escape_latex(), google_font(), gt_latex_dependencies(), html(), pct(), px(), random_id(), stub()