如何控制Markdown中引用文本的字体大小

Ton*_*oni 11 markdown r rstudio

与其他(未引用的)文本相比,Markdown上的引用文本字体通常太大.这是一个例子: 在此输入图像描述

用RStudio生成的

#####Intution:

> **[Identification of an MA model is often best done with the ACF rather
> than the PACF]((https://onlinecourses.science.psu.edu/stat510/node/62))**.
> 
> For an MA model, the theoretical PACF does not shut off, but instead
> tapers toward 0 in some manner.  A clearer pattern for an MA model is
> in the ACF.  The ACF will have non-zero autocorrelations only at lags
> involved in the model.
> 
> A moving average term in a time series model is a past error (multiplied by a coefficient).

The $q^{\text{th}}$-order moving average model, denoted by MA(q) is
Run Code Online (Sandbox Code Playgroud)

Mar*_*ius 13

这似乎是RMarkdown的html输出的默认CSS的一部分,其中blockquotes具有:

blockquote {
    padding: 10px 20px;
    margin: 0 0 20px;
    font-size: 17.5px;
    border-left: 5px solid #eee;
}
Run Code Online (Sandbox Code Playgroud)

您可以通过创建自定义CSS文件来覆盖它,例如custom.css:

blockquote {
    padding: 10px 20px;
    margin: 0 0 20px;
    font-size: 14px;
    border-left: 5px solid #eee;
}
Run Code Online (Sandbox Code Playgroud)

然后将其添加到RMarkdown doc的标题中:

---
title: "Untitled"
author: "Me"
output: 
  html_document:
    css: custom.css
---
Run Code Online (Sandbox Code Playgroud)

  • 与RMarkdown文件位于同一文件夹中.当你在标题中给出一个像`custom.css`这样的相对路径时,R会看到那里. (2认同)

Mar*_*rek 8

作为外部 css 文件的替代方案,您可以使用 css 代码块:

---
title: "Example"
date: "`r Sys.time()`"
output: html_document
---

```{css style settings, echo = FALSE}
blockquote {
    padding: 10px 20px;
    margin: 0 0 20px;
    font-size: 14px;
    border-left: 5px solid #eee;
}
```

Now quotes will be as you wish

> example quote (blah blah blah)
Run Code Online (Sandbox Code Playgroud)