Suzanne.Yang
Suzanne.Yang

Reputation: 13

How to make a page break in rmarkdwn html?

I use this following code in r-markdown to make a page break in order to printing easier. But it shows [1]"" in the html. why? How to delete it? or how to clearly make a page break in other ways?

```{r, comment=NA, echo=FALSE, results='asis'}
print("<P style='page-break-before: always'>")
```

Upvotes: 0

Views: 369

Answers (1)

Kamol Hasan
Kamol Hasan

Reputation: 13466

  1. Always insert a page-break after a <div> element:
<div style="page-break-after: always;"></div>
  1. Always insert a page-break before a <div> element:
<div style="page-break-before: always;"></div>

The markdown exporter might fail sometimes. To solve such problems, try to export as HTML format, open the file on browser and print as pdf(if required).

Upvotes: 1

Related Questions