text_styling: Text styling

fp_txt_italicR Documentation

Text styling

Description

This is a collection of functions to allow styling of text

Apply a column span to a text element. The text will be printed in a grid viewport whose layout.pos.col spans the specified columns. If called multiple times on the same object, the most recent call overwrites the previous span (i.e. last call wins).

Usage

fp_txt_italic(txt)

fp_txt_bold(txt)

fp_txt_plain(txt)

fp_txt_gp(txt, gp)

fp_align_left(txt)

fp_align_center(txt)

fp_span(txt, columns)

fp_align_right(txt)

Arguments

txt

The text to style

gp

A grid::gpar() style to apply

columns

Integer vector of column indices to span. The span covers the continuous range between the smallest and largest values. Values are validated when the plot is built; they must lie between 1 and the number of label columns and may not include the graph column.

Value

A list of txt with style attributes

Examples

fp_txt_italic("Italic text")
# centre "Events / N" under columns 2 and 3
fp_span("Events / N", columns = c(2, 3))


forestplot documentation built on March 4, 2026, 9:06 a.m.