Use the metro dataset to create a gt table. With cols_merge(), we’ll merge the name and caption columns together but only if caption doesn’t have an NA value (the special pattern syntax of "{1<<({2})>>“} takes care of this). This merged content is now part of the name column. We’d like to modify this further wherever there is text in parentheses: (1) make that text italicized, and (2) introduce a line break before the text in parentheses. We can do this with text_replace(). The pattern value of "\\((.*?)\\)" will match on text between parentheses, and the inner "(.*?)" is a capture group. The replacement value of "<br>(<em>\\1</em>)" puts the capture group text "\1" within <em> tags, wraps literal parentheses around it, and prepends a line break tag.