rmarkdownrstudio

How to control the font size of quoted text in Markdown


The font of quoted text on Markdown is often too large in contrast to the rest of the (unquoted) text. This is an example: enter image description here

generated with RStudio as

#####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

Solution

  • This seems to be part of RMarkdown's default CSS for html output, where blockquotes have:

    blockquote {
        padding: 10px 20px;
        margin: 0 0 20px;
        font-size: 17.5px;
        border-left: 5px solid #eee;
    }
    

    You can override this by creating a custom CSS file e.g. custom.css:

    blockquote {
        padding: 10px 20px;
        margin: 0 0 20px;
        font-size: 14px;
        border-left: 5px solid #eee;
    }
    

    And then adding it to the header of your RMarkdown doc:

    ---
    title: "Untitled"
    author: "Me"
    output: 
      html_document:
        css: custom.css
    ---