Prettydoc

screenshot of Prettydoc

Creating Pretty HTML From R Markdown

Overview

R Markdown offers a convenient way to create HTML documents with various themes. While the default options like html_document and html_vignette provide decent styling, they often come with a trade-off in terms of file size and style. The prettydoc package introduces an alternative engine, html_pretty, which allows users to generate attractive and lightweight HTML pages for their R Markdown documents.

Features

  • Alternative Engine: Utilize the html_pretty engine from the prettydoc package to create visually appealing HTML pages.
  • Built-in Themes: Choose from a selection of themes like Cayman, Tactile, Architect, Leonids, and HPSTR to style your documents.
  • Syntax Highlighting: Achieve syntax highlighting customization with options like github and vignette.
  • Offline Math Rendering: Enable offline rendering of math expressions using KaTeX for documents that need to be viewed without an internet connection.

Summary

The prettydoc package provides R Markdown users with an easy way to create visually appealing HTML documents while keeping the file size lightweight. By offering a variety of themes and syntax highlighting options, it caters to users looking for a balance between aesthetics and efficiency in their document styling. With the ability to render math expressions offline using KaTeX, prettydoc enhances the accessibility of R Markdown documents.