我想創建我的第一個Slidify演示文稿。我對JS,CSS和HTML5比較陌生。我正在使用以下YAML素材和R Markdown代碼。我想創建一個簡單的幻燈片,顯示R可以用作大型計算器。我的問題是,我只能將大約3個簡單表達式及其返回的輸出放到一張幻燈片中。因此,我非常感謝有關如何更好地控制Slidify輸出(較小的字體大小,或圍繞突出顯示的語法和評估/返回的R輸出的較小邊框)的任何可能建議。字體大小和行間距R Slidify
下面是我的.Rmd文件:
---
title : An Introduction to R
subtitle : Getting You "R Aware" And Beyond
author : Christopher Meaney
job : Biostatistician, University of Toronto
framework : io2012 # {io2012, html5slides, shower, dzslides, ...}
highlighter : highlight.js # {highlight.js, prettify, highlight}
hitheme : tomorrow #
widgets : [] # {mathjax, quiz, bootstrap}
mode : selfcontained # {standalone, draft}
--- .nobackground
## R Can be Used as A Big Calculator
```{r, results='asis', echo=TRUE}
## Addition
1 + 1
## Exponentiation followed by multiplication (BEDMAS)
4*5^2
## Area of a circle of radius r=2
pi*2^2
## Natural logarithm of 1 multiplied by exponential (function) evaluated at 0
log(1)*exp(0)
```
有Github上的問題的一個很好的討論。 https://github.com/ramnathv/slidify/issues/189 但是,我似乎無法分辨@ Robert的答案的哪部分涉及語法突出顯示與字體大小和邊界調整的關係。而且,在討論中會提出很多建議的解決方案,這對於noob來說是最容易實現的?
作爲一項後續行動,我將如何在全球設置/應用此選項,以便knitr
評估的所有R塊和slidify
提供的R塊具有相同的小/精簡屬性?
嘗試'{R,結果= 'ASIS',呼應= TRUE,大小= 「scriptsize」} ' – Andrie
Thx對於建議@Andire。不幸的是,'size = scriptsize'參數對'slidingify'顯示的R輸出的大小沒有任何影響。 – Chris
@A ndrie'size'僅適用於LaTeX輸出(至少在此刻) –