1

I have a markdown file which is very long so I want to break it into section with page numbers at the bottom so the reader can choose a page number.

I tried to use page break like this:

hello world
\newpage
```{r, echo=FALSE}
1+1
```
\pagebreak
```{r, echo=FALSE}
plot(1:10)
```

but there is still one markdown and not many pages. How can I produce a markdown using knite html with page numbers at the bottom for other pages?

Kyle
  • 11
  • 2
  • As said here http://stackoverflow.com/questions/25240541/how-to-add-newpage-in-rmarkdown-in-a-smart-way: For HTML, you can achieve a similar effect by adding a tag

    . Note that you likely won't see a page break in your browser (HTMLs don't have pages per se), but the printing layout will have it.

    – Xiongbing Jin Mar 08 '16 at 04:07
  • @warmoverflow but I want to present the html file. is it possible to add page numbers like page 1, 2, 3, 4 and each page is after the `\pagebreak` ? – Kyle Mar 08 '16 at 04:11
  • Maybe it makes more sense to output a slide deck instead of raw html. Then the page numbers are handled for you... – cory Mar 08 '16 at 13:19

0 Answers0