ioslides降价演示文稿标题页中的字体大小

时间:2016-03-29 13:25:49

标签: css r rstudio knitr r-markdown

尝试从ioslides演示文稿更改标题页的默认文本大小但失败:

---
title: "My title is a bit too long to fully fit on the title page. I would really like to alter the font size to  provide a better fit. I have limited CSS skills to do so"
author: "My Name"
date: "29 March 2016"
output: 
  ioslides_presentation:
  css: slide.css
---

## R Markdown

This is an R Markdown presentation.

我的style.css文件是:

h1 { font-size: 12px;}

enter image description here

1 个答案:

答案 0 :(得分:6)

首先,间距/缩进/标签在YAML中很重要(请注意#include <iostream> #include <vector> #include <iterator> #include <algorithm> #include <string> #include <functional> template<typename C> C f(C x) { return x; } //template <class A, class B> typename std::vector<B> my_map(A fct,B v) <-- before template <class A, class B> typename std::vector<B> my_map(A fct,const std::vector<B>& v) { int n = v.size(); std::vector<B> r(n); int i; for(i=0;i<n;i++) { r[i]=(B) fct(v[i]); } return r; } int main() { std::vector<int> mapvector {1,2,5,7,9}; std::vector<int> ret = my_map(&f<int>,mapvector); std::copy(ret.begin(), ret.end(), std::ostream_iterator<int>(std::cout)); return 0; } 行上的附加标签):

css

这并不完美,希望其他人可以加入,但您可以使用output: ioslides_presentation: css: slide.css .title-slide标签调整hgroup课程:

h1

注意:您需要在当前示例中将.title-slide hgroup h1 { font-size: 12px; letter-spacing: 0; } 修改为letter-spacing(而不是原始呈现的0)。