Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.2.2 Adjusting font-size in ioslides using R Markdown #30

Closed
jananiravi opened this issue Jul 23, 2018 · 3 comments
Closed

4.2.2 Adjusting font-size in ioslides using R Markdown #30

jananiravi opened this issue Jul 23, 2018 · 3 comments

Comments

@jananiravi
Copy link

Thanks for the detailed super-helpful book, @yihui
Quick question. I read the sections on adjusting font-size in slides (R Markdown, ioslides presentation). Seems like I can use {.smaller} to change it for the whole slide.
I also read that footers can be added (if included in the file definition 4.2.3).

Qn: Is there a way to adjust the font size of individual lines in a particular slide? I tried appending the line with {.smaller} and {.bigger} but that doesn't work within the slide.
Thanks!

@dr-harper
Copy link
Contributor

If you want to change the size of individual lines of text, you will have to delve into some custom HTML. Here are some examples based on this Stackoverflow question:

---
title: "Untitled"
output: ioslides_presentation
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```

## Font Sizes

- Standard font
- <span style="color:red">Change the font colour</span>
- <font size="1">This is some text size 1!</font>
- <font size="1">This is some text size 1!</font>
- <font size="2">This is some text size 2!</font>
- <font size="3">This is some text size 3!</font>
- <font size="4">This is some text size 4!</font>
- <font size="5">This is some text size 5!</font>

Hope that helps!


As a tip, Stackoverflow is a good place if you are looking for general guidance. GitHub issues are less monitored, and are better used if there is a suspected bug or issue with the package or software. You may also consider https://community.rstudio.com for questions.

@jananiravi
Copy link
Author

Thanks, @mikey-harper True, I hadn't tried HTML tags yet. I was looking for Markdown-based shortcuts and skipped checking out the most obvious option!

@dr-harper
Copy link
Contributor

Markdown by design only allows a limited amount of formatting. But its power comes from this simplicity :)

The cheatsheet sets out pretty much all the built-in formatting: http://www.rstudio.com/wp-content/uploads/2016/03/rmarkdown-cheatsheet-2.0.pdf .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants