Learn R Programming

Markdown rendering for R

Overview

Markdown is a plain-text formatting syntax that can be converted to HTML or other formats. This package provides wrappers based on the commonmark package.

The main function mark() renders Markdown to various output formats supported by commonmark; mark_html() is a wrapper function to render Markdown to HTML, and mark_latex() is a wrapper function for LaTeX output.

This package supports a series of extra Markdown features that are not in commonmark, such as LaTeX math, raw HTML/LaTeX blocks, fenced Divs, heading/image attributes, and footnotes, etc. The Markdown rendering behavior can be controlled by several options, e.g., whether to enable the table of contents. It also supports custom HTML/LaTeX templates. To get a full introduction, please read the intro vignette.

You may also read the article vignette and the slides vignette to learn more about possible applications based on this package.

R Markdown

This package is referred to as the first generation (v1) of R Markdown when combined with knitr. The primary output formats are HTML and LaTeX. In 2014, we introduced the second generation (v2) of R Markdown, i.e., the rmarkdown package, which is based on Pandoc and knitr, and supports many more types of output formats.

It is a deliberate design choice to keep this markdown package lightweight, to make it easy to use and simple to maintain. We may be conservative when considering new feature requests. It is definitely not the goal to become a substitute of tools based on Pandoc, such as rmarkdown and Quarto. To some degree, this package is intended for minimalists, and does not aim at rich features.

License

The markdown package is licensed under MIT.

Copy Link

Version

Install

install.packages('markdown')

Monthly Downloads

332,694

Version

1.12

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

December 6th, 2023

Functions in markdown (1.12)

markdown-package

Markdown rendering for R
rpubsUpload

Upload an HTML file to RPubs
markdown_options

Markdown rendering options
smartypants

Convert some ASCII strings to HTML entities
mark

Render Markdown to an output format
html_format

R Markdown output formats
renderMarkdown

Functions in markdown before v1.3.