rr-markdownrstudio

Make font size in YAML in R markdown in Rstudio smaller


I wonder how to make the font of "**Citation:** *Doe J. (in press). Journal.*" in YMAL smaller?

```
---
title: 'XYZ''*'
author: '© John Doe'
date: "**Citation:** *Doe J. (in press). Journal.*" # Make this font size smaller
output:
  html_document:
    code_folding: hide
    number_sections: yes
    theme: united
    toc: yes
    toc_depth: 3
    toc_float: yes
    fig_width: 5
    fig_height: 5
  word_document:
    toc: yes
    toc_depth: '3'
toc-title: Table of Contents
---
```

Solution

  • You can use inline css in the YAML header and customize the styling to your preferences:

    date: "<span style='font-size: 0.75em; color: gray; background-color: yellow;'>**Citation:** *Doe J. (in press). Journal.*</span>"