我最近問更改數字字幕的字體大小RMarkdown WORD輸出
Changing the font size of figure captions in RMarkdown HTML output
,我得到了a very nice answer使用這種方法CSS。我想嘗試一樣的,但這次與Word輸出。如果你不想閱讀我以前的問題,我在這裏總結這個問題:我想讓我的R Markdown文檔中的所有圖形標題的字體大小更小。最後的輸出是Word,這次我正在R Studio工作。爲了加載圖片,我使用中的include_graphics
函數,因爲我被告知這是最好的方法(請參閱here)。我.Rmd文件是:
---
title: "ppp"
author: "ppp"
date: "`r Sys.Date()`"
output:
word_document:
fig_caption: yes
html_document:
fig_caption: yes
---
<style>
p.caption {
font-size: 0.8em;
}
</style>
```{r setup, include=FALSE}
library(knitr)
opts_chunk$set(echo = FALSE)
```
```{r foo, fig.cap="$f_{p}$ as a function of $g$ for various values of $r=\\frac{\\rho_{w}}{\\rho_{a}}$"}
# All defaults
include_graphics("download.jpg")
```
This is regular text.
相應的輸出是:
顯然,這個CSS方法不起作用(我想這件事情涉及到HTML,所以也沒有在Word中呈現)。在Word中,我可以手動更改每個標題的字體大小,但我寧願設置一些全局R Markdown參數。那可能嗎?
你知道*一切*!你能指點我一個資源來學習所有這些R降價技巧嗎? – DeltaIV
谷歌和Stackoverflow;) –
Ouch;)希望有一個很好的,詳細的幻燈片或視頻教程...謝謝:) – DeltaIV