Menu

R Markdown Themes

DEV Community: r·Cristiano Gabrieli·6 months ago
#NQdMQmQB
#dev#f7f7f7#eee#f8f8f2#ddd
Reading 0:00
15s threshold

R Markdown is one of the best tools for creating technical reports — but the default theme often looks outdated.

A clean, modern theme makes your reports easier to read and more professional.

In this guide, I’ll show you how to build a simple, reusable R Markdown theme you can apply to any project.

--- title : " Clean R Markdown Theme" author : " Your Name" output : html_document : theme : null css : " style.css" --- We disable the default theme (theme : null ) so we can fully control the styling. Create a Custom CSS File

body {

font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

background: #f7f7f7;

line-height: 1.6;

color: #333;

}

h1, h2, h3 {

font-weight: 600;

color: #222;

}

code {

background: #eee;

padding: 2px 4px;

border-radius: 4px;

}

pre {

background: #272822;

color: #f8f8f2;

padding: 12px;

border-radius: 6px;

}

This gives your report a clean, modern look.

Style the Title Block

h1 .title { margin-top : 40px ; font-size : 2.2rem ; text-align :…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.