将 Rstudio 中 R markdown 中 YAML 中的字体大小变小

问题描述 投票:0回答:1

我想知道如何将YMAL中

"**Citation:** *Doe J. (in press). Journal.*"
的字体变小?

```
---
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
---
```
r r-markdown rstudio
1个回答
0
投票

您可以在 YAML 标头中使用内联 css,并根据您的喜好自定义样式:

date: "<span style='font-size: 0.75em; color: gray; background-color: yellow;'>**Citation:** *Doe J. (in press). Journal.*</span>"
© www.soinside.com 2019 - 2024. All rights reserved.