Created
April 22, 2017 17:15
-
-
Save kazutan/8a077678d2557813bdc6cae2e0592605 to your computer and use it in GitHub Desktop.
xaringanでの出力エリアを指定するセレクタ。詳しくはcssチャンクを。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "test" | |
output: | |
xaringan::moon_reader: default | |
--- | |
```{css} | |
/* echo=true時のr出力ブロック */ | |
.remark-slide-content > pre:first-of-type { | |
overflow: auto; | |
max-height: 1em; | |
} | |
/* echo=false時の出力ブロック */ | |
.remark-slide-content > pre:only-of-type { | |
overflow-y: auto; | |
max-height: 4em; | |
} | |
/* echo=true時の出力ブロック */ | |
.remark-slide-content > pre ~ pre { | |
overflow-y: auto; | |
max-height: 2em; | |
} | |
``` | |
# output | |
```{r} | |
x <- 1 | |
x <- 2 | |
x <- 3 | |
x <- 4 | |
x <- 5 | |
x <- 6 | |
head(iris, 25) | |
``` | |
--- | |
# aaa | |
```{r, echo=FALSE} | |
head(iris, 22) | |
``` | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment