customizing slide layouts in slidify

↘锁芯ラ 提交于 2019-12-20 10:12:04

问题


I am interested in using different layouts for different slides within my index.Rmd file. after copying the template provided here and below, I created a .html file in my assets/layouts folder.

<slide class="{{ class }}" id="{{ id }}">
  <hgroup>
    {{{ header }}}
  </hgroup>
  <article>
    <hr noshade size=4 color='red'>  
    {{{ content }}}  
    <div class='left' style='float:left;width:48%'>
     {{{ left }}}
    </div>    
    <div class='right' style='float:right;width:48%'>
     {{{ right }}}
    </div>
  </article>
</slide>

having got this far, it remains unclear:

1) why the slides in my deck are blank and not displaying any of the below:

---
#testing
hello

*** left

- point a
- point b
- point c

*** right

- point a
- point b
- point c

2) how to "call" the custom layout from my assets folder for an individual slide and not the whole deck


回答1:


You can specify a layout for a slide as metadata. For example, if you saved the layout you describe in the question as twocol.html in assets/layouts, then you can specify the layout in the slide level metadata. A & specifies a layout, while a . specifies a class and a # specifies an id. You are also free to define your own custom metadata as key:value pairs.

--- &twocol

## Two Columns

*** left

- point a
- point b
- point c

*** right

- point a
- point b
- point c


来源:https://stackoverflow.com/questions/15259455/customizing-slide-layouts-in-slidify

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!