The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

mtb: Edit Markdown

Y. Hsu

2022-10-20

library(mtb)

Background

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.

How to use

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)
Example - Warning

This is an example which shows you how to add a default box:

add_colored_box(info='additional information')
  Note
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)
  Reminder
Here is the reminding message.

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)
  Warning
Here is the warning message.

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)
  Stop
Here is the warning message.

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.