Font size and line spacing R Slidify

I am trying to create my first Slidify presentation. I am relatively new to JS, CSS, and HTML5. I use the following YAML material and R Markdown code. I want to create a simple slide showing that R can be used as a large calculator. My problem is that I can only place three simple expressions and their returned output on one slide. Thus, I would really appreciate any possible suggestions on how to better control the output of Slidify (smaller font size or smaller borders around the selected syntax and the output / return output of R).

Below is my .Rmd file:

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

, / , R-, knitr slidify, / ?

+4
1

, . , , . , - .

R, ( ), , <pre> </pre>.

R, ( ), , <p> </p>.

. CSS. : .../mydeck/assets/css/

( ).

1 (.../mydeck/assets/css/codefont.css)

slide.codefont pre {
font-size: 9px ;
}

2 (.../mydeck/assets/css/outfont.css)

slide.outfont p {
font-size: 9px ;
}

3 (.../mydeck/assets/css/codemargin.css)

slide.codemargin pre {
margin-top: -10px ;
margin-bottom: -10px ;
padding-top: -10px ;
padding-bottom: -10px ;
}

4 (.../mydeck/assets/css/outmargin.css)

slide.outmargin p {
margin-top: -10px ;
margin-bottom: -10px ;
padding-top: -10px ;
padding-bottom: -10px ;
}

, R .Rmd, :

--- .codefont .outfont .codemargin .outmargin .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)
```

R R- , . R R.

  • R, ( R-), - .
  • CSS (1 2 CSS 4).
  • , , R- ( --- .codefont .outfont .codemargin .outmargin , R-. font=, margin=, padding= .

... .

+2

Source: https://habr.com/ru/post/1541184/


All Articles