Last active
July 25, 2016 13:50
-
-
Save kazutan/d27b2330860ce2e71ee8e03bf2f7af9d to your computer and use it in GitHub Desktop.
{rmdshower}パッケージを試してみた
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: "rmdshower test" | |
author: kazutan | |
output: | |
rmdshower::shower_presentation: | |
theme: material | |
self_contained: true | |
katex: true | |
ratio: 16x10 | |
--- | |
# 試してみた | |
## {rmdshower}について | |
- Rmdでスライドを作成するパッケージ | |
- ベースはShowerというものです(次スライド) | |
- Escで一覧表示に戻ります | |
- コードは以下のgistにおいてます | |
- https://gist.github.com/kazutan/d27b2330860ce2e71ee8e03bf2f7af9d | |
- なおこのコードをそのままknitしても画像ファイルがないはずなのでうまく表示できません | |
## Showerについて | |
These slides use a template from the [shower](https://github.com/shower/shower) | |
presentation system. Notable features: | |
1. Works in all modern browsers | |
1. Presentation fully keyboard accessible | |
1. Multiple themes available | |
1. Printable to PDF | |
<p class="note"> Shower ['ʃəuə] noun. A person or thing that shows.</p> | |
## 個人的感想 | |
- 2カラム設定あたりが微妙 | |
- ChromeとFirefoxで挙動が違う(Firefoxで綺麗にでる) | |
- どうしてもhtmlタグ直打ちになるし、量が多い | |
- あとケースによって付与するクラスが変わるのがちょっと… | |
- デザインがシンプル | |
- でもhtmlタグ直打ちが多い | |
- Rmd形式だと、RStudioではhtmlコード補完なく面倒 | |
結論: 気分転換ならアリ。でも{revealjs}のが楽。 | |
## プレーンテキストのスライドについて | |
基本的にはR Markdownによるスライド生成と同一。Pandocにも通します。今回のスライドは第二レベル(`##`)で見出しを生成してます。 | |
最初にスライド一覧が表示されるのは、このテンプレの仕様です。あとテーマは2種類("ribbon", "material")で、前者がデフォルトです。今回は後者をあててます。 | |
## Two column layout | |
<p class="double"> | |
メロスは激怒した。必ず、かの邪智暴虐の王を除かなければならぬと決意した。メロスには政治がわからぬ。メロスは、村の牧人である。笛を吹き、羊と遊んで暮して来た。けれども邪悪に対しては、人一倍に敏感であった。きょう未明メロスは村を出発し、野を越え山越え、十里はなれた此のシラクスの市にやって来た。メロスには父も、母も無い。女房も無い。十六の、内気な妹と二人暮しだ。この妹は、村の或る律気な一牧人を、近々、花婿として迎える事になっていた。 | |
</p> | |
## Two column layout, text and image | |
<p class="double"> | |
メロスは激怒した。必ず、かの邪智暴虐の王を除かなければならぬと決意した。メロスには政治がわからぬ。メロスは、村の牧人である。笛を吹き、羊と遊んで暮して来た。 | |
<img src="pics/icon_tw3.png" class="one-col-image"> | |
</p> | |
## Two column layout, image and text | |
<p class="double"> | |
<img src="pics/icon_tw3.png" class="one-col-image"> | |
メロスは激怒した。必ず、かの邪智暴虐の王を除かなければならぬと決意した。メロスには政治がわからぬ。メロスは、村の牧人である。笛を吹き、羊と遊んで暮して来た。 | |
</p> | |
## Two column layout, independent columns | |
<div class="double"> | |
<p class="double-flow"> | |
メロスは激怒した。必ず、かの邪智暴虐の王を除かなければならぬと決意した。メロスには政治がわからぬ。メロスは、村の牧人である。笛を吹き、羊と遊んで暮して来た。 | |
</p><p class="double-flow"> | |
メロスは激怒した。必ず、かの邪智暴虐の王を除かなければならぬと決意した。メロスには政治がわからぬ。メロスは、村の牧人である。笛を吹き、羊と遊んで暮して来た。 | |
</p> | |
</div> | |
## Lists | |
これは通常のRmd通りです。 | |
1. Simple lists are marked with bullets | |
1. Ordered lists begin with a number | |
1. You can even nest lists one inside another | |
* Or mix their types | |
* But do not go too far | |
* Otherwise audience will be bored | |
1. Look, seven rows exactly! | |
## 数式 | |
`katex: true`とすると、`$`の記法でも`\(y=x/2\)`の記法でもいけるっぽい。 | |
Formulas are rendered by KaTeX, https://github.com/Khan/KaTeX | |
It supports both inline: $(y = x / 2)$ and displayed formulas: | |
\[ x_{1,2} = \frac{- b \pm \sqrt{b^2 - 4ac}}{2a} \] | |
## quote(引用) | |
これもRmdそのままでOKみたい。 | |
> The bad news is that when ever you learn a new skill your going to | |
> suck. It's going to be frustrating. The good news is that is typical and | |
> happens to everyone and it is only temporary. You can't go from knowing | |
> nothing to becoming an expert without going through a period of great | |
> frustration and great suckiness. | |
**Hadley Wickham ** | |
## Slide with R Code and Output | |
これも通常通り。 | |
```{r} | |
summary(cars) | |
``` | |
## Tables | |
| | mpg | cyl | disp | hp | | |
|:-----------------:|:-----:|:-----:|:------:|:----:| | |
| Mazda RX4 | 21 | 6 | 160 | 110 | | |
| Mazda RX4 Wag | 21 | 6 | 160 | 110 | | |
| Datsun 710 | 22.8 | 4 | 108 | 93 | | |
| Hornet 4 Drive | 21.4 | 6 | 258 | 110 | | |
| Hornet Sportabout | 18.7 | 8 | 360.0 | 175 | | |
| Valiant | 18.1 | 6 | 225.0 | 105 | | |
| Duster 360 | 14.3 | 8 | 360.0 | 245 | | |
## knitr::kableのてすと | |
```{r} | |
knitr::kable(head(iris)) | |
``` | |
## Pictures { .white } | |
<img src="pics/craftbeer.jpg" class="cover"> | |
<p class="white"> | |
ビールのみてぇ | |
</p> | |
# Title slide | |
## Lists item by item | |
要するにバレットで送り込むリスト。これもRmdの通常どおり。 | |
> 1. Lets you reveal list items one by one | |
> 2. To keep some key points | |
> 3. In secret from audience | |
> 4. But it will work only once | |
> 5. Nobody wants to see the same joke twice | |
## Slide with Plot | |
```{r, echo=FALSE, dev='svg'} | |
par(mar = c(5, 4, 1, 2) + 0.1) | |
pairs(iris[1:4], pch = 21, | |
bg = c("red", "green3", "blue")[unclass(iris$Species)]) | |
``` | |
# Full Page Plots | |
## { .fullpage } | |
<div class="fullpage width"> | |
```{r, echo=FALSE, dev='svg'} | |
par(mar = c(5, 4, 1, 2) + 0.1) | |
pairs(iris[1:4], pch = 21, | |
bg = c("red", "green3", "blue")[unclass(iris$Species)]) | |
``` | |
</div> | |
## More information | |
### About R markdown: http://rmarkdown.rstudio.com | |
### About shower: https://github.com/shower/shower | |
### Example shower presentation: http://shwr.me/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment