markdown_rtl | R Documentation |
This function modifies the behavior of knitr
output hooks to handle RTL (right-to-left)
text formatting for Markdown documents, particularly for languages like Persian and Arabic.
markdown_rtl(...)
... |
Additional arguments to be passed to the underlying |
The markdown_rtl
function wraps the existing knit_hooks
with custom commands that switch
the text direction between Latin and Persian. It enhances the appearance of the output,
messages, warnings, and errors in RTL languages.
The function has no explicit return value. It modifies the behavior of knit_hooks
for RTL formatting.
Xie, Y. (2014). Dynamic Documents with R and knitr. Chapman & Hall/CRC. ISBN: 978-1482203530.
Use hooks_rtl
for handling RTL formatting within code chunks.
# Enable RTL formatting for the current R Markdown document
markdown_rtl()
# After enabling RTL formatting, proceed to knit the R Markdown document as usual.
# The output and messages will be formatted for RTL languages.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.