| rtf_set_paragraph_style | R Documentation |
Add or replace a paragraph style in the document stylesheet
so that subsequent paragraphs can reference it via the style argument of
rtf_add(). The function mirrors docx_set_paragraph_style() for Word.
rtf_set_paragraph_style(
x,
style_id,
style_name = style_id,
base_on = "Normal",
fp_p = fp_par(),
fp_t = NULL,
outline_level = NULL
)
x |
an rtf object created by |
style_id |
user-facing identifier used as the key when a paragraph
references the style ( |
style_name |
display label of the style as it appears in Word's style
menu. Defaults to |
base_on |
the |
fp_p |
paragraph formatting properties, see |
fp_t |
text formatting properties, see |
outline_level |
integer between 1 and 9, or |
the rtf object with the style added or updated.
docx_set_paragraph_style(), rtf_doc(), rtf_add()
doc <- rtf_doc()
doc <- rtf_set_paragraph_style(
doc,
style_id = "Callout",
fp_p = fp_par(text.align = "center", padding = 6),
fp_t = fp_text_lite(bold = TRUE, color = "#1F4E79")
)
doc <- rtf_add(doc, "Heads up", style = "Callout")
print(doc, target = tempfile(fileext = ".rtf"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.