LoginSignup
3
3

More than 5 years have passed since last update.

slidifyでタイトルスライドに背景画像

Last updated at Posted at 2013-12-27

とりあえず、Rmd ファイルに直に書き込んで、実現しておく

<style>
.title-slide {
     background-image: url(assets/img/moemoe.png);
     background-repeat: no-repeat ;
     background-position: right center;
   }
</style>

あとframeworkをhtml5slidesと設定したらtheme指定を忘れない

framework   : html5slides  
theme       : default

それからコードチャンクをそのまま表示しようとおもってタブやスペースを置いても効かなかった。

    ```{r} `r ''`

とするか、あるいは以下のようにしたら実現できた。

    `r ''````{r,fig.height=5} 
    plot(cars)
    ```

タブではダメで、行頭にスペース四つ置いて、チャンクの頭に`r ''` 置けば、slidify でも RStudio の R Presentation でも、コードチャンクをまんま表示させられるので良いんかな。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3