markdown_rtl {RTLknitr}R Documentation

Enable Right-to-Left (RTL) Formatting for Markdown Documents

Description

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.

Usage

markdown_rtl(...)

Arguments

...

Additional arguments to be passed to the underlying knit_hooks$set function.

Details

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.

Value

The function has no explicit return value. It modifies the behavior of knit_hooks for RTL formatting.

References

Xie, Y. (2014). Dynamic Documents with R and knitr. Chapman & Hall/CRC. ISBN: 978-1482203530.

See Also

Use hooks_rtl for handling RTL formatting within code chunks.

Examples

# 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.


[Package RTLknitr version 1.0.0 Index]