library(mtb)
R Markdown has been popular in many communities for presenting and
sharing results. These formatting functions help to emphasis a sentence,
or a paragraph. add_colored_str()
adds an inline string
with customized styles, including, color, background color and size.
add_colored_box()
adds a colored area with title to
emphasis a reminder, or a warning.
This is a basic example which shows you how to format a string:
add_colored_str('Example - Warning', color=c(255,0,0), bold=TRUE, fontsize=1.5)
This is an example which shows you how to add a default box:
add_colored_box(info='additional information')
This is an example which shows you how to add a reminder box:
add_colored_box(type='green-reminder', info='Here is the reminding message.', width=0.7)
This is an example which shows you how to add a warning box:
add_colored_box(type='yellow-warning', info='Here is the warning message.', width=0.9)
This is an example which shows you how to add a warning box with stop sign and align to the right:
add_colored_box(type='red-stop', info='Here is the warning message.', halign='r', width=0.2)